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.

Author Alex Grund
Recipients Alex Grund, dstufft, eric.araujo
Date 2020-01-10.11:54:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578657299.08.0.201349832459.issue39286@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-01-10 11:54:59Alex Grundsetrecipients: + Alex Grund, eric.araujo, dstufft
2020-01-10 11:54:59Alex Grundsetmessageid: <1578657299.08.0.201349832459.issue39286@roundup.psfhosted.org>
2020-01-10 11:54:59Alex Grundlinkissue39286 messages
2020-01-10 11:54:58Alex Grundcreate