[postgis-users] Update on GEOS Integration

Paul Ramsey pramsey at refractions.net
Sun Jun 1 11:56:19 PDT 2003


We appear to have found a viable workaround to the exception handling 
problems described on this list a couple weeks ago.

- The problem was a manifestation of the parent postgres process not 
being able to intelligently handle signals raised by the dynamically 
linked GEOS library. Specifically, the GEOS library would raise C++ 
exceptions which the parent postgres process would interpret as 
SIGABORT. The postgres process would then terminate before the exception 
could be passed on to a piece of code which could handle it.
- The solution turned out to be relatively simple. Dynamically linking 
the postgres server with libstdc++, the standard C++ library. Since 
everyone currently installing and using PostGIS is either (a) building 
thier own postgresql or (b) using a binary provided with PostGIS support 
built in by someone else, this build-time solution should be easily 
applicable. From a compilation point of view, all that changes is the 
invocation of 'configure' when building postgresql. "LDFLAGS=-lstdc++ 
./configure --your --options --here" will pre-set the linker flags to 
include the C++ library, and everything else will procede as normal.

The extremely brave can experiment using the postgis cvs and geos cvs 
versions. No bug reports please at this time, only bug fixes, as we 
still have not done any due diligence on this code and are time 
constrained at the moment.

Thanks all,
Paul




More information about the postgis-users mailing list