[postgis-users] Problem compiling PostGIS2.0 with GEOS 1.3.3+

Jan Hartmann j.l.h.hartmann at uva.nl
Fri Jun 22 12:27:59 PDT 2012


Compiling PostGIS 2.0.0 will break down when the file "liblwgeom.h" is 
not included from the PostGIS distribution, but from the installed GEOS 
includes. This happens when the include path to the gcc compiler first 
explicitly specifies the standard include directories (/usr/include 
etc), and only afterwards the specific PostGIS include directories, like 
"-I/usr/local/include -I../libwgeom". The problem is that the file 
"liblwgeom.h" exists both in the GEOS distribution and in the PostGIS 
source. Things are defined differently im both versions, i.e. a "struct 
BOX3D" with and without a "srid" member.

I solved the problem by changing #include "liblwgeom.h" into #include 
"../liblwgeom.h" in all C-files in the postgis subdirectory. Another way 
would be to change the compile setup in configure. Best would be, of 
course, to either synchronize both liblwgeom.h files, or rename the 
PostGIS version. The way it now is organised is asking for trouble.

Cheers,

Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120622/a6745470/attachment.html>


More information about the postgis-users mailing list