* linux-user static build broken
@ 2020-08-25 20:36 Laurent Vivier
2020-08-25 21:22 ` Peter Maydell
2020-08-26 8:44 ` Daniel P. Berrangé
0 siblings, 2 replies; 7+ messages in thread
From: Laurent Vivier @ 2020-08-25 20:36 UTC (permalink / raw)
To: QEMU Developers, Richard Henderson, Paolo Bonzini
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?
Thanks,
Laurent
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-user static build broken
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é
1 sibling, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2020-08-25 21:22 UTC (permalink / raw)
To: Laurent Vivier; +Cc: Paolo Bonzini, Richard Henderson, QEMU Developers
On Tue, 25 Aug 2020 at 21:37, Laurent Vivier <laurent@vivier.eu> 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)
It can't be all static binaries, because part of my merge
tests is a config with
'../../configure' '--cc=ccache gcc' '--enable-debug' '--static'
'--disable-system' '--disable-gnutls'
and that works:
$ ./build/all-linux-static/qemu-m68k
qemu: no user program specified
So it must be something more specific, though I don't know what.
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-user static build broken
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
1 sibling, 1 reply; 7+ messages in thread
From: Daniel P. Berrangé @ 2020-08-26 8:44 UTC (permalink / raw)
To: Laurent Vivier; +Cc: Paolo Bonzini, Richard Henderson, QEMU Developers
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
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-user static build broken
2020-08-26 8:44 ` Daniel P. Berrangé
@ 2020-08-26 8:51 ` Laurent Vivier
2020-08-26 9:08 ` Paolo Bonzini
0 siblings, 1 reply; 7+ messages in thread
From: Laurent Vivier @ 2020-08-26 8:51 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: Paolo Bonzini, Richard Henderson, QEMU Developers
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-user static build broken
2020-08-26 8:51 ` Laurent Vivier
@ 2020-08-26 9:08 ` Paolo Bonzini
2020-08-26 10:53 ` Laurent Vivier
0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2020-08-26 9:08 UTC (permalink / raw)
To: Laurent Vivier
Cc: Richard Henderson, Daniel P. Berrangé, QEMU Developers
[-- 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 --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-user static build broken
2020-08-26 9:08 ` Paolo Bonzini
@ 2020-08-26 10:53 ` Laurent Vivier
2020-08-26 11:35 ` Paolo Bonzini
0 siblings, 1 reply; 7+ messages in thread
From: Laurent Vivier @ 2020-08-26 10:53 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Richard Henderson, Daniel P. Berrangé, QEMU Developers
Le 26/08/2020 à 11:08, Paolo Bonzini a écrit :
> $ORIGIN is a special literal used by ld.so. It's probably fixed by the
> same patch that was posted for msys.
If I remove the "-Wl,-rpath,RIGIN/" from the command line to build
qemu-m68k, it works again.
What the patch name or series?
Thanks,
Laurent
> Paolo
>
> Il mer 26 ago 2020, 10:51 Laurent Vivier <laurent@vivier.eu
> <mailto: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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-user static build broken
2020-08-26 10:53 ` Laurent Vivier
@ 2020-08-26 11:35 ` Paolo Bonzini
0 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2020-08-26 11:35 UTC (permalink / raw)
To: Laurent Vivier
Cc: Richard Henderson, Daniel P. Berrangé, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]
Let me take a look tonight as I plan to prepare a pull request.
Paolo
Il mer 26 ago 2020, 12:53 Laurent Vivier <laurent@vivier.eu> ha scritto:
> Le 26/08/2020 à 11:08, Paolo Bonzini a écrit :
> > $ORIGIN is a special literal used by ld.so. It's probably fixed by the
> > same patch that was posted for msys.
>
> If I remove the "-Wl,-rpath,RIGIN/" from the command line to build
> qemu-m68k, it works again.
>
> What the patch name or series?
>
> Thanks,
> Laurent
>
> > Paolo
> >
> > Il mer 26 ago 2020, 10:51 Laurent Vivier <laurent@vivier.eu
> > <mailto: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: 3409 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-08-26 11:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-08-26 10:53 ` Laurent Vivier
2020-08-26 11:35 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.