FS#35816 - [postgis] Error loading postgis-2.0.so ( possible missing link to json-c ? )
Attached to Project:
Community Packages
Opened by marco (marcoG74) - Sunday, 16 June 2013, 13:15 GMT
Last edited by Balló György (City-busz) - Tuesday, 24 December 2013, 10:05 GMT
Opened by marco (marcoG74) - Sunday, 16 June 2013, 13:15 GMT
Last edited by Balló György (City-busz) - Tuesday, 24 December 2013, 10:05 GMT
|
Details
Description:
Loading of postgis-2.0.so failed. ( Missing link to json-c ? ) Additional info: * Bug affects postgis 2.0.3-1, not present in previous version. * ldd /usr/lib/postgresql/postgis-2.0.so linux-vdso.so.1 (0x00007fff7d3fe000) libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0x00007f8cc9ce0000) libproj.so.0 => /usr/lib/libproj.so.0 (0x00007f8cc9a8d000) libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f8cc9725000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f8cc9426000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f8cc9079000) libgeos-3.3.8.so => /usr/lib/libgeos-3.3.8.so (0x00007f8cc8cd7000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f8cc89d2000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f8cc87bc000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8cc85b8000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f8cc83a1000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f8cc817e000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8cca1a3000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8cc7f61000) Steps to reproduce: On the first hand, I've got this error when browsing a postgis enabled database in PgAdmin3 (msg translated from italian ): ERROR loading "/usr/lib/postgresql/postgis-2.0.so" failed: /usr/lib/postgresql/postgis-2.0.so: undefined symbol: json_tokener_errors SQL Status: 58P01 On the second hand I've got this same error when trying to enable postgis extension on a newly created database: create extension postgis; or psql -d MYDATABASE -f /usr/share/postgresql/contrib/postgis-2.0/postgis.sql |
This task depends upon
Closed by Balló György (City-busz)
Tuesday, 24 December 2013, 10:05 GMT
Reason for closing: No response
Additional comments about closing: If you still get this problem, then contact with upstream.
Tuesday, 24 December 2013, 10:05 GMT
Reason for closing: No response
Additional comments about closing: If you still get this problem, then contact with upstream.
-- edit: for the convenience of those who might stumble on this looking to solve this issue, I've attached the aformentioned 2.0.2 PKGBUILD
I have not found any solution yet (I did not get the PKGBUILD to work). If I find anything I will post back.
Gentoo has two patches to fix the issue (for 2.0.2, but they worked for this version as well) available at: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-db/postgis/files/
After applying the patches, autogen.sh needed to be run again.
It works!
I've attached the two patches and the modified PKGBUILD (which might need to be cleaned up) in a tarball. I needed to modify the json patch to have the proper includes for Arch, but other than that, the patches are unchanged.
Rebuilding after the change. Note the fourth line of the output:
$ ldd /usr/lib/postgresql/postgis-2.0.so
linux-vdso.so.1 (0x00007fff06be9000)
libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0x00007f72d2441000)
libproj.so.0 => /usr/lib/libproj.so.0 (0x00007f72d21ee000)
libjson-c.so.2 => /usr/lib/libjson-c.so.2 (0x00007f72d1fe3000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f72d1c7a000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f72d197c000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f72d15cf000)
libgeos-3.3.8.so => /usr/lib/libgeos-3.3.8.so (0x00007f72d11ea000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f72d0ee6000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f72d0cd0000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f72d0acb000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f72d08b5000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f72d0692000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f72d2904000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f72d0475000)
EDIT: Added Robin's email.
Thanks!
So I made a PKGBUILD including it (it solves the bug): http://sprunge.us/fhJV
Looking forward to 2.0.3-2 in [community] with these fixes included, for the current postgis package in [community] just doesn't work at all.
Also maybe upstream?
Anyway, usual cleanliness/robustness fixes to dalef's PKGBUILD from postgis.tar (try and build in a folder with spaces in its name, and with -j3 in makepkg.conf, you'll need these fixes): http://sprunge.us/TWPS