Open GoogleCodeExporter opened 9 years ago
It looks like the build of the python binding .so is simply link-incompatible
with python. if you dump the libtorrent.so python binding (this file:
"/usr/local/lib64/python2.7/site-packages/deluge-1.3.5-py2.7-linux-x86_64.egg/de
luge/libtorrent.so"). Does it look like what you would expect?
is it the same architecture as python itself (32bit vs. 64 bit for instance).
As far as I can tell, the libtorrent binding code is never touched in this
crash.
Original comment by arvid.no...@gmail.com
on 9 Aug 2012 at 10:47
Thanks for the hints. I hate being so clueless, but I'm not certain
what you mean by "dump", and I don't know if it looks like what I'd
expect because I don't have sufficient knowledge about the details of
dynamic libraries to have expectations. :-(
They're both the same architecture:
bash-4.2# file /usr/bin/python2.7
/usr/bin/python2.7: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.16,
BuildID[sha1]=0x2159bd8ac2a26ecf3d1a20e7df7ffd42f46e5704, stripped
bash-4.2# file
/usr/local/lib64/python2.7/site-packages/deluge-1.3.5-py2.7-linux-x86_64.egg/del
uge/libtorrent.so
/usr/local/lib64/python2.7/site-packages/deluge-1.3.5-py2.7-linux-x86_64.egg/del
uge/libtorrent.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux),
dynamically linked, BuildID[sha1]=0x145e11dd64df5c50d16618908b274ef128855a91,
not stripped
Those both look OK to me. A simple objdump looks OK to my uneducated eye:
bash-4.2# objdump -f
/usr/local/lib64/python2.7/site-packages/deluge-1.3.5-py2.7-linux-x86_64.egg/del
uge/libtorrent.so
/usr/local/lib64/python2.7/site-packages/deluge-1.3.5-py2.7-linux-x86_64.egg/del
uge/libtorrent.so: file format elf64-x86-64
architecture: i386:x86-64, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x00000000001f9c60
I'm guessing that I'm (or rather, deluge is) building libtorrent with
incorrect switches. Eliding the repetition in the build log, the
compiles look like this:
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g -fPIC -I./libtorrent -I./libtorrent/include
-I./libtorrent/include/libtorrent -I/usr/include/python2.7 -I/usr/include -I
-I/usr/include/python2.7 -c ./libtorrent/src/http_stream.cpp -o
build/temp.linux-x86_64-2.7/./libtorrent/src/http_stream.o
-D_FILE_OFFSET_BITS=64 -DNDEBUG -DTORRENT_USE_OPENSSL=1
-DBOOST_FILESYSTEM_VERSION=2 -O2 -Wno-missing-braces
and the link is:
gcc -pthread -shared build/temp.linux-x86_64-2.7/./libtorrent/src/http_stream.o
... -L/usr/lib64 -L/opt/local/lib -L/usr/lib64 -lboost_filesystem-mt
-lboost_date_time-mt -lboost_iostreams-mt -lboost_python-mt -lboost_thread-mt
-lpthread -lssl -lz -lpython2.7 -o
build/lib.linux-x86_64-2.7/deluge/libtorrent.so
Original comment by ge...@cs.hmc.edu
on 10 Aug 2012 at 7:56
Original issue reported on code.google.com by
ge...@cs.hmc.edu
on 9 Aug 2012 at 7:59Attachments: