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,222ed89632aabb93 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.100.137 with SMTP id y9mr953318qan.2.1343317085112; Thu, 26 Jul 2012 08:38:05 -0700 (PDT) Received: by 10.66.89.161 with SMTP id bp1mr1633773pab.33.1343315433700; Thu, 26 Jul 2012 08:10:33 -0700 (PDT) Path: a15ni113198934qag.0!nntp.google.com!q21no7291032qas.0!news-out.google.com!p10ni64993479pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!feed.news.qwest.net!mpls-nntp-03.inet.qwest.net!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.straub-nv.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Free AMD Core Math Library (BLAS/LAPACK) + Ada Date: Tue, 24 Jul 2012 15:18:33 +0100 Organization: A noiseless patient Spider Message-ID: References: <41b74e89-f112-4791-883d-236080652dbf@googlegroups.com> <34139f6f-5905-4c9e-a873-0b2445a1fccd@googlegroups.com> <87txx8yl8t.fsf@ludovic-brenta.org> <87pq7wyek7.fsf@ludovic-brenta.org> <16a6786f-6de5-49c4-90b7-a55cb238d52a@googlegroups.com> <509991f4-bcb4-45a0-84f3-b8393db64da4@googlegroups.com> <374bd898-5683-4350-8812-e3cae186ab2b@googlegroups.com> <87k3y3jxgj.fsf@ludovic-brenta.org> <23edac82-3e0e-47f5-85b7-36473e4a44ed@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="cde68d83b13037e4810cdb1a59ca6f9b"; logging-data="823"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iWATFBGjxRDKbbhoSGZLJSbqu82+b9AM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (darwin) Cancel-Lock: sha1:TRyc4GwR8/gLLETWd5jWRiu33lU= sha1:0oAHNnVC1tUoMS977vMHe0aLIyk= Content-Type: text/plain Date: 2012-07-24T15:18:33+01:00 List-Id: "Nasser M. Abbasi" writes: > On 7/24/2012 8:09 AM, Ada novice wrote: > >> The makefile now seems to work with gnat but the lgfortran cannot be located: >> >> make all >> gcc -c cxbbase.ads >> gcc -c cxbbase.ads >> gnatmake cxbi.adb -largs ifinc.o -lgfortran -lm >> gnatbind -x cxbi.ali >> gnatlink cxbi.ali ifinc.o -lgfortran -lm >> /usr/gnat/libexec/gcc/i686-pc-linux-gnu/4.5.3/ld: cannot find -lgfortran >> collect2: ld returned 1 exit status >> gnatlink: error when calling /usr/gnat/bin/gcc >> gnatmake: *** link failed. >> make: *** [cxbi] Error 4 >> >> Anything that I must adjust in my path or something else? >> >> > > As the notes says step 2 on the path: > need to tell the linker where the libraries are. This can be > done either by using -L or by using env. variable LD_LIBRARY_PATH > > Does your LD_LIBRARY_PATH point to > > /usr/lib/gcc/i486-linux-gnu/4.6 > > which is where libgfortran.so is? > > do echo $LD_LIBRARY_PATH to check before running the makefile > > The makefile should really has these build into it where one > can change them and it should use -L and not depend on env. path. > But this is how it was. Will try to improve this when I get > sometime and update the Makefile (I do not like to use env > variables to configure things) Shouldn't that be LIBRARY_PATH? I thing the trouble is that if you create a Fortran program and compile it gfortran foo.f gfortran knows to include -L/usr/lib/gcc/i486-linux-gnu/4.6 (or equivalent) when it calls the linker; but other languages don't, so we have to tell them. Much the same issue with the Ada RTS, I'd think.