[gdal-dev] compiling GDAL with GEOS support.

Even Rouault even.rouault at mines-paris.org
Wed Aug 17 14:00:44 EDT 2011


Le mercredi 17 août 2011 18:19:20, Jerl Simpson a écrit :
> Hi:
> 
> I'm having a strange issue when compiling GDAL with GEOS support.
> 
> I wonder if someone can help.
> 
> When I enable GEOS support using "--with-geos=/usr/local/bin/geos-config" I
> get the following errors:
> 
> gdal/.libs/libgdal.so: undefined reference to `GEOSWKBWriter_create'
> gdal/.libs/libgdal.so: undefined reference to `GEOSSimplify'
> gdal/.libs/libgdal.so: undefined reference to `GEOSWKBWriter_write'
> gdal/.libs/libgdal.so: undefined reference to
> `GEOSWKBWriter_setOutputDimension'
> gdal/.libs/libgdal.so: undefined reference to `GEOSUnionCascaded'
> gdal/.libs/libgdal.so: undefined reference to `GEOSFree'
> gdal/.libs/libgdal.so: undefined reference to `GEOSWKBWriter_destroy'
> gdal/.libs/libgdal.so: undefined reference to
> `GEOSGeom_getCoordinateDimension'

Hum, what is interesting here is that all those symbols are conditionnaly used 
when GEOS >= 3.1 is detected. So my guess is that GDAL builds against the 
include files of the newer GEOS version you specify, but at the linking stage, 
there's an older libgeos that must be somewhere in the linking path, probably 
in /usr/lib that gets linked before the one you would liked too. So you might 
want to uninstall your older geos version, or to alter the linking order of 
the LIBS variable in GDALmake.opt and/or remove the mentions to -L/usr/lib 
that might be found in it


More information about the gdal-dev mailing list