[Bugs] [Bug 1450593] Gluster Python scripts do not check return value of find_library
bugzilla at redhat.com
bugzilla at redhat.com
Sat May 13 15:37:04 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1450593
--- Comment #3 from nh2 <nh2-redhatbugzilla at deditus.de> ---
After having looked more, `find_library()` is the wrong tool for the job.
It should not be used at all by gluster, because it does not consider
LD_LIBRARY_PATH at all for finding libraries.
This has been a long-standing bug in Python since 2008, and it was finally
fixed by Python 3.6:
https://bugs.python.org/issue9998
https://hg.python.org/cpython/rev/385181e809bc
But gluster doesn't require Python >= 3.6, it uses python2, which doesn't have
this fix and will not receive it.
The right solution for gluster is probably to directly call
ctypes.CDLL("libmylibrary.so", ...)
as is done in
https://github.com/gluster/glusterfs/blob/v3.10.1/tests/features/ipctest.py#L10
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list