On Jul 8, 2010, at 9:37 AM, Orion Poplawski wrote:

> gcc 4.5 just landed in Fedora rawhide.  Now getting the following  
> error
> building Ada examples.  Looks like we may need to add -llapack to  
> the link,
> but not sure where this should be done.

GNAT (GNU Ada Translator) 2005 and 2012 require LAPACK and BLAS  
libraries to implement certain numeric functionality. I'm not sure  
where in the gcc series this entered but I think it was 4.3. In the  
Ada Reference Manual this functionality is described in Annex G.3.

You might have both C and Fortran versions of these libraries--OS X  
does. Ada can handle either (in principle) and I don't think it  
matters which one is used. I don't know which is currently being  
linked on OS X without looking into it. (Actually, I think OS X puts  
them both into the same framework which could mean in the same library.)

There is a build flag in PLplot to indicate the presence or absence of  
Ada 2005 (versus Ada 95) but we should probably move towards using it  
when possible as this compiler becomes more widespread.

In PLplot, there is minimal usage of this functionality--only some  
type declarations for arrays of floating point numbers. If the flag  
for Ada 2005 is not set, cmake causes these declarations to be made in  
the bindings themselves. So if you don't want to link the libraries,  
you should be able to proceed with PLplot by adjusting the flag.

Note that pretty much everywhere in PLplot including bindings and  
docs, "Ada 2007" is used instead of "Ada 2005" which is my fault. (The  
Ada 2005 spec was not finalized until early 2007.) I wonder if a  
global change is possible without wrecking something.

Jerry

>
> [ 23%] Building Ada object examples/ada/CMakeFiles/x01a.dir/x01a.o
> cd /builddir/build/BUILD/plplot-5.9.6/fedora/examples/ada && /usr/ 
> bin/gnatgcc
>  -I/builddir/build/BUILD/plplot-5.9.6/fedora/examples/ada
> -I/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada   -c
> /builddir/build/BUILD/plplot-5.9.6/fedora/examples/ada/x01a.adb -o
> CMakeFiles/x01a.dir/x01a.o
> Linking Ada executable x01a
> cd /builddir/build/BUILD/plplot-5.9.6/fedora/examples/ada && /usr/ 
> bin/cmake -E
> cmake_link_script CMakeFiles/x01a.dir/link.txt --verbose=1
> /usr/bin/gnatmake  -aI/builddir/build/BUILD/plplot-5.9.6/fedora/ 
> examples/ada
> -aI/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada
> -aL/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada/CMakeFiles/ 
> plplotadad.dir
> x01a.adb -cargs  -largs -rdynamic ../../bindings/ada/ 
> libplplotadad.so.0.0.0
> ../../src/libplplotd.so.9.8.0 /usr/lib64/libltdl.so /usr/lib64/ 
> libdl.so
> ../../lib/csa/libcsirocsa.so.0.0.1 ../../lib/nn/libcsironn.so.0.0.1
> /usr/lib64/libqhull.so ../../lib/qsastime/libqsastime.so.0.0.1
> /usr/lib64/libm.so /usr/lib64/libfreetype.so /usr/lib64/libgnat-4.5.so
> -Wl,-rpath,/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada:/ 
> builddir/build/BUILD/plplot-5.9.6/fedora/src:/builddir/build/BUILD/ 
> plplot-5.9.6/fedora/lib/csa:/builddir/build/BUILD/plplot-5.9.6/ 
> fedora/lib/nn:/builddir/build/BUILD/plplot-5.9.6/fedora/lib/qsastime
>
> gcc -c -I/builddir/build/BUILD/plplot-5.9.6/fedora/examples/ada
> -I/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada x01a.adb
> gnatbind -aI/builddir/build/BUILD/plplot-5.9.6/fedora/examples/ada
> -aI/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada
> -aO/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada/CMakeFiles/ 
> plplotadad.dir
> -x x01a.ali
> gnatlink x01a.ali -rdynamic ../../bindings/ada/libplplotadad.so.0.0.0
> ../../src/libplplotd.so.9.8.0 /usr/lib64/libltdl.so /usr/lib64/ 
> libdl.so
> ../../lib/csa/libcsirocsa.so.0.0.1 ../../lib/nn/libcsironn.so.0.0.1
> /usr/lib64/libqhull.so ../../lib/qsastime/libqsastime.so.0.0.1
> /usr/lib64/libm.so /usr/lib64/libfreetype.so /usr/lib64/libgnat-4.5.so
> -Wl,-rpath,/builddir/build/BUILD/plplot-5.9.6/fedora/bindings/ada:/ 
> builddir/build/BUILD/plplot-5.9.6/fedora/src:/builddir/build/BUILD/ 
> plplot-5.9.6/fedora/lib/csa:/builddir/build/BUILD/plplot-5.9.6/ 
> fedora/lib/nn:/builddir/build/BUILD/plplot-5.9.6/fedora/lib/qsastime
> /usr/lib/gcc/x86_64-redhat-linux/4.5.0/adalib//libgnala.a(a- 
> nlrear.o): In
> function `ada__numerics__long_real_arrays__lapack__getrfXnn':
> (.text+0x3585): undefined reference to `dgetrf_'
> /usr/lib/gcc/x86_64-redhat-linux/4.5.0/adalib//libgnala.a(a- 
> nlrear.o): In
> function `ada__numerics__long_real_arrays__lapack__getriXnn':
> (.text+0x35ed): undefined reference to `dgetri_'
> /usr/lib/gcc/x86_64-redhat-linux/4.5.0/adalib//libgnala.a(a- 
> nlrear.o): In
> function `ada__numerics__long_real_arrays__lapack__getrsXnn':
> (.text+0x3751): undefined reference to `dgetrs_'
> /usr/lib/gcc/x86_64-redhat-linux/4.5.0/adalib//libgnala.a(a- 
> nlrear.o): In
> function `ada__numerics__long_real_arrays__lapack__orgtrXnn':
> (.text+0x3881): undefined reference to `dorgtr_'
> /usr/lib/gcc/x86_64-redhat-linux/4.5.0/adalib//libgnala.a(a- 
> nlrear.o): In
> function `ada__numerics__long_real_arrays__lapack__steqrXnn':
> (.text+0x3923): undefined reference to `dsteqr_'
> /usr/lib/gcc/x86_64-redhat-linux/4.5.0/adalib//libgnala.a(a- 
> nlrear.o): In
> function `ada__numerics__long_real_arrays__lapack__sterfXnn':
> (.text+0x3966): undefined reference to `dsterf_'
> /usr/lib/gcc/x86_64-redhat-linux/4.5.0/adalib//libgnala.a(a- 
> nlrear.o): In
> function `ada__numerics__long_real_arrays__lapack__sytrdXnn':
> (.text+0x3a0f): undefined reference to `dsytrd_'
> collect2: ld returned 1 exit status
> gnatlink: error when calling /usr/bin/gcc
> gnatmake: *** link failed.
>
> -- 
> Orion Poplawski
> Technical Manager                     303-415-9701 x222
> NWRA/CoRA Division                    FAX: 303-415-9702
> 3380 Mitchell Lane                  or...@cora.nwra.com
> Boulder, CO 80301              http://www.cora.nwra.com
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to