Incompatible library version

Ok,

So I checked my library versions:

[grbrenn:~]/$otool -L /usr/lib/libxml2.2.dylib
/usr/lib/libxml2.2.dylib:
/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 51.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

[grbrenn:~]/$otool -L /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so:
/opt/local/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.28.0)
/opt/local/lib/libexslt.0.dylib (compatibility version 9.0.0, current version 9.17.0)
/opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.1.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

It looks like one is compatibility version 12.0.0 and the other is compatibility version 10.0.0.

How do I set the Library or Library_PATH to point to the right version?

Thanks!

Greg

Hi Greg,

First, maybe see where the env vars are pointing now:

printenv LIBRARY_PATH
printenv LD_LIBRARY_PATH

e.g., does LIBRARY_PATH contain /usr/lib ?

I just looked at your message and it looks like you are comparing 2 different libraries:
/usr/lib/libxml2.2.dylib and
/…longpath to python2.7/site-packages/etree.so

Do you have a file called:
/opt/local/lib/libxml2.2.dylib ? This looks to be the newer version of libxml that you need

Maybe try to set the path to this library directly:

setenv LIBRARY_PATH /opt/local/lib:${LIBRARY_PATH} # If your shell is csh/tcsh
-or-
export LIBRARY_PATH=/opt/local/lib:${LIBRARY_PATH} # If your shell is bash, etc

Now try - whatever you were trying to do with obspy, I forget :slight_smile:

This should make the python interpreter find the newer version of libxml2.2.dylib first.
If not, then maybe LIBRARY_PATH is being changed back somewhere else when
python starts up.

Good luck!
-Mike