New submission from Mike Gilbert <floppymas...@gmail.com>: When testing for ptheads support in the compiler, configure includes the CFLAGS value from the environment.
If CFLAGS contains -pthread, or an option which implies -pthread (like -fopenmp), this will cause configure to not include -pthread in the CC variable, and -pthread will not be passed to the linker. This ultimately leads to a link failure when building with glibc/gcc. gcc -Xlinker -export-dynamic -o python Programs/python.o libpython3.7m.a -ldl -lutil -lm libpython3.7m.a(thread.o): In function `PyThread_start_new_thread': /home/floppym/src/cpython/Python/thread_pthread.h:191: undefined reference to `pthread_attr_setstacksize' ---------- components: Build messages: 304200 nosy: floppymaster priority: normal severity: normal status: open title: configure includes user CFLAGS testing detecting pthreads support type: compile error versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31769> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com