From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9324A1396D9 for ; Wed, 11 Oct 2017 15:56:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD274E0E56; Wed, 11 Oct 2017 15:56:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 58BD7E0DD1 for ; Wed, 11 Oct 2017 15:56:46 +0000 (UTC) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 2F7FD33BEBE for ; Wed, 11 Oct 2017 15:56:45 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id t69so6060289wmt.2 for ; Wed, 11 Oct 2017 08:56:45 -0700 (PDT) X-Gm-Message-State: AMCzsaXj+8FDvPVYM9YuVedbID6uG0bvcQ2qvTcCURyaKq7ypNLHKM4m 0bjgnSzQyScPxnbN6b9J4LX5IWUR62S/g2t24Vk= X-Google-Smtp-Source: AOwi7QCZ3N4x8Zp8ufbMYkZKalOGXykdi2w5mBuo5iU16ta/mnoV5a1HUqF+MAa3Hb9qxJFiqtDxd8oiUlxHu2Io7EI= X-Received: by 10.223.161.74 with SMTP id r10mr93746wrr.8.1507737402377; Wed, 11 Oct 2017 08:56:42 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.223.130.197 with HTTP; Wed, 11 Oct 2017 08:56:21 -0700 (PDT) In-Reply-To: References: <20171011041659.GA15678@waltdnes.org> From: Mike Gilbert Date: Wed, 11 Oct 2017 11:56:21 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-user] python build fail; undefined reference to pthread_* and sem_* To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 70ff6133-e7fc-4f33-b487-6e3401d1a2c1 X-Archives-Hash: 129230248ad39bb103e7480d0ec6ea3d On Wed, Oct 11, 2017 at 11:50 AM, Mike Gilbert wrote: > On Wed, Oct 11, 2017 at 12:16 AM, Walter Dnes wrote: >> This is happening with both python 2.7.12 and 3.4.5 on a 32-bit x86 >> system. Build logs are attached, along with "emerge --info" output. I >> can't find anything relevant in bugzilla. > > From the build log for 3.4.5: > > checking whether pthreads are available without options... yes > > This is clearly a lie; glibc requires that you pass "-pthread" to gcc > to enable pthreads. For some reason, configure is mis-detecting this. > > I would try rebuilding with minimal CFLAGS. I can reproduce the issue by adding -fopenmp to my CFLAGS. You can work around it by adding -fopenmp to LDFLAGS as well. This is probably a bug in the Python build system; it should probably be passing CFLAGS to gcc when linking libpython.