[postgis-users] PostGIS and GEOS on FreeBSD 4.11: problem with libstdc++.so.6
Markus Schaber
schabi at logix-tt.com
Mon Sep 25 11:38:25 PDT 2006
Hi, Toomas,
Toomas Aas wrote:
> ERROR: could not load library
> "/usr/local/lib/postgresql/liblwgeom.so.1": dlopen
> (/usr/local/lib/postgresql/liblwgeom.so.1) failed: Shared object
> "libstdc++.so.6" not found, required by "libgeos_c.so.1"
> CONTEXT: SQL function "geomfromtext" statement 1
>
> The problem with this message is that all these library files actually
> do exist and are listed in output of 'ldconfig -r', so I don't
> understand why libstdc++.so.6 can't be found. Does this qualify as a
> "weird problem (backend unexpectedly closed or similar thing)",
> indicating that I need to rebuild PostgreSQL?
I think this qualifies as a variation of that "weird problem".
> To make life even more interesting, building GEOS on FreeBSD 4.11 pulled
> in GCC 3.4 as a dependency and used that to compile itself, whereas
> PostgreSQL and PostGIS got built with GCC 2.95, which is standard in
> FreeBSD 4. So I actually have two versions of lstdc++:
> /usr/lib/libstdc++.so.3
> and
> /usr/local/lib/gcc/i386-portbld-freebsd4.11/3.4.6/libstdc++.so.6
That seems to be the problem - you pulled the dependencies of two
different libstdc++ versions.
And, AFAICT, GCC 2.95 was one of the old versions that exposed the bug,
3.4 has (at least on Linux) fixed it.
> I wonder if I should perhaps try to build PostgreSQL and PostGIS with
> GCC 3.4, so they all use the same C++ libraries?
Yes, that seems to be the solution.
Additionally, AFAICT, GCC 3.4 and 2.95 have different binary interfaces
for C++, leading to anything from linkage errors over crashing
applications to production of fake data.
HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
More information about the postgis-users
mailing list