[CIG-MC] CitcomS configure script bombs for GMT4.4.0 test compile

Eh Tan tan2 at geodynamics.org
Wed Aug 4 14:51:10 PDT 2010

Hi Thorsten,

The "-lm" flag is added at line 106 of configure.ac

   AC_SEARCH_LIBS([sqrt], [m])

You can try to move this line to a later position in the file, e.g. line 


On 08/04/2010 03:35 PM, Thorsten Becker wrote:
> Hi,
> I'm trying to run the CitcomS (SVN) configure script --with-ggrd and it
> fails because the linker won't pick up the math routines. Presumably
> this would work if the "-lm" were placed after the "-lgmt". Any chance
> this could be fixed, or any other suggestions as to what might be going
> wrong ?
> Thanks much in advance!
> T
> configure:21188: /usr/usc/mpich/default/mx-gnu43//bin/mpicc -o conftest
> -Werror -O2 -funroll-loops  -fomit-frame-pointer -DUSE_GZDIR
> -I/home/rcf-proj2/
> twb//progs/src/netcdf-3.6.2/x86_64//include
> -I/home/rcf-proj2/twb//progs/src/GMTdev/GMT4.4.0/x86_64//include
> -I/home/rcf-106/twb/progs/src/hc-svn/ -DUSE_GGRD
> -L/usr/lib/gcc/x86_64-redh
> at-linux/4.1.1/ -lgfortran -static -lz -lm
> -L/home/rcf-proj2/twb//progs/src/netcdf-3.6.2/x86_64//lib
> -L/home/rcf-proj2/twb//progs/src/GMTdev/GMT4.4.0/x86_64//lib conftest.c
> -lgmt  -lne
> tcdf>&5
> /home/rcf-proj2/twb//progs/src/GMTdev/GMT4.4.0/x86_64//lib/libgmt.a(gmt_grdio.o): In function `GMT_adjust_loose_wesn':
> gmt_grdio.c:(.text+0x1735): undefined reference to `rint'
> gmt_grdio.c:(.text+0x179f): undefined reference to `rint'
> gmt_grdio.c:(.text+0x185a): undefined reference to `rint'
> gmt_grdio.c:(.text+0x18a8): undefined reference to `rint'
> gmt_grdio.c:(.text+0x1a9e): undefined reference to `fmod'
> gmt_grdio.c:(.text+0x1b08): undefined reference to `fmod'

More information about the CIG-MC mailing list