1

I'm having some problems with Postgres/PostGIS after rebuilding my GDAL library:(

I wanted to add MrSID support in GDAL so rebuilt it with the MrSID SDK. Everything compiled ok and I am now able to open Raster .sid files within QGIS.

BUT I seem to have screwed my Postgres 9.3 install as now I have no PostGIS support. If I try and open previously functioning postgis databases in QGIS I get a ton of error messages indicating that my database has no working PostGIS support.

When I look at my databases in PGADMIN3 I get the following error: ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": /usr/lib/postgresql/9.3/lib/postgis-2.1.so: undefined symbol: GEOSHausdorffDistance

The postgis-2.1.so library is definitely present on my system and was working fie before I recompiled GDAL.

I'm running Ubuntu 13.10, Postgres 9.3, PostGIS 2.1, and GDAL 1.10.

This is how I compiled GDAL 1.10:

./configure --with-geos=yes --with-sqlite3 --with-python --with-spatialite --with-fgdb=/usr/local/FileGDB_API --with-postgres --with-odbc --with-curl=yes --with-mrsid=/usr/local/MrSID_DSDK/Raster_DSDK --with-mrsid_lidar=/usr/local/MrSID_DSDK/Lidar_DSDK --with-poppler=yes --with-jasper=yes --with-opencl=no --with-ogdi=no

Anyone have any idea how to fix this? Do I need to recompile Postgis against Gdal?!

Really appreciate any help with this for as usual I urgently need to use my postgis data!

Thanks

Marty

EDIT Looking at libraries for postgis-2.1.so gives:

$ldd /usr/lib/postgresql/9.3/lib/postgis-2.1.so
linux-vdso.so.1 =>  (0x00007fffcb1fe000)
libgeos_c.so.1 => /usr/local/MrSID_DSDK/Raster_DSDK/lib/libgeos_c.so.1 (0x00007f84d821e000)
libproj.so.0 => /usr/lib/libproj.so.0 (0x00007f84d7fcc000)
libjson-c.so.2 => /lib/x86_64-linux-gnu/libjson-c.so.2 (0x00007f84d7dc1000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f84d7a5b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f84d7693000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f84d7475000)
libgeos.so.2 => /usr/local/MrSID_DSDK/Raster_DSDK/lib/libgeos.so.2 (0x00007f84d717d000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f84d6e79000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f84d6b74000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f84d695e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f84d675a000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f84d6540000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f84d631e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f84d86f0000)
  • Your error message indicates that your PostGIS installation can't find the proper GEOS library. Did you install a different version of GEOS when preparing to compile GDAL? – Evil Genius Mar 20 '14 at 17:38
  • hi @EvilGenius. No, I didn't install GEOS again. I have version 3.3.8 installed. Not sure if this is related but QGIS tells me it was compiled against Geos 3.3.8, but running against Geos 2.2.3? – marty_c Mar 20 '14 at 17:44
  • Ok. It sounds like you may have two different versions of GEOS hanging around. You should be able to use the ldd command to determine the exact libraries a program is linking to. That should be the 3.3.8 version, if not you know where your other version is coming from. – Evil Genius Mar 20 '14 at 17:52
  • hmm, yeah I was messing around with that earlier. Have added the output above but can't see any version of Geos?! – marty_c Mar 20 '14 at 18:03
  • Yeah it doesn't say it directly, but it does indicate that the geos library being shipped with the MrSID SDK is being used instead of the system one (which would be in /usr/lib in most cases). You may try removing that from the PATH/LD_PATH but that will likely break your MrSID support if it's not compatible with the newer version. – Evil Genius Mar 20 '14 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.