-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
libpython should not be linked with libcrypt #89596
Comments
In https://bugs.python.org/issue44751, crypt.h was removed from Python.h. This would imply that libpython is not meant to expose any crypt-related symbols. In fact, it looks like libpython does not use crypt() or crypt_r() at all. These are only used by cryptmodule. In configure.ac, we have this this logic to determine if crypt_r() is available:
The AC_SEARCH_LIBS macro adds "-lcrypt" to LIBS, and this gets passed down to the link command for libpython. This is probably not intentional. The HAVE_CRYPT_R value is used in _cryptmodule.c. setup.py performs its own check for libcrypt when building the module. I think the value of LIBS should be saved before the AC_SEARCH_LIBS calls and restored after the AC_CHECK_FUNC call. I have tested this locally on Gentoo Linux, and it seems to work fine. I will work on a pull request. |
Nicely spotted, thanks for the fix! I prefer to not backport to avoid any risk of regression. In my experience, the build system is fragile. |
Fixed upstream in Python3.11 via python/cpython#89596 Backport here to Python3.10 so libpython doesn't have a needless system dependency on libcrypt (which is different on Linux between RH-based and Debian-based distros too).
Fixed upstream in Python3.11 via python/cpython#89596 Backport here to Python3.10 so libpython doesn't have a needless system dependency on libcrypt (which is different on Linux between RH-based and Debian-based distros too).
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: