Gentoo Archives: gentoo-user

From: Mike Gilbert <floppym@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] python build fail; undefined reference to pthread_* and sem_*
Date: Wed, 11 Oct 2017 15:56:52
Message-Id: CAJ0EP41Ri8arbcnPz0y5NbcD3SL4NoTCE5UU46Uv1qNV0bmRBQ@mail.gmail.com
In Reply to: Re: [gentoo-user] python build fail; undefined reference to pthread_* and sem_* by Mike Gilbert
1 On Wed, Oct 11, 2017 at 11:50 AM, Mike Gilbert <floppym@g.o> wrote:
2 > On Wed, Oct 11, 2017 at 12:16 AM, Walter Dnes <waltdnes@××××××××.org> wrote:
3 >> This is happening with both python 2.7.12 and 3.4.5 on a 32-bit x86
4 >> system. Build logs are attached, along with "emerge --info" output. I
5 >> can't find anything relevant in bugzilla.
6 >
7 > From the build log for 3.4.5:
8 >
9 > checking whether pthreads are available without options... yes
10 >
11 > This is clearly a lie; glibc requires that you pass "-pthread" to gcc
12 > to enable pthreads. For some reason, configure is mis-detecting this.
13 >
14 > I would try rebuilding with minimal CFLAGS.
15
16 I can reproduce the issue by adding -fopenmp to my CFLAGS. You can
17 work around it by adding -fopenmp to LDFLAGS as well.
18
19 This is probably a bug in the Python build system; it should probably
20 be passing CFLAGS to gcc when linking libpython.

Replies

Subject Author
Re: [gentoo-user] python build fail; undefined reference to pthread_* and sem_* Walter Dnes <waltdnes@××××××××.org>