[GRASS5] configure checks, fortran, static libraries
Glynn Clements
glynn.clements at virgin.net
Mon Aug 6 05:15:33 EDT 2001
Markus Neteler wrote:
> > This suggests that many of the AC_CHECK_LIB tests will fail if one of
> > the required libraries is a static library. So, I'll be re-writing
> > those tests. I would be interested in test results using static
> > libraries, e.g. by using:
> >
> > CC="gcc -static" ./configure ...
>
> Here we are... It is not yet consistent:
>
> CC="gcc -static" ./configure
>
> ...
> checking for location of Tcl/Tk includes...
> checking for tcl.h... yes
> checking for tk.h... yes
> checking for location of Tcl/Tk libraries...
> checking for Tcl_Init in -ltcl... no
> checking for Tcl_Init in -ltcl... no
> checking for Tcl_Init in -ltcl8.3... no
> checking for Tcl_Init in -ltcl8.3... no
> configure: warning: *** Unable to locate Tcl library.
> checking for Tk_MainWindow in -ltk... no
> checking for Tk_MainWindow in -ltk... no
> checking for Tk_MainWindow in -ltk8.3... no
> checking for Tk_MainWindow in -ltk8.3... no
> configure: warning: *** Unable to locate Tk library.
This is to be expected if you don't actually have static Tcl/Tk
libraries.
I'm not expecting anyone to be able to successfuly build GRASS using
"gcc -static" (that would require static versions of *all* required
libraries). I'm primarily looking for information regarding which
libraries depend upon which other libraries.
Shared libraries typically contain dependency information, so any
required libraries will be linked automatically. Static libraries
don't, so you have to explicitly specify any dependencies.
> With standard "configure" (no static option), the BLAS check fails:
>
> checking for location of BLAS library...
> checking for dnrm2_ in -lblas... no
> configure: warning: *** Unable to locate BLAS library.
> checking for location of LAPACK library...
> checking for dgesv_ in -llapack... no
> checking for dgesv_ in -llapack... yes
>
>
> config.log:
> configure:5850: checking for dnrm2_ in -lblas
> configure:5869: gcc -o conftest -g -O2 conftest.c -lblas -lm 1>&5
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libblas.so: undefined
> referenc 'e_wsfe'
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libblas.so: undefined
> referenc 'z_abs'
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libblas.so: undefined
> referenc 'do_fio'
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libblas.so: undefined
> referenc 's_stop'
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libblas.so: undefined
> referenc 'c_abs'
> /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libblas.so: undefined
> referenc 's_wsfe'
> collect2: ld returned 1 exit status
> configure: failed program was:
These symbols are all defined in libg2c, so it appears that I need to
try adding -lg2c, as is done for LAPACK. I only have a static BLAS
library, which (unlike LAPACK) doesn't need -lg2c.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev
mailing list