Opened 12 years ago
Closed 7 years ago
#36109 closed defect (worksforme)
libxml2 2.8.0 breaks postgis2 2.0.1
Reported by: | cmutel (Chris Mutel) | Owned by: | Veence (Vincent) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | 0xced (Cédric Luthi), cooljeanius (Eric Gallager) | |
Port: | libxml2 postgis2 |
Description
Installing libxml2 2.8.0 leads to this behaviour:
cocoa=# select postgis_full_version(); ERROR: could not load library "/opt/local/lib/postgresql91/postgis-2.0.so": dlopen(/opt/local/lib/postgresql91/postgis-2.0.so, 10): Library not loaded: /opt/local/lib/libxml2.2.dylib Referenced from: /opt/local/lib/postgresql91/postgis-2.0.so Reason: Incompatible library version: postgis-2.0.so requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0
Reverting to 2.7.8 (and forcing a rebuild of postgis2) solves the problem.
I am not wise enough to understand what is breaking here (it could be on either end).
BTW, the most recent version of libxml2 is already 2.9.0.
Change History (13)
comment:1 Changed 12 years ago by jmroot (Joshua Root)
Cc: | vince@… cedric.luthi@… added; jmr@… removed |
---|---|
Keywords: | libxml2 postgis2 removed |
Port: | postgis2 added |
comment:2 Changed 12 years ago by cmutel (Chris Mutel)
OK, so I get the same results:
emerson:~ cmutel$ otool -L /opt/local/lib/libxml2.2.dylib /opt/local/lib/libxml2.2.dylib: /opt/local/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.8.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5) /opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0) emerson:~ cmutel$ sudo port -n -f deactivate libxml2 @2.7.8_0+universal ---> Deactivating libxml2 @2.7.8_0+universal Warning: Deactivate forced. Proceeding despite dependencies. ---> Cleaning libxml2 emerson:~ cmutel$ sudo port activate libxml2 @2.8.0_0+universal ---> Computing dependencies for libxml2 ---> Activating libxml2 @2.8.0_0+universal ---> Cleaning libxml2 emerson:~ cmutel$ otool -L /opt/local/lib/libxml2.2.dylib /opt/local/lib/libxml2.2.dylib: /opt/local/lib/libxml2.2.dylib (compatibility version 11.0.0, current version 11.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.7) /opt/local/lib/liblzma.5.dylib (compatibility version 6.0.0, current version 6.4.0) /opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
I guess the problem is then with postgis2 (though it does seem strange...). But I do get this problem consistently, so I guess there is something real here, and not just a problem with my configuration.
comment:3 Changed 12 years ago by jmroot (Joshua Root)
Do the architectures match?
port -v installed libxml2 postgis2 lipo -info /opt/local/lib/libxml2.2.dylib /opt/local/lib/postgresql91/postgis-2.0.so
Are any DYLD_* variables set in the environment?
comment:4 Changed 12 years ago by cmutel (Chris Mutel)
If no one else is experiencing this bug, it should probably be closed. I guess there is some other confounding configuration parameter on my side.
comment:5 Changed 12 years ago by anddam (Andrea D'Amore)
Resolution: | → fixed |
---|---|
Status: | new → closed |
In a similar situation with updated packages (libxml2 2.9 with declared compatibility 12.0.0, dyld complains about postgis-2.0.so requiring 11.0.0) rebuilding postgis2 port fixed the issue.
I'm not sure what's keeping a reference to the older libxml2 version, there's no DYLD_LIBRARY_PATH set and all the other versions of libxml2.2.dylib I can find on the system are declaring compatibility 10.0.0 so dyld wasn't trying to link any of them since the error message explicitly mentions 11.0.0.
Weird and I wouldn't even know how to reproduce it on purpose. I'd close as wontfix or worksforme.
comment:6 Changed 12 years ago by anddam (Andrea D'Amore)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:7 Changed 12 years ago by cooljeanius (Eric Gallager)
I'd close as wontfix or worksforme.
...so then why'd you reopen it? (not that I mind; just wondering...)
comment:8 Changed 12 years ago by chuanjiabao1981@…
I use libxml2 2.9.0 and I have the same problem. I got the error below: "Reason: Incompatible library version: postgis-2.0.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 11.0.0".
comment:10 Changed 10 years ago by tim.holahan@…
I spent several hours wrestling with this today (postgis 2.1 and libxml 2.9.2). I'm not sure why, but forcing the uninstall of both libxml2 and libxslt finally resolved it. I got the idea from this page on nokogiri issues with libxml2:
https://github.com/sparklemotion/nokogiri/wiki/What-to-do-if-libxml2-is-being-a-jerk
The follow two commands did the job:
sudo port -f uninstall libxml2 libxslt sudo port install libxml2 libxslt
I hope that helps.
comment:11 Changed 7 years ago by mf2k (Frank Schima)
Is this still an issue with postgis2 2.4.2 and libxml2 2.9.7?
comment:12 Changed 7 years ago by mf2k (Frank Schima)
Cc: | Veence removed |
---|---|
Owner: | changed from macports-tickets@… to Veence |
Status: | reopened → assigned |
comment:13 Changed 7 years ago by Veence (Vincent)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
I suppose no. Closing this.
2.8.0 provides version 11.0.0 here: