[issue2145] ctypes.util.find_library(): posix .so without SONAME

STINNER Victor report at bugs.python.org
Wed Feb 20 23:59:50 CET 2008

STINNER Victor added the comment:

« haypo, can you please give precise instructions on how to reproduce 
this problem? »

Sure. Download http://www.ragestorm.net/distorm/dl.php?id=11 
(distorm-pkg1.7.28.tar.bz2), go to build/linux/. Then compile it 
with "make" and install it using make install.

a) what operating system are you using?

I'm using Ubuntu Gutsy, kernel 2.6.22, libc 2.6.1, ld 2.6.1, Python 

b) what parameters are you passing to find_library?

LIB_FILENAME = find_library('distorm64')

c) what result are you getting?

The function _findLib_ldconfig(), used by find_library() internals, 
returns '/usr/local/lib/libdistorm64.so.1' but _get_soname() returns 
an empty string.

d) what result are expecting instead?

_get_soname(filename) should returns filename instead of None (and not 
basename(filename) as I proposed).


libdistorm64.so is not a "real" library, but i'm able to use it with 
cdll.LoadLibrary(). So I think that it can be considered as a Python 
(ctypes) bug.

PS: Why note text box is so small (5 lines) in this bug report???

Tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list