[postgis-users] Postgis 2.0 installation Problem - "undefined reference to `GEOSGeom_createEmptyPolygon'"

Alexandre Neto senhor.neto at gmail.com
Wed Apr 25 15:09:10 PDT 2012


I'm trying to install Postgis 2.0 in a ubuntu machine.

It's the first time I try compiling code

I was able to configure and make with sucess, but after make check I
receive the following error:

-------------------------------
make[1]: Leaving directory `/media/DADOS1/TEMPORARIO/postgis-2.0.0/regress'
---- Making check in raster
make[1]: Entering directory `/media/DADOS1/TEMPORARIO/postgis-2.0.0/raster'
make -C test check
make[2]: Entering directory
`/media/DADOS1/TEMPORARIO/postgis-2.0.0/raster/test'
make -C core check
make[3]: Entering directory
`/media/DADOS1/TEMPORARIO/postgis-2.0.0/raster/test/core'
gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes -I../../rt_core
-I../../../liblwgeom  -I/usr/include/gdal -I/usr/local/include -c testapi.c
mode=link gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes
-I../../rt_core -I../../../liblwgeom  -I/usr/include/gdal
-I/usr/local/include testapi.o ../../rt_core/librtcore.a
../../rt_core/librtcore.a ../../../liblwgeom/.libs/liblwgeom.a -L/usr/lib
-lgdal1.8.0 -L/usr/local/lib -lgeos_c -lm  -o testapi
../../../liblwgeom/.libs/liblwgeom.a(lwgeom_geos.o): In function
`LWGEOM2GEOS':
/media/DADOS1/TEMPORARIO/postgis-2.0.0/liblwgeom/lwgeom_geos.c:326:
undefined reference to `GEOSGeom_createEmptyPolygon'
../../../liblwgeom/.libs/liblwgeom.a(lwgeom_geos.o): In function
`lwgeom_snap':
/media/DADOS1/TEMPORARIO/postgis-2.0.0/liblwgeom/lwgeom_geos.c:972:
undefined reference to `GEOSSnap'
.
.
.
/media/DADOS1/TEMPORARIO/postgis-2.0.0/liblwgeom/lwgeom_geos_clean.c:864:
undefined reference to `GEOSGeom_extractUniquePoints'
collect2: ld returned 1 exit status
make[3]: [testwkb] Error 1 (ignored)
./testapi
make[3]: ./testapi: Command not found
make[3]: *** [check] Error 127
make[3]: Leaving directory
`/media/DADOS1/TEMPORARIO/postgis-2.0.0/raster/test/core'
make[2]: *** [core-check] Error 2
make[2]: Leaving directory
`/media/DADOS1/TEMPORARIO/postgis-2.0.0/raster/test'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/media/DADOS1/TEMPORARIO/postgis-2.0.0/raster'
make: *** [check] Error 1

---------------------------

I found some clues about what might be round here:
http://postgis.refractions.net/pipermail/postgis-devel/2012-March/019607.html

Something to do with more than one GEOS installed

The presented solution would be to change the order of  "-L/usr/lib
-lgdal1.8.0" and "-L/usr/local/lib
 -lgeos_c" in the makefile.

But in witch makefile?

Have have changed a bunch of them (raster\rt_core,raster\test\core), and
used the make command again. But, in the "make check" the order is
mantained and gives the same error.

Alexandre Neto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120425/60504a37/attachment.html>


More information about the postgis-users mailing list