-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
lib-dynload
installed in wrong location on a 64-bit system when CONFIG_SITE
is set
#108819
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
Comments
I tried to narrow down the source of the problem.
which I think is the reason
while the remaining files, which depend on The solution is to clear
there were no errors. This mismatch between |
lib-dynload
installed in wrong location on openSUSE while building CPythonlib-dynload
installed in wrong location on a 64-bit system when CONFIG_SITE
is set
I successfully reproduced the issue using Docker.
|
Hit the same problem installing 3.11.7 on openSUSE Leap 15.5. |
Could someone vet this? It looks like the solution would be to place everything in |
I had the same problem when installing 3.12.4 on Rocky 8 & 9. You can add --with-platlibdir to specify platform-specific library directory. In my case, I use the following script to config building ./configure --prefix=/usr --enable-optimizations --with-platlibdir=lib64 Result Python 3.12.4 (main, Aug 1 2024, 12:38:12) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', '/usr/lib64/python312.zip', '/usr/lib64/python3.12', '/usr/lib64/python3.12/lib-dynload', '/usr/lib64/python3.12/site-packages', '/usr/lib/python3.12/site-packages']
>>> print(sys.platlibdir)
lib64 Not necessary to create symlink for lib-dynload anymore. |
We look for the pure-Python part of the standard library in PLATSTDLIBDIR, which may not match the default LIBDIR subdir. From ``getpath.py``: ```python ... STDLIB_SUBDIR = f'{platlibdir}/python{VERSION_MAJOR}.{VERSION_MINOR}{ABI_THREAD}' STDLIB_LANDMARKS = [f'{STDLIB_SUBDIR}/os.py', f'{STDLIB_SUBDIR}/os.pyc'] PLATSTDLIB_LANDMARK = f'{platlibdir}/python{VERSION_MAJOR}.{VERSION_MINOR}{ABI_THREAD}/lib-dynload' ... ``` Signed-off-by: Filipe Laíns <[email protected]>
@tfpf, thank you for looking into this issue, I agree that your issue is likely due to a mismatch between the values used for If it isn't, that, at least, is an issue, given the current |
Bug report
Checklist
and am confident this bug has not been reported before
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.0a0 (heads/main:d4e534cbb3, Sep 2 2023, 21:58:58) [GCC 13.2.1 20230803 [revision cc279d6c64562f05019e1d12d0d825f9391b5553]]
A clear and concise description of the bug:
On openSUSE Tumbleweed 20230823, when CPython is compiled from source,
lib-dynload
is placed in/usr/local/lib64/python3.13
./usr/local/lib/python3.13
.As a result, the interpreter is unable to locate some modules like
readline
(even thoughreadline-devel
is installed) and_posixsubprocess
.Here are the exact commands I ran.
Symlinking
lib-dynload
fixed the problem for me:but I believe everything should go in
/usr/local/lib
, as happens on other Linux distributions I have used.Linked PRs
The text was updated successfully, but these errors were encountered: