Author vstinner
Recipients vstinner
Date 2019-04-18.16:02:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555603377.47.0.372532517765.issue36659@roundup.psfhosted.org>
In-reply-to
Content
Another test, without my PR 12876.

Python compiled without RPATH:

$ ./configure --prefix=/opt/py38
$ make
$ make install
$ /opt/py38/bin/python3.8 -m sysconfig|grep LIBDIR
	LIBDIR = "/opt/py38/lib"

Build lxml manually using "setup.py build_ext --rpath /opt/py38/lib" (which is equal to the Python sysconfig LIBDIR variable):

$ /opt/py38/bin/python3.8 -m venv ~/opt_env
$ wget https://files.pythonhosted.org/packages/7d/29/174d70f303016c58bd790c6c86e6e86a9d18239fac314d55a9b7be501943/lxml-4.3.3.tar.gz
$ tar -xf lxml-4.3.3.tar.gz 
$ cd lxml-4.3.3/
$ LD_LIBRARY_PATH=/opt/py38/lib ~/opt_env/bin/python setup.py build_ext --rpath /opt/py38/lib
$ objdump -a -x build/lib.linux-x86_64-3.8/lxml/etree.cpython-38m-x86_64-linux-gnu.so|grep -i rpath

^^ no output, no RPATH

Hum, distutils removed the RPATH because it's equal to Python sysconfig LIBDIR? Without my PR? Strange.

New try with a different RPATH:

$ rm -rf build
$ ~/opt_env/bin/python setup.py build_ext --rpath /custom/rpath
$ objdump -a -x build/lib.linux-x86_64-3.8/lxml/etree.cpython-38m-x86_64-linux-gnu.so|grep -i rpath
  RUNPATH              /custom/rpath

The RPATH is correctly written in the .so file.

... Now, I'm confused. Is PR 12876 useless? Was distutils already fixed?
History
Date User Action Args
2019-04-18 16:02:57vstinnersetrecipients: + vstinner
2019-04-18 16:02:57vstinnersetmessageid: <1555603377.47.0.372532517765.issue36659@roundup.psfhosted.org>
2019-04-18 16:02:57vstinnerlinkissue36659 messages
2019-04-18 16:02:57vstinnercreate