Opened 18 years ago

Last modified 18 years ago

#634 closed defect (fixed)

SuSE 9.1 has GEOS 1.0-5, but GDAL seems to want GEOS 2.x

Reported by: mcoletti@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: major Keywords:


When building on my SuSE 9.1 system, I encountered the following error:

gmake[2]: Leaving directory `/home/mcoletti/projects/gdal/ogr/ogrsf_frmts'
/bin/sh ../libtool --mode=compile g++ -Wall  -O2    -Iogrsf_frmts -I. -I../port
-I../gcore -I../ogr -I../alg   -DHAVE_GEOS=1 -I-g -O2 -I/usr/include -I../port 
-c -o ogrgeometry.o ogrgeometry.cpp
 g++ -Wall -O2 -Iogrsf_frmts -I. -I../port -I../gcore -I../ogr -I../alg
-DHAVE_GEOS=1 -I-g -O2 -I/usr/include -I../port -c ogrgeometry.cpp  -fPIC -DPIC
-o .libs/ogrgeometry.o
ogrgeometry.cpp: In member function `virtual OGRGeometry*
   OGRGeometry::ConvexHull() const':
ogrgeometry.cpp:1393: error: no matching function for call to `geos::ConvexHull
/usr/include/geos/geosAlgorithm.h:443: error: candidates are:
   geos::ConvexHull::ConvexHull(const geos::ConvexHull&)
/usr/include/geos/geosAlgorithm.h:458: error:
ogrgeometry.cpp:1396: error: no matching function for call to `geos::ConvexHull
/usr/include/geos/geosAlgorithm.h:460: error: candidates are: geos::Geometry*
   geos::ConvexHull::getConvexHull(const geos::Geometry*)
gmake[1]: *** [ogrgeometry.o] Error 1
gmake[1]: Leaving directory `/home/mcoletti/projects/gdal/ogr'
gmake: *** [ogr-target] Error 2

This would seem to be because geos::ConvexHull's interface changed from GEOS 1.0
to 2.0, and GDAL presumes that if it finds GEOS it must be 2.0.  This isn't
necessarily the case with stock installs, such as SuSE 9.1.  It might be better
to use ``geos-config'' to get version number and to tailor results to which GEOS
interface version to use.  (Or just force everyone to use GEOS 2.0+.  Naturally
updating the configure script to complain if it encounters 1.0 versions in that
case would be a goodism.)

Change History (1)

comment:1 by warmerdam, 18 years ago


I have added a check on the GEOS version and configure reports a failure if
it is less than 2.  You would need to explicitly configure --without-geos if
you only have the old version.

Note: See TracTickets for help on using tickets.