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