Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634064 - dev-lang/python builds fail with "-fopenmp" in CFLAGS/CXXFLAGS
Summary: dev-lang/python builds fail with "-fopenmp" in CFLAGS/CXXFLAGS
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: https://bugs.python.org/issue31769
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-12 02:09 UTC by Walter Dnes
Modified: 2017-10-12 03:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Failed dev-lang/python build (python-3.4.5.log.gz,8.74 KB, application/gzip)
2017-10-12 02:09 UTC, Walter Dnes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Dnes 2017-10-12 02:09:41 UTC
Created attachment 498412 [details]
Failed dev-lang/python build

Python build fails (2.7.12 and 3.4.5) when "-fopenmp" is included in CFLAGS/CXXFLAGS. System is 32-bit Gentoo x86. See attachment. As per floppym@gentoo.org on Gentoo-users in posts https://archives.gentoo.org/gentoo-user/message/08ad9212df9ce315fdc80367feff5e2a and https://archives.gentoo.org/gentoo-user/message/129230248ad39bb103e7480d0ec6ea3d

> glibc requires that you pass "-pthread" to gcc to enable
> pthreads. For some reason, configure is mis-detecting this.

Temporary workaround that builds properly...

LDFLAGS="-fopenmp" emerge =dev-lang/python-2.7.12 =dev-lang/python-3.4.5
Comment 1 Mike Gilbert gentoo-dev 2017-10-12 03:14:51 UTC
For reference, the gcc manual says that -fopenmp implies -pthread.

https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/C-Dialect-Options.html#index-fopenmp

When testing whether the compile needs -pthread for pthread support, Python's configure script includes the user's CFLAGS. It probably should not do that.