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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,89c1829026285446 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: anyone seen this link error trying to link Ada program with blas and lapack? "cannot find -lgnalasup" Date: Sat, 16 Oct 2010 00:30:59 -0700 Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: nma@12000.org NNTP-Posting-Host: tUYQ4Ty9mMw9Pdc8TJRFQA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 Xref: g2news2.google.com comp.lang.ada:15533 Date: 2010-10-16T00:30:59-07:00 List-Id: On 10/15/2010 11:25 PM, Nasser M. Abbasi wrote: > But I do not get the above error, but I do not have blas and lapack on > windows. I need to figure now where to get them for windows and where to > put them to make gnatmake happy (I think that will be > > C:\GNAT\2010\LIB > > (wonder why blas and lapack do not come with GNAT GPL distribution since > there are needed to link against for building the new numeric stuff? > > >gnatmake main.adb -gnat05 -largs -L/usr/lib -lgnala -llapack -lblas > > gnatbind -x main.ali > gnatlink main.ali -L/usr/lib -lgnala -llapack -lblas > c:/gnat/2010/bin/../libexec/gcc/i686-pc-mingw32/4.3.6/ld.exe: cannot > find -llapack > collect2: ld returned 1 exit status > gnatlink: error when calling C:\GNAT\2010\bin\gcc.exe > gnatmake: *** link failed. > DONE ! Got it working, using gnat GPL 2010 with blas and lapack: --------------- gnatmake main.adb -gnat05 -largs -L/usr/lib -lgnala -L/usr/lib/lapack.a -L/usr/lib/blas.a gnatbind -x main.ali gnatlink main.ali -L/usr/lib -lgnala -L/usr/lib/lapack.a -L/usr/lib/blas.a ---------------------- This is what I did: I downloaded lapack 3.2.2. from http://www.netlib.org/lapack/ and then build the tree from source under cygwin gcc, this generated 2 static libraries: blas.a and lapack.a, then copied these 2 files to C:\GNAT\2010\LIB, then did the above gnatmake command. it worked! I have no idea what the -lgnalasup is, but I think it is just an internal packaging issue with the old gcc on cygwin with the Ada part. The gcc that comes with GPL GNAT 2010 is gcc --version gcc (GCC) 4.3.6 20100603 for GNAT GPL 2010 (20100603) while on cygwin, gcc is 4.3.4. anyway, this whole thing with Ada 2005 and lapack and blas needs to be sorted out. Since the new Ada 2005 numeric link to lapack, I think then lapack libraries should be part of the installation of the ada compiler. May be ask the user an option if they need to have these installed during the compiler installation? --Nasser