[issue2145] ctypes.util.find_library(): posix .so without SONAME
STINNER Victor
report at bugs.python.org
Wed Feb 20 01:58:00 CET 2008
New submission from STINNER Victor:
ctypes.util.find_library() fails to locate distorm64.so library
because it has no SONAME entry:
$ objdump -p -j .dynamic /usr/local/lib/libdistorm64.so
/usr/local/lib/libdistorm64.so: file format elf32-i386
(...)
Dynamic Section:
NEEDED libc.so.6
INIT 0x12f4c
FINI 0x1bf84
HASH 0xb4
(...)
Compare to libm.so:
$ objdump -p -j .dynamic /usr/lib/libm.so
/usr/lib/libm.so: file format elf32-i386
(...)
Dynamic Section:
NEEDED ld-linux.so.2
NEEDED libc.so.6
SONAME libm.so.6
INIT 0x335c
(...)
I don't know why find_library() does use objdump to get SONAME.
Workaround to find_library() "bug": _get_soname() should return
os.path.basename(f) instead of None. Is it correct?
Note: libdistorm64.so compilation is maybe broken (it's maybe not
a "real" so library), but I'm able to use it with ctypes :-)
----------
components: Library (Lib)
messages: 62580
nosy: haypo
severity: normal
status: open
title: ctypes.util.find_library(): posix .so without SONAME
type: rfe
versions: Python 2.5
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2145>
__________________________________
More information about the Python-bugs-list
mailing list