From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_SBL, URIBL_SBL_A shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 602411F453 for ; Wed, 23 Jan 2019 20:50:03 +0000 (UTC) Received: from localhost ([127.0.0.1]:41551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmPTF-0004IZ-Ko for normalperson@yhbt.net; Wed, 23 Jan 2019 15:50:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmPT7-0004AT-Im for bug-gnulib@gnu.org; Wed, 23 Jan 2019 15:49:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmPOX-00079d-Up for bug-gnulib@gnu.org; Wed, 23 Jan 2019 15:45:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55155) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmPOX-00079K-Ou for bug-gnulib@gnu.org; Wed, 23 Jan 2019 15:45:09 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7E2C33F21B; Wed, 23 Jan 2019 20:45:08 +0000 (UTC) Received: from localhost (ovpn-117-203.ams2.redhat.com [10.36.117.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id 829C75C238; Wed, 23 Jan 2019 20:45:07 +0000 (UTC) Date: Wed, 23 Jan 2019 20:45:06 +0000 From: "Richard W.M. Jones" To: Bruno Haible Subject: Re: test-rwlock1 failing on latest Fedora Rawhide Message-ID: <20190123204506.GB12500@redhat.com> References: <20190123193730.GA9768@redhat.com> <1903559.vGX8tUDGlp@omega> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1903559.vGX8tUDGlp@omega> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 23 Jan 2019 20:45:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On Wed, Jan 23, 2019 at 09:01:19PM +0100, Bruno Haible wrote: > Hi Rich, > > > I cannot reproduce this locally, hence my bug report is rather devoid > > of details. However, it's 100% reproducible in Koji (the Fedora > > Rawhide build system) on *all* architectures except armv7: > > > > FAIL: test-rwlock1 > > ================== > > Unexpected outcome 3 > > FAIL: test-thread_create > > As written in [1]: > "Unexpected outcome 3" means that the test program could not create a second > thread (other than the main thread). > > On glibc systems, this typically means that the 'test-rwlock1' program has not > been linked with '-lpthread'. > > > The full log is here: > > > > https://kojipkgs.fedoraproject.org//work/tasks/4382/32214382/build.log > > The configure command-line looks right. > > I see > LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' > > A global "-Wl,--as-needed" has the effect of removing libraries like > -lpthread from the link. Which would explain the symptom. Ahhhhhhh, that would also explain why I couldn't reproduce it. I was using the default flags when I was testing locally. Using the Fedora flags, I *can* reproduce it locally, thanks! > What do the other elements of LDFLAGS do? All the flags AFAIK come from Fedora and are needed for hardening or other Fedora policy purposes. I checked the history of the Fedora package which adds these flags, and it seems like --as-needed was added for: https://fedoraproject.org/wiki/Changes/RemoveExcessiveLinking Removing -Wl,--as-needed fixes the problem. However I'm still unclear about this. Is Fedora wrong? Is hivex using gnulib wrongly? Is gnulib wrong? Rich. > Bruno > > [1] http://lists.gnu.org/archive/html/coreutils/2018-02/msg00020.html -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v