STINNER Victor <vstin...@redhat.com> added the comment:

To come back to RPATH vs RUNPATH: these 2 are very different in term of 
priorities in search (see other comments).

distutils uses an heuristic to opt-in for RUNPATH using GNU ld 
--enable-new-dtags option. This option is only used if the following 3 
conditions are met:

(1) the OS is not macOS, not FreeBSD, nor HP-UX
(2) the C compiler is detected as GCC
(3) Python detected the linker as being GNU ld

Problem: the heuristic is not very reliable:

(3) only checks the linker when Python is build, it's implemented as: 
sysconfig.get_config_var("GNULD") == "yes". In practice, the linker can be 
changed at runtime using environment variables and so Python may miss the 
oportunity for opt-in for --enable-new-dtags, or pass this option which is 
unknown to another linker.

(2) The detection of GCC checks for "gcc" or "g++" string if the name of the 
compiler program name. If you use "cc", it's not detected as GCC.

I'm not sure that these 2 problems are real problems "in practice".

My main concern is that you might get RPATH or RUNPATH depending on operating 
system, the C compiler and the linker, whereas RPATH semantics is very 
different from RUNPATH semantics (search priority).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36659>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to