This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Configure includes LIBS but does not pass it to distutils
Type: Stage: resolved
Components: Build, Distutils Versions: Python 3.9, Python 3.8, Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Alex Grund, dstufft, eric.araujo, steve.dower
Priority: normal Keywords:

Created on 2020-01-10 11:54 by Alex Grund, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg359721 - (view) Author: Alex Grund (Alex Grund) Date: 2020-01-10 11:54
When configuring with `LIBS=-lpthread` env var set, the pthread detection assumes that no flag is necessary and distutils will build all extensions without any flag for pthreads. This will make them fail, when they use certain pthread symbols on certain platforms

Example: On Power9 libpthread is a linker script which does not only link in the dynamic library but also a static part which contains e.g. pthread_atfork. As the extension is linked against libpython and that is linked against libpthread the extension has access to all symbols from the dynamic library, but not to any from the static library (if one exists). This makes extensions fail to build on Power9.

Related issue as an example: https://github.com/scipy/scipy/issues/11323

EasyBuild is one example that builds Python with that env var set: https://github.com/easybuilders/easybuild-framework/issues/3154

Very related to https://bugs.python.org/issue31769 as the issue is similar: Flag passed during configure not used by distutils.
msg386261 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:07
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools
History
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83467
2021-02-03 18:07:55steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386261

resolution: out of date
stage: resolved
2020-01-10 11:54:59Alex Grundcreate