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 <>
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:

EasyBuild is one example that builds Python with that env var set:

Very related to as the issue is similar: Flag passed during configure not used by distutils.
Date User Action Args
2020-01-10 11:54:59Alex Grundsetrecipients: + Alex Grund, eric.araujo, dstufft
2020-01-10 11:54:59Alex Grundsetmessageid: <>
2020-01-10 11:54:59Alex Grundlinkissue39286 messages
2020-01-10 11:54:58Alex Grundcreate