This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author automatthias
Recipients automatthias, jcea
Date 2013-10-22.07:52:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382428359.83.0.283963752576.issue19317@psf.upfronthosting.co.za>
In-reply-to
Content
The specific case that breaks for me is this:

OpeCSW Python package includes:

/opt/csw/bin/python2.6 (also 2.7, 3.3, etc)
/opt/csw/lib/libpython2.6.so.1.0
(other files)

On the operating system there is only:
/usr/lib/libpython2.4.so.1.0

Let's say there's libmagic installed in /opt/csw/lib, and there's no libmagic in /usr/lib. Let's suppose you run this:

ctypes.cdll.LoadLibrary('libmagic.so.1')

The OpenCSW Python will successfully load libmagic.so.1. But without the patch, find_library will not find libmagic.so.1, it will fail to translate 'magic' to 'libmagic.so.1', even though the libmagic.so symlink is present in /opt/csw/lib.

For the patch, the RPATH of the library itself doesn't matter, the important one is the RPATH of the Python executable itself, which influences what _ctypes.dlopen() does when looking for a library.

I could write a test by providing providing a sample /usr/ccs/bin/dump output and mocking out some libraries. Would that be good?
History
Date User Action Args
2013-10-22 07:52:39automatthiassetrecipients: + automatthias, jcea
2013-10-22 07:52:39automatthiassetmessageid: <1382428359.83.0.283963752576.issue19317@psf.upfronthosting.co.za>
2013-10-22 07:52:39automatthiaslinkissue19317 messages
2013-10-22 07:52:39automatthiascreate