boost linked to system python?
Andrew Berry
andrewberry at sentex.net
Sun Mar 14 09:39:51 PDT 2010
I'm working on creating a port for libtorrent-rasterbar, which requires boost +python25. I've got my port built and installed, but when I import the library I get the following error:
>>> import libtorrent
dlopen("/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/libtorrent.so", 2);
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
After some searching, I read that this sort of problem can happen when some libraries are linked against the system python instead of the macports python.
$ otool -L /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/libtorrent.so
/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/libtorrent.so:
/opt/local/lib/libtorrent-rasterbar.5.dylib (compatibility version 6.0.0, current version 6.0.0)
/opt/local/lib/libboost_python.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libGeoIP.1.dylib (compatibility version 6.0.0, current version 6.6.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/opt/local/lib/libboost_filesystem-d.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libboost_thread-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/opt/local/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/opt/local/lib/libboost_system-d.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
But, looking at the libboost python library:
$ otool -L /opt/local/lib/libboost_python-mt-d.dylib
/opt/local/lib/libboost_python-mt-d.dylib:
/opt/local/lib/libboost_python-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Python.framework/Versions/2.5/Python (compatibility version 2.5.0, current version 2.5.4)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
Is this the intended behaviour? A bug in the boost port? Or should I be linking my build against the system python?
Thanks,
--Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2676 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20100314/6c43c421/attachment.bin>
More information about the macports-users
mailing list