From: "Richard W.M. Jones" <rjones@redhat.com>
To: "Dmitry V. Levin" <ldv@altlinux.org>
Cc: bug-gnulib@gnu.org, Bruno Haible <bruno@clisp.org>
Subject: Re: test-rwlock1 failing on latest Fedora Rawhide
Date: Wed, 23 Jan 2019 22:24:26 +0000 [thread overview]
Message-ID: <20190123222426.GE12500@redhat.com> (raw)
In-Reply-To: <20190123220952.GA23568@altlinux.org>
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,
> > >
> > > 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 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?
> > >
> > > 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.
> >
> > hivex is using a very recent gnulib (34290cb926).
> >
> > The test is linked with:
> >
> > /bin/sh ../../libtool --tag=CC --preserve-dup-deps --mode=link gcc -O2
> > -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
> > -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong
> > -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
> > -Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> > -specs=/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
> >
> > As you can see from the last bit, the --push-state ... --pop-state
> > seems correct. Yet the test still fails.
>
> 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.
I've posted the entire build/check with V=1 here:
http://oirase.annexia.org/tmp/2019-01-gnulib-hivex.txt
If you grep through that for "test-thread_create" you should find the
appropriate lines.
Rich.
--
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
next prev parent reply other threads:[~2019-01-23 22:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 19:37 test-rwlock1 failing on latest Fedora Rawhide Richard W.M. Jones
2019-01-23 20:01 ` Bruno Haible
2019-01-23 20:45 ` Richard W.M. Jones
2019-01-23 21:03 ` Dmitry V. Levin
2019-01-23 21:14 ` Richard W.M. Jones
2019-01-23 22:09 ` Dmitry V. Levin
2019-01-23 22:24 ` Richard W.M. Jones [this message]
2019-01-23 22:38 ` Dmitry V. Levin
2019-01-24 3:18 ` Bruno Haible
2019-01-24 3:31 ` Bruno Haible
2019-01-24 3:49 ` Bruno Haible
2019-01-24 8:57 ` Richard W.M. Jones
2019-01-24 8:50 ` Richard W.M. Jones
2019-01-23 21:17 ` Michael Hudson-Doyle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190123222426.GE12500@redhat.com \
--to=rjones@redhat.com \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=ldv@altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).