GrahamDumpleton/mod_wsgi

invalid-looking DT_RUNPATH: /usr/lib64/python3.12/config

hroncok opened this issue · 2 comments

Hello. When building mod_wsgi in CentOS Stream fro the Python 3.12 stack, rpminspect told us that:

/usr/lib64/python3.12/site-packages/mod_wsgi/server/mod_wsgi-py312.cpython-312-x86_64-linux-gnu.so has an invalid-looking DT_RUNPATH on x86_64: /usr/lib64/python3.12/config

This is indeed suspicious, there is no /usr/lib64/python3.12/config and there never was such a directory in Python 3. I only see this on Python 2.7. In other words, /usr/lib64/python2.7/config exists, but /usr/lib64/python3.X/config does not (at least since 3.6). The path on x86_64 Linux is /usr/lib64/python3.12/config-3.12-x86_64-linux-gnu/

This suspicious path originates in:

PYTHON_CFGDIR = get_python_lib('platstdlib') + '/config'

Later it is amended:

mod_wsgi/setup.py

Lines 298 to 301 in f54eadd

if PYTHON_LDVERSION and PYTHON_LDVERSION != PYTHON_VERSION:
PYTHON_CFGDIR = '%s-%s' % (PYTHON_CFGDIR, PYTHON_LDVERSION)
if not os.path.exists(PYTHON_CFGDIR):
PYTHON_CFGDIR = '%s-%s' % (PYTHON_CFGDIR, sys.platform)

However, this amendment would only make it /usr/lib64/python3.12/config-3.12-linux/ and it is guarded by the if that is False (unless building a debug build etc.).

I don't know why this value is even needed in PYTHON_LDFLAGS, PYTHON_LDLIBS and LD_RUN_PATHS. However, if you really want it, I found it in sysconfig.get_config_var("LIBPL") (on Python 2.7 and 3.6+).

However, note that there is nothing relevant in this directory to link to on Python 3.

There is /usr/lib64/python2.7/config/libpython2.7.so but there is no .so file in /usr/lib64/python3.6/config-3.6m-x86_64-linux-gnu/ or newer.

Olha estas atribuição esta sendo Windows 11 que esta direcionando