[postgis-devel] [PostGIS] #1685: [raster] Regress build failure with two versions of GEOS
PostGIS
trac at osgeo.org
Wed Mar 14 01:13:12 PDT 2012
#1685: [raster] Regress build failure with two versions of GEOS
-----------------------------------+----------------------------------------
Reporter: mwtoews | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: build/upgrade/install | Version: 2.0.x
Keywords: |
-----------------------------------+----------------------------------------
I'm writing simple install instructions for PostGIS 2.0 at
UsersWikiInstall. They all appear to install properly, although I'm in the
middle of testing.
However, `make check` has a reproducible error (on all Ubuntu and Debian
systems, using instructions from UsersWikiInstall) with
postgis-2.0.0beta2SVN:
{{{
$ make check
...
---- Making check in raster
make[1]: Entering directory `/home/mwtoews/postgis-2.0.0beta2SVN/raster'
make -C test check
make[2]: Entering directory
`/home/mwtoews/postgis-2.0.0beta2SVN/raster/test'
make -C core check
make[3]: Entering directory
`/home/mwtoews/postgis-2.0.0beta2SVN/raster/test/core'
gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../../rt_core
-I/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom -I/usr/include/gdal
-I/usr/local/include -o testapi testapi.c ../../rt_core/librtcore.a
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/.libs/liblwgeom.a -L/usr/lib
-lgdal1.7.0 -L/usr/local/lib -lgeos_c -lm
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/.libs/liblwgeom.a(lwgeom_geos.o):
In function `LWGEOM2GEOS':
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos.c:326: undefined
reference to `GEOSGeom_createEmptyPolygon'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/.libs/liblwgeom.a(lwgeom_geos.o):
In function `lwgeom_snap':
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos.c:967: undefined
reference to `GEOSSnap'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/.libs/liblwgeom.a(lwgeom_geos.o):
In function `lwgeom_sharedpaths':
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos.c:1030:
undefined reference to `GEOSSharedPaths'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/.libs/liblwgeom.a(lwgeom_geos.o):
In function `lwgeom_offsetcurve':
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos.c:1080:
undefined reference to `GEOSOffsetCurve'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/.libs/liblwgeom.a(lwgeom_geos_clean.o):
In function `LWGEOM_GEOS_makeValidPolygon':
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos_clean.c:427:
undefined reference to `GEOSGeom_extractUniquePoints'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos_clean.c:440:
undefined reference to `GEOSGeom_extractUniquePoints'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos_clean.c:478:
undefined reference to `GEOSGeom_createEmptyPolygon'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/.libs/liblwgeom.a(lwgeom_geos_clean.o):
In function `LWGEOM_GEOS_makeValid':
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos_clean.c:863:
undefined reference to `GEOSGeom_extractUniquePoints'
/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom/lwgeom_geos_clean.c:864:
undefined reference to `GEOSGeom_extractUniquePoints'
collect2: ld returned 1 exit status
make[3]: *** [testapi] Error 1
make[3]: Leaving directory
`/home/mwtoews/postgis-2.0.0beta2SVN/raster/test/core'
make[2]: *** [core-check] Error 2
make[2]: Leaving directory
`/home/mwtoews/postgis-2.0.0beta2SVN/raster/test'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/home/mwtoews/postgis-2.0.0beta2SVN/raster'
make: *** [check] Error 1
}}}
In the instructions (e.g., [wiki:UsersWikiPostGIS20Ubuntu1004src]), I'm
suggesting to `apt-get install gdal-dev`, which installs a second version
of GEOS as a dependency. Clearly the errors above reflect this, but I
don't see the same errors when building/installing raster. I.e.,
{{{
$ cd raster/loader
$ make clean
rm -rf .libs
rm -f *.o raster2pgsql
$ make
gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../rt_core
-I/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom -I/usr/include/gdal
-I/usr/local/include -c raster2pgsql.c
/bin/bash ../..//libtool --mode=link gcc -g -O2 -fPIC -DPIC -Wall
-Wmissing-prototypes -I../rt_core
-I/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom -I/usr/include/gdal
-I/usr/local/include raster2pgsql.o ../rt_core/librtcore.a
../rt_core/librtcore.a ../../liblwgeom/liblwgeom.la -L/usr/lib -lgdal1.6.0
-L/usr/local/lib -lgeos_c -lm -o raster2pgsql
mkdir .libs
gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../rt_core
-I/home/mwtoews/postgis-2.0.0beta2SVN/liblwgeom -I/usr/include/gdal
-I/usr/local/include raster2pgsql.o -o .libs/raster2pgsql
../rt_core/librtcore.a ../../liblwgeom/.libs/liblwgeom.so -L/usr/local/lib
/usr/local/lib/libgeos_c.so /usr/local/lib/libgeos.so /usr/lib/libproj.so
-L/usr/lib -lgdal1.6.0 /usr/lib/libgeos_c.so /usr/lib/libgeos.so -lm
creating raster2pgsql
}}}
Here is some info that may (or may not) be useful from one of the systems
(using [wiki:UsersWikiPostGIS20Ubuntu1004src] instructions):
{{{
$ locate libgeos.so
/usr/lib/libgeos.so
/usr/local/lib/libgeos.so
$ /usr/bin/geos-config --version
3.1.0
$ /usr/local/bin/geos-config --version
3.3.2
$ which geos-config
/usr/local/bin/geos-config
$ which gdal-config
/usr/bin/gdal-config
$ gdal-config --dep-libs
-L/usr/lib -lgeos_c -I/usr/include -lsqlite3 -lodbc -lodbcinst -L/usr/lib
-lexpat -L/usr/lib -lxerces-c -lpthread -ljasper -lhdf5 -lmfhdfalt -ldfalt
-logdi -lgif -ljpeg -lpng -lnetcdf -lpq -L/usr/lib -lpq -lz -lpthread -lm
-lrt -ldl -lcurl -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql
-lmysqlclient
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/1685>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list