[issue31769] configure includes user CFLAGS testing detecting pthreads support
Mike Gilbert
report at bugs.python.org
Wed Oct 11 23:33:29 EDT 2017
New submission from Mike Gilbert <floppymaster at 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 <report at bugs.python.org>
<https://bugs.python.org/issue31769>
_______________________________________
More information about the Python-bugs-list
mailing list