[Mapserver-users] GDAL/libgeotiff configure problem on Solaris 2.8/gcc 3.3

Frank Warmerdam warmerdam at pobox.com
Mon Nov 10 14:00:41 PST 2003


richard.roger at agric.nsw.gov.au wrote:
> configure:4664: checking whether we should include OGR support...
> configure:4724: checking for OGRRegisterAll in -lgdal.1.1
> configure:4743: gcc -o conftest -g -O2   conftest.c -lgdal.1.1   -lm 
> -lstdc++  -L/riu/links/local/lib -lgdal.1.1 1>&5
> Undefined                        first referenced
>  symbol                              in file
> __eprintf                           /riu/links/local/lib/libgeotiff.so
...
> gcc -o conftest conftest.c -lgdal.1.1
> 
> but it succeeded with
> 
> gcc -o conftest conftest.c -lgdal.1.1 -lgeotiff
> 
> The "-lgdal.1.1" is essentially the library switch that is reported by 
> the installed "gdal-config".
> 
> I'm not sure whether this error is because "configure" is not correctly 
> set up, or whether this is to do with the dependence of "gdal" on 
> libtiff/libgeotiff, or a mistake on my part.
> 
> I have worked around this problem by changing line 4721 of "configure" from
> 
> LIBS="$LIBS `$GDAL_CONFIG --libs`"
> 
> to
> 
> LIBS="$LIBS `$GDAL_CONFIG --libs` -lgeotiff"

Richard,

In my experience the __eprintf symbol is usually missing if ld is used to
link an application that uses assert() and was compiled with gcc.  Basically,
the assert() required some function only linked if gcc was used to link and
not (by default) if ld was used.

I don't really know why this failed:
   gcc -o conftest conftest.c -lgdal.1.1

But you didn't mention what error was reported.  My understanding (and this
might be true on Linux but not Solaris), is that we don't need to list supporting
shared libraries when linking against libgdal.1.1.so because it should already
know what it depends on and automatically include them.

In any event, thanks for summarizing your findings and the extensive work
you did digging into it.  It seems building software is still far from
problem free on different platforms.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the MapServer-users mailing list