qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Laurent Vivier <laurent@vivier.eu>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: linux-user static build broken
Date: Wed, 26 Aug 2020 11:08:20 +0200	[thread overview]
Message-ID: <CABgObfbHtkmp0C5nN+kyAr2a80eRO3LRYa9=MwVqME0O6XMHWQ@mail.gmail.com> (raw)
In-Reply-To: <cabd3284-bca8-07ff-e0bc-22ba41df7298@vivier.eu>

[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]

$ORIGIN is a special literal used by ld.so. It's probably fixed by the same
patch that was posted for msys.

Paolo

Il mer 26 ago 2020, 10:51 Laurent Vivier <laurent@vivier.eu> ha scritto:

> Le 26/08/2020 à 10:44, Daniel P. Berrangé a écrit :
> > On Tue, Aug 25, 2020 at 10:36:13PM +0200, Laurent Vivier wrote:
> >> Hi,
> >>
> >> since we have switched to meson, the statically linked binaries of qemu
> >> linux-user are broken:
> >>
> >> cd $OBJ
> >> $SRC/configure --static --target-list=m68k-linux-user
> >> make
> >> ./qemu-m68k
> >> Segmentation fault (core dumped)
> >>
> >> Program received signal SIGSEGV, Segmentation fault.
> >> 0x00007ffff7bd6833 in __dcigettext ()
> >> (gdb) bt
> >> #0  0x00007ffff7bd6833 in __dcigettext ()
> >> #1  0x00007ffff7bd5352 in __assert_fail ()
> >> #2  0x00007ffff7c4d74c in _dl_relocate_static_pie ()
> >> #3  0x00007ffff7bc713e in __libc_start_main ()
> >> #4  0x00007ffff7a0029e in _start ()
> >>
> >> If I build with --disable-pie it works again.
> >>
> >> Any idea?
> >
> > I'd suggest checking the compiler args used with v5.1.0 vs git master
> > and see if any flags related to PIE or similar changed. I already found
> > one bug wrt PIE on Windows builds this way.
> >
> > Regards,
> > Daniel
> >
>
> It's what I'm doing.
>
> There are both "--static-pie" and "--pie" on the new command line, but
> keeping only the first doesn't fix the problem.
>
> There is also a strange '-Wl,-rpath,RIGIN/' that would mean "make" is
> not using $(ORIGIN) but $ORIGIN...
>
> Thanks,
> Laurent
>
>

[-- Attachment #2: Type: text/html, Size: 2214 bytes --]

  reply	other threads:[~2020-08-26  9:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 20:36 linux-user static build broken Laurent Vivier
2020-08-25 21:22 ` Peter Maydell
2020-08-26  8:44 ` Daniel P. Berrangé
2020-08-26  8:51   ` Laurent Vivier
2020-08-26  9:08     ` Paolo Bonzini [this message]
2020-08-26 10:53       ` Laurent Vivier
2020-08-26 11:35         ` Paolo Bonzini

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABgObfbHtkmp0C5nN+kyAr2a80eRO3LRYa9=MwVqME0O6XMHWQ@mail.gmail.com' \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 NNTP newsgroup(s).