From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,35f6cee6f665d64b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.84.38 with SMTP id v6mr3294736pay.7.1343789444931; Tue, 31 Jul 2012 19:50:44 -0700 (PDT) Path: g9ni7594066pbo.0!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN: Ada 2005 Math Extensions 20120712 Date: Fri, 27 Jul 2012 22:03:05 +0100 Organization: A noiseless patient Spider Message-ID: References: <167ecede-3588-45f0-904b-06a8be4cfec7@googlegroups.com> <2ba72d4e-6e88-4900-8232-c075242dec1f@googlegroups.com> <65f76f80-a1e5-4c60-8002-45becc2a1198@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="edf2659fbb8cb6d4b5f62db4b36ac1e6"; logging-data="24930"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+O90pf6rvKsgJf/nj3q2BsGsP82OZ+N1Y=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (darwin) Cancel-Lock: sha1:0DxzExrWRPykj8wq8+q7C0JxAqs= sha1:bllDLCdAyRHtgmt6oUSrgY7Ro7A= X-Received-Bytes: 2877 Content-Type: text/plain Date: 2012-07-27T22:03:05+01:00 List-Id: Ada novice writes: > After knowing that the lapack and blas libraries are functional on my > linux system, I tried the new math extension package. I do not > understand however how lapack and blas are called. > > After issuing the command: $ gnatmake -p -P demo_extensions, I see > further down the output these lines: > > gnatbind -E -I- -x /home/work/ada/simon2012/test/.build/demo_extensions.ali > gnatlink /home/work/ada/simon2012/test/.build/demo_extensions.ali -g > /home/work/ada/simon2012/lib/libgnat_math_extensions.a > -Wl,-rpath,/usr/local/gnat-2012/lib/gcc/i686-pc-linux-gnu/4.5.4/adalib/ > -llapack -lblas -o > > So the linker is calling -llpack and -lblas. > > When I execute $ ./demo_extensions, I do get a long list of outputs [...] > as expected from the code > > My question is at which stage -llpack and -lblas are called? The file > demo_extensions.gpr does not have these "switches" in the linker > section. demo_extensions.gpr starts with "../gnat_math_extensions"; and gnat_math_extensions.gpr contains package Linker is for Linker_Options use ("-llapack", "-lblas"); end Linker; > I would like to know what lapack and blas libraries are being called, > and if I can switch to the ACML ones which also work well for other > Ada programs. "ldd demo_extensions" will show you which shareable libraries are used by the executable demo_extensions. You should be able to switch to the ACML libraries without trouble. You may be able to do so without re-linking; I don't remember how to do that (setting the env var LD_PRELOAD to the replacement libraries??)