On Mon, Apr 26, 2010 at 09:44:52AM +0200, Josselin Mouette wrote: > Le dimanche 25 avril 2010 à 19:37 +0100, Floris Bruynooghe a écrit : > > You could try setting RUNPATH/RPATH into the extension module. If > > it's using distutils you can use --rpath to setup.py build_ext, see > > the --help of the build_ext sub-command. > > Unfortunately that won’t work, since the rpath used by dlopen() is the > one provided by the binary, not the one for the module being loaded.
You are correct, I drew the wrong conclusions from some earlier experience but upon checking the dlopen manual I see my memory must have gotten confused over time. > This is a known issue with interpreters, and no one has been able to > provide a decent solution. > > A possible way would be to make a wrapper Python extension, that would > parse the module for its NEEDED components and load them manually using > the given rpath before loading the actual module. > > Which in turn will not be possible since there is no shared version of > libbfd - which would be required for doing this. Is it not possible to do it with just including elf.h and using the structures in there to find the relevant NEEDED and RPATH/RUNPATH tags in the dynamic section? It seems like a substantial amount of code would be required tough. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org -- To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100426100441.gb13...@laurie.devork