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 vstinner
Recipients vstinner
Date 2019-04-18.16:02:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 " 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
$ tar -xf lxml-4.3.3.tar.gz 
$ cd lxml-4.3.3/
$ LD_LIBRARY_PATH=/opt/py38/lib ~/opt_env/bin/python build_ext --rpath /opt/py38/lib
$ objdump -a -x build/lib.linux-x86_64-3.8/lxml/|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 build_ext --rpath /custom/rpath
$ objdump -a -x build/lib.linux-x86_64-3.8/lxml/|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?
Date User Action Args
2019-04-18 16:02:57vstinnersetrecipients: + vstinner
2019-04-18 16:02:57vstinnersetmessageid: <>
2019-04-18 16:02:57vstinnerlinkissue36659 messages
2019-04-18 16:02:57vstinnercreate