bpo-45433: Do not link libpython against libcrypt #28881
Conversation
Would you mind to add a NEWS entry? See https://devguide.python.org/ IMO it's worth it to mention the change in the "Build Changes" of What's New in Python 3.11: Doc/whatsnew/3.11.rst. |
Added the NEWS entry. |
Can you please also mention the change in the "Build Changes" of What's New in Python 3.11: Doc/whatsnew/3.11.rst? |
Save/restore LIBS when calling AC_SEARCH_LIBS(..., crypt). This avoid linking libpython with libcrypt.
Sorry, I thought adding the NEWS entry would somehow auto-update the whatsnew document. I added an entry to the latter. |
How can I check https://bugs.python.org/issue45433 manually? On Fedora, /usr/lib64/libpython3.10.so.1.0 is not linked to libcrypt. |
I think most distros build with LDFLAGS="-Wl,--as-needed". That causes unused libraries to get automatically dropped by the linker. There are a couple of alternate things to check:
|
I tested manually this PR and I confirm that it works as expected. I build Python with Without this change, libpython is linked to libcrypt by mistake:
With this change, libcrypt is gone as expected:
|
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. |
Save/restore LIBS when calling AC_SEARCH_LIBS(..., crypt). This avoid
linking libpython with libcrypt.
https://bugs.python.org/issue45433
The text was updated successfully, but these errors were encountered: