Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hroncok opened this issue Jan 15, 2024 · 2 comments · May be fixed by #873
Open

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

hroncok opened this issue Jan 15, 2024 · 2 comments · May be fixed by #873

Comments

@hroncok
Copy link

hroncok commented Jan 15, 2024

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+).

@hroncok
Copy link
Author

hroncok commented Jan 15, 2024

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.

hroncok added a commit to hroncok/mod_wsgi that referenced this issue Jan 15, 2024
…is no libpython

The PYTHON_CFGDIR variable is more or less something like /usr/lib64/python3.12/config.

Not only does this directory not exists on Python 3.6+ (it is called differently),
but there is no libpython.so in it.
Adding it to LD paths makes no difference.

I could fix up the way the path is determined,
but I decided not to touch this code not to break old use cases.

Instead, the directory is only added to LD paths when there is something relevant in it.

Fixes GrahamDumpleton#872
hroncok added a commit to hroncok/mod_wsgi that referenced this issue Jan 15, 2024
…is no libpython

The PYTHON_CFGDIR variable is more or less something like /usr/lib64/python3.12/config.

Not only does this directory not exist on Python 3.6+ (it is called differently),
but there is no libpython.so in it.
Adding it to LD paths makes no difference.

I could fix up the way the path is determined,
but I decided not to touch this code not to break old use cases.

Instead, the directory is only added to LD paths when there is something relevant in it.

Fixes GrahamDumpleton#872
@jebaandrade
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants