[libtorrent] Python bindings on MacOS X
Brought to you by:
arvidn
From: Karl K. <kue...@gm...> - 2010-09-09 19:46:08
|
I am trying to get libtorrent 0.15.x built for MacOS X 10.6.4 for the last couple of days, and have it finally building universal binaries, but now that I have something build when I try to "import" it into Python I am getting the message "ImportError: dynamic module does not define init function (initlibtorrent)", and am at a bit of a loss as to what that means. Here is the route I am taking: 1) Download libtorrent 0.15.3 and boost 1.44 from their respective sites, unwrap them 2) Compiled (but not installed) boost: cd /path/to/boost/source ./bootstrap.sh ./bjam link=static 3) Configured, compiled, and installed libtorrent with Python bindings: cd /path/to/libtorrent/source export BOOST_ROOT=/path/to/boost/source export CFLAGS="-arch i386 -arch ppc -arch x86_64" export LDFLAGS="-arch i386 -arch ppc -arch x86_64" ./configure --enable-static --enable-python-binding --enable-dht --enable-debug --with-boost --disable-dependency-tracking --enable-deprecated-functions make sudo make install 4) Tried to use it in python: (inside the python interpreter) import sys sys.path.append('/usr/local/lib/python2.6/site-packages') import libtorrent This last command is what gets me the error from above about a missing init function. I have tried a number of different versions of libtorrent (0.15.0, 0.15.1, 0.15.2) against both versions 1,44 and 1.43 of boost, and have tried making non-static versions, but have not been able to get versions that work (and the earlier versions of libtorrent have trouble with openssl). For reference, I am building on a clean install (laid down just for this project) of 10.6.4 with the latest non-beta version of XCode installed. The hardware is a MacPro, so is 64bit, but there should not be anything unusual about it. Thanks much to anyone who can provide any insight. -- Karl Kuehn la...@so... |