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.7 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 5549D1F453 for ; Wed, 23 Jan 2019 22:51:25 +0000 (UTC) Received: from localhost ([127.0.0.1]:43093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmRMh-0003HW-93 for normalperson@yhbt.net; Wed, 23 Jan 2019 17:51:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmRMS-0003Cv-VH for bug-gnulib@gnu.org; Wed, 23 Jan 2019 17:51:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmRAO-0007rj-Vi for bug-gnulib@gnu.org; Wed, 23 Jan 2019 17:38:43 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:59338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmRAM-0007mq-E2 for bug-gnulib@gnu.org; Wed, 23 Jan 2019 17:38:40 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id BEE1672CA5F; Thu, 24 Jan 2019 01:38:28 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id B3AFF7CCE40; Thu, 24 Jan 2019 01:38:28 +0300 (MSK) Date: Thu, 24 Jan 2019 01:38:28 +0300 From: "Dmitry V. Levin" To: "Richard W.M. Jones" Subject: Re: test-rwlock1 failing on latest Fedora Rawhide Message-ID: <20190123223828.GA23722@altlinux.org> References: <20190123193730.GA9768@redhat.com> <1903559.vGX8tUDGlp@omega> <20190123204506.GB12500@redhat.com> <20190123210321.GA22317@altlinux.org> <20190123211430.GC12500@redhat.com> <20190123220952.GA23568@altlinux.org> <20190123222426.GE12500@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <20190123222426.GE12500@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 194.107.17.57 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, Bruno Haible Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 23, 2019 at 10:24:26PM +0000, Richard W.M. Jones wrote: > On Thu, Jan 24, 2019 at 01:09:52AM +0300, Dmitry V. Levin wrote: > > On Wed, Jan 23, 2019 at 09:14:30PM +0000, Richard W.M. Jones wrote: > > > On Thu, Jan 24, 2019 at 12:03:21AM +0300, Dmitry V. Levin wrote: > > > > Hi, > > > >=20 > > > > On Wed, Jan 23, 2019 at 08:45:06PM +0000, Richard W.M. Jones wrote: > > > > > On Wed, Jan 23, 2019 at 09:01:19PM +0100, Bruno Haible wrote: > > > > [...] > > > > > I checked the history of the Fedora package which adds these flag= s, and > > > > > it seems like --as-needed was added for: > > > > >=20 > > > > > https://fedoraproject.org/wiki/Changes/RemoveExcessiveLinking > > > > >=20 > > > > > Removing -Wl,--as-needed fixes the problem. However I'm still un= clear > > > > > about this. Is Fedora wrong? Is hivex using gnulib wrongly? Is > > > > > gnulib wrong? > > > >=20 > > > > We also build everything with --as-needed by default, but > > > > gnulib does the right thing nowadays by using > > > > -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state > > > > instead of plain -lpthread. > > >=20 > > > hivex is using a very recent gnulib (34290cb926). > > >=20 > > > The test is linked with: > > >=20 > > > /bin/sh ../../libtool --tag=3DCC --preserve-dup-deps --mode=3Dlink gc= c -O2 > > > -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 > > > -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong > > > -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 > > > -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric > > > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection > > > -Wl,-z,relro -Wl,--as-needed -Wl,-z,now > > > -specs=3D/usr/lib/rpm/redhat/redhat-hardened-ld -o test-thread_create > > > test-thread_create.o libtests.a ../../gnulib/lib/libgnu.la libtests.a > > > -pthread -Wl,--push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state > > >=20 > > > As you can see from the last bit, the --push-state ... --pop-state > > > seems correct. Yet the test still fails. > >=20 > > I see libtool is involved, and libtool is known to reorder arguments > > in a very unhelpful way. Could you show the actual link command invoked > > by libtool, please? I expect to see something like > > -Wl,--push-state -Wl,--no-as-needed -Wl,--pop-state ... -lpthread > > which doesn't make sense. >=20 > I've posted the entire build/check with V=3D1 here: >=20 > http://oirase.annexia.org/tmp/2019-01-gnulib-hivex.txt >=20 > If you grep through that for "test-thread_create" you should find the > appropriate lines. According to the log, it was libtool that broke a valid command /bin/sh ../../libtool --tag=3DCC --preserve-dup-deps --mode=3Dlink gcc -O2 = -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_G= LIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switch= es -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=3D/usr/lib/rpm/r= edhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables= -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed -Wl,= -z,now -specs=3D/usr/lib/rpm/redhat/redhat-hardened-ld -o test-rwlock1 test= -rwlock1.o libtests.a ../../gnulib/lib/libgnu.la libtests.a -pthread -Wl,--= push-state -Wl,--no-as-needed -lpthread -Wl,--pop-state -lrt=20 into an invalid command libtool: link: gcc -O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORT= IFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-str= ong -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 = -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasy= nchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z -Wl= ,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=3D/usr/lib/rpm/redhat/redhat-h= ardened-ld -o test-rwlock1 test-rwlock1.o -pthread -Wl,--push-state -Wl,--n= o-as-needed -Wl,--pop-state libtests.a ../../gnulib/lib/.libs/libgnu.a libt= ests.a -lpthread -lrt -pthread=20 What's the version of libtool that's produced such a mess? --=20 ldv --wac7ysb48OaltWcw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJcSOzkAAoJEAVFT+BVnCUIzLgP/1T4q2EZdImSJT4whR60urSJ 3L/Pdf0nPMlWlxnyzDfO7ZBeHAQrxtOORnV0/3G0Hg/H18vyebxdZp9woUKsiMPV qdIjWVB1AiA+r/d5CsXo0Cp9/ZthSwriR3QOw5X0JrRO6x0rqzoX4XrwyoSyJssT XhUIkphxwekM7UvV5qpN3tNy6AgGGgMQrtLpIypODmbIXQyezie8SM2U47i+/fLe PevfOBAraNEo7EmlT/QErtiy+jtd4ZhFlbhXa1yZJX9ipsDda3I9Pnd4Sp0UkkAi zdzXOUiuwJLiM7T+qB1VqNYBZdnu4Q553LnlA6kcIhQnFF9u9e24vzng0Hwb+PlW oXLv2o7A4XHQT65WSe0wCuDICbO8Ybio9Wr5Ab7guri0Kav56HuMU8wDwTKa15Wg XWtG9923aMbZc8kvRIJ+uVIF5PvOBNQC+EWm+XRjuNYGUgl2iBvZtzUSjY6+b6qR g62A//j0l9Nr2Xd38BZ4/+nj8q6n2uFnf6RStetNJs5C4jjw3H85RfxtWif90foe 7rnDRpm04mD/pCOALlfaSJWgPFuZDEAqUh+B443o4GxDnAuta0Nby29wfvH1BJvx zG1iFBfKhChTrrxredluZQtJsT9WJ43o20N1FNXaSCr+4vvLVH4cDFrPhaWVCom/ zDNPHpRGMO6W+VfhYuAD =ejMf -----END PGP SIGNATURE----- --wac7ysb48OaltWcw--