From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: anyone seen this link error trying to link Ada program with blas and lapack? "cannot find -lgnalasup"
Date: Fri, 15 Oct 2010 23:25:51 -0700
Date: 2010-10-15T23:25:51-07:00 [thread overview]
Message-ID: <i9bghg$9bm$1@speranza.aioe.org> (raw)
In-Reply-To: i9be7s$2hg$1@speranza.aioe.org
On 10/15/2010 10:46 PM, Nasser M. Abbasi wrote:
>
>
> Hello;
>
> I've send this email to the cygwin mailing list.
>
> I thought I check here also.
>
> I am trying to build an Ada file which has to be linked to blas and
> lapack as it uses the new Ada 2005 Solve() of linear system function.
>
> The link problem is on cygwin. I think it is a gcc installation issue
> may be.
>
> "It seems there is a library missing in the system. Did a search on
> this, but not able to find anything.
>
> $ uname -a
> CYGWIN_NT-6.1-WOW64 me-PC 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
>
> $ gcc --version
> gcc (GCC) 4.3.4 20090804 (release) 1
>
> $ gnatmake main.adb -largs -L/usr/lib -lgnala -llapack -lblas
> gnatbind -x main.ali
> gnatlink main.ali -L/usr/lib -lgnala -llapack -lblas
> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld:
> cannot find -lgnalasup
> collect2: ld returned 1 exit status
> gnatlink: error when calling /usr/bin/gcc.exe
> gnatmake: *** link failed.
>
> When I copy the source file (the Ada file) to a linux system, with
> ubuntu 10.10 (linux 2.6.35-22) running gcc 4.4.5, the same command above
> works with no problem. no link error.
> "
>
> The blas and lapack libraries should come with the system normally, but
> sometime they do not. On cygwin, they are there. On Ubuntu I had to
> install them afterwords (easy with the package manager).
>
> The Ada source file is just one file. If someone wants to try the above
> gnatmake command on my file, here it is:
>
> http://12000.org/tmp/AAA/main.adb
>
> Need to use the above command to build it, which is:
>
> gnatmake main.adb -largs -L/usr/lib -lgnala -llapack -lblas
>
> It does nothing now, just wanted first to see if it builds oK.
>
> thanks
> --Nasser
I found one reference on this library, here it is
http://objectmix.com/ada/382814-gnatmake-ada-numerics-real_arrays-not-predefined-library-unit.html
"Anyway, I've started investigating the "libgnalasup" issue. This
library is referenced by i-forbla.adb, but doesn't seem to be
distributed. Replacing it with "liblapack" and "libblas" may be
enough."
But the suggestion given does not work for my on cygwin (gcc 4.3.3). I
get the same error. Using -lgnalasup or -lgnala or not using or using
gnatmake -static, nothing works.
I think now after reading the above, this is some gnat version being a
bit old on cygwin (gcc 4.3). The problem is that this is the latest
version I have of gcc on cygwin.
I now downloaded from libre site gnat 2010 GPL, on windows, and
installed it. Then did the same command above (had to add -gnat05,
becuase it now complained).
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.
--Nasser
next prev parent reply other threads:[~2010-10-16 6:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-16 5:46 anyone seen this link error trying to link Ada program with blas and lapack? "cannot find -lgnalasup" Nasser M. Abbasi
2010-10-16 6:25 ` Nasser M. Abbasi [this message]
2010-10-16 7:30 ` Nasser M. Abbasi
2010-10-16 14:49 ` Simon Wright
2010-10-16 15:45 ` Nasser M. Abbasi
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox