From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12397 Path: news.gmane.org!.POSTED!not-for-mail From: Will Dietz Newsgroups: gmane.linux.lib.musl.general Subject: Re: any one managed to compile and run xz-5.0.8 or xz-5.2.3 ? Date: Thu, 25 Jan 2018 02:04:12 +0000 Message-ID: References: <20180125002931.GB1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113e3350d420b605639032e6" X-Trace: blaine.gmane.org 1516845788 1719 195.159.176.226 (25 Jan 2018 02:03:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 Jan 2018 02:03:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12413-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 25 03:03:03 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eeWsB-0007Dt-8Z for gllmg-musl@m.gmane.org; Thu, 25 Jan 2018 03:02:39 +0100 Original-Received: (qmail 7810 invoked by uid 550); 25 Jan 2018 02:04:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 7789 invoked from network); 25 Jan 2018 02:04:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wdtz.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=WONRuEpmMEL5N0ZoqWNzL85CCNzamj5ryeTK3/0hgJs=; b=gkfrcuU71En4nb+6BNSDs7BlNnU2TWW2JqKL5OzVRq+VoK6mgbw11KB0EE3e4gys6W +bPEyEBavfjhjD0T0dk5BhJY5rF9ibqrDy/XGIZI60HuLSMZzOdhdoAcxcpSmc3yFDYe q/21fqJ7WwwRlajAB0NJ9oCuNEN5BbDHXiQq8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=WONRuEpmMEL5N0ZoqWNzL85CCNzamj5ryeTK3/0hgJs=; b=CvPDwkHvkaVo/jHcL0m7s6mhDlR/5VTQZHiyNfQRjAHPi4GH9xBbxRLyq6a5JZlyyV In1dmPl7rOkb5oVQriO3omjPHhjAMsl89VzNYOv0m/SNmVpn7CK1ZxibnNlT8GMA2P4p sGAVRNiQCxENAGgbBi7CQ8emQ2RqsbFuUVsstwvgACYoCyy7gZwNDaRBYoNzJn8VPRTl bbJPJdF+98fcWqePsCrDfRKELbB00WI4KEx/dwNrZKT8IQIe7v5J8ZE1wcjvK7AX4NGi uw/+a5zX6/rcj7R9d36tXklQuDL2kCP0TqnuLs0heK+FpyivieCSKMXG0OrOzBHb1VGA Zu/Q== X-Gm-Message-State: AKwxytcbsc41wiIyoOHzFtJXqIBgpz7dk715c/FSwesHXm+NDCoY7V3q LXsgUAkK5Jrvr+7yfMczu5Wi4wm+xqshDbJnP9OUXCY= X-Google-Smtp-Source: AH8x2274LkAG3hSklzL6ucuY7tozaAkpw2YzUjVfU+T4KnKLSf3DOasTTfmD6A8hVDBNqLt7YfeVWCcGYa2mzPV2EME= X-Received: by 10.157.16.48 with SMTP id h45mr10063315ote.273.1516845862750; Wed, 24 Jan 2018 18:04:22 -0800 (PST) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12397 Archived-At: --001a113e3350d420b605639032e6 Content-Type: text/plain; charset="UTF-8" Those seem to all be statically linked, do any dynamically linked programs work? This is particularly relevant since the crash occurs in early part of the dynamic linker/loader. On Wed, Jan 24, 2018, 7:38 PM Po-yi Wang wrote: > > > On Wed, 24 Jan 2018, Rich Felker wrote: > > > On Wed, Jan 24, 2018 at 04:18:59PM -0800, Po-yi Wang wrote: > >> hi > >> > >> any one managed to compile and run xz with musl on ppc target ? > >> i've managed to compile and run "xz --version" on i486 and arm > >> targets, but not on ppc target. i've tried gcc-3.4.5 and gcc-4.1.2. > >> gcc-3.4.5 version simply hangs, while gcc-4.1.2 version seg faults -- > >> with seg fault, i can at least use gdb to get some info out. i do > >> not know how to use gdb to trace a hanged program. anyway, this is > >> the output for gcc-4.1.2 compiled version. (xz-5.0.8): > > > > Where did you get gcc 3.4.5 or 4.1.2 toolchains for musl ppc? Is any > > other software working when compiled with them? If you're not using a > > real cross or native musl toolchain but the musl-gcc wrapper, it > > probably lacks a lot of stuff it needs to work on ppc. In particular a > > ppc toolchain that will be used for dynamic-linking needs to be > > configured to always use "secure-plt", and whether static or dynamic, > > it needs to be using 64-bit long double. You should have hit an error > > configuring musl here if the compiler doesn't match: > > > > checking whether compiler's long double definition matches float.h... > > > > Please provide more details. > > > >> gdb src/xz/xz > >> > >> GNU gdb (GDB) 7.12.1 > >> Copyright (C) 2017 Free Software Foundation, Inc. > >> License GPLv3+: GNU GPL version 3 or later > >> > >> This is free software: you are free to change and redistribute it. > >> There is NO WARRANTY, to the extent permitted by law. Type "show > copying" > >> and "show warranty" for details. > >> This GDB was configured as "powerpc-unknown-linux-gnu". > >> Type "show configuration" for configuration details. > >> For bug reporting instructions, please see: > >> . > >> Find the GDB manual and other documentation resources online at: > >> . > >> For help, type "help". > >> Type "apropos word" to search for commands related to "word"... > >> Reading symbols from src/xz/xz...done. > >> (gdb) run --version > >> Starting program: /tmp/build/xz-5.0.8/src/xz/xz --version > >> > >> Program received signal SIGSEGV, Segmentation fault. > >> 0x4806fab8 in _dlstart_c (sp=0xbffff4a0, dynv=0x480b2ae4) at > >> ldso/dlstart.c:146 > >> 146 GETFUNCSYM(&dls2, __dls2, base+dyn[DT_PLTGOT]); > >> (gdb) bt > >> #0 0x4806fab8 in _dlstart_c (sp=0xbffff4a0, dynv=0x480b2ae4) > >> at ldso/dlstart.c:146 > >> #1 0x480778ec in _dlstart () from /lib/ld-musl-powerpc-sf.so.1 > >> (gdb) quit > >> A debugging session is active. > >> > >> Inferior 1 [process 22188] will be killed. > >> > >> Quit anyway? (y or n) y > > > > This is an odd place to crash, and if it's crashing here it's almost > > surely crashing for all programs, not just xz, since it hasn't gotten > > to the point of looking at the program being run. It could be an issue > > with very-outdated binutils doing something funny at link time linking > > libc.so. > actually other program compiled so far all works: (at least --version > works) > res/ppc/bash-4.4: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/dbclient: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/dropbear: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/dropbearconvert: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/dropbearkey: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/ftp-0.17: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/make-3.80: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/make-4.1: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/msgfmt: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/msgmerge: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/ntpserver: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/patch-2.7.5: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/scp: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/tar-1.22: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/xxd-5.7: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > res/ppc/xxxd: ELF 32-bit MSB executable, PowerPC or cisco > 4500, version 1 (SYSV), statically linked, stripped > > > > > > Rich > > > --001a113e3350d420b605639032e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Those seem to all be statically linked, do any dynamically l= inked programs work?

This is particularly relevant since the crash occurs in earl= y part of the dynamic linker/loader.


On Wed, Jan 24, 2018, 7:38 = PM Po-yi Wang <player@vcn.bc.ca&= gt; wrote:


On Wed, 24 Jan 2018, Rich Felker wrote:

> On Wed, Jan 24, 2018 at 04:18:59PM -0800, Po-yi Wang wrote:
>> hi
>>
>> any one managed to compile and run xz with musl on ppc target ? >> i've managed to compile and run "xz --version" on i4= 86 and arm
>> targets, but not on ppc target. i've tried gcc-3.4.5 and gcc-4= .1.2.
>> gcc-3.4.5 version simply hangs, while gcc-4.1.2 version seg faults= --
>> with seg fault, i can at least use gdb to get some info out. i do<= br> >> not know how to use gdb to trace a hanged program. anyway, this is=
>> the output for gcc-4.1.2 compiled version. (xz-5.0.8):
>
> Where did you get gcc 3.4.5 or 4.1.2 toolchains for musl ppc? Is any > other software working when compiled with them? If you're not usin= g a
> real cross or native musl toolchain but the musl-gcc wrapper, it
> probably lacks a lot of stuff it needs to work on ppc. In particular a=
> ppc toolchain that will be used for dynamic-linking needs to be
> configured to always use "secure-plt", and whether static or= dynamic,
> it needs to be using 64-bit long double. You should have hit an error<= br> > configuring musl here if the compiler doesn't match:
>
>=C2=A0 =C2=A0 checking whether compiler's long double definition ma= tches float.h...
>
> Please provide more details.
>
>> gdb src/xz/xz
>>
>> GNU gdb (GDB) 7.12.1
>> Copyright (C) 2017 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later
>> <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.=
>> There is NO WARRANTY, to the extent permitted by law.=C2=A0 Type &= quot;show copying"
>> and "show warranty" for details.
>> This GDB was configured as "powerpc-unknown-linux-gnu".<= br> >> Type "show configuration" for configuration details.
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>.
>> Find the GDB manual and other documentation resources online at: >> <http://www.gnu.org/software/gdb/documenta= tion/>.
>> For help, type "help".
>> Type "apropos word" to search for commands related to &q= uot;word"...
>> Reading symbols from src/xz/xz...done.
>> (gdb) run --version
>> Starting program: /tmp/build/xz-5.0.8/src/xz/xz --version
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x4806fab8 in _dlstart_c (sp=3D0xbffff4a0, dynv=3D0x480b2ae4) at >> ldso/dlstart.c:146
>> 146=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GETFUNCSYM(&= ;dls2, __dls2, base+dyn[DT_PLTGOT]);
>> (gdb) bt
>> #0=C2=A0 0x4806fab8 in _dlstart_c (sp=3D0xbffff4a0, dynv=3D0x480b2= ae4)
>>=C2=A0 =C2=A0 =C2=A0at ldso/dlstart.c:146
>> #1=C2=A0 0x480778ec in _dlstart () from /lib/ld-musl-powerpc-sf.so= .1
>> (gdb) quit
>> A debugging session is active.
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Inferior 1 [process 22188] will b= e killed.
>>
>> Quit anyway? (y or n) y
>
> This is an odd place to crash, and if it's crashing here it's = almost
> surely crashing for all programs, not just xz, since it hasn't got= ten
> to the point of looking at the program being run. It could be an issue=
> with very-outdated binutils doing something funny at link time linking=
> libc.so.
actually other program compiled so far all works: (at least --version
works)
res/ppc/bash-4.4:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/dbclient:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/dropbear:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/dropbearconvert:=C2=A0 ELF 32-bit MSB executable, PowerPC or cisco<= br> 4500, version 1 (SYSV), statically linked, stripped
res/ppc/dropbearkey:=C2=A0 =C2=A0 =C2=A0 ELF 32-bit MSB executable, PowerPC= or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/ftp-0.17:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/make-3.80:=C2=A0 =C2=A0 =C2=A0 =C2=A0 ELF 32-bit MSB executable, Po= werPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/make-4.1:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/msgfmt:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB exec= utable, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/msgmerge:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/ntpserver:=C2=A0 =C2=A0 =C2=A0 =C2=A0 ELF 32-bit MSB executable, Po= werPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/patch-2.7.5:=C2=A0 =C2=A0 =C2=A0 ELF 32-bit MSB executable, PowerPC= or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/scp:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ELF 32-bit MSB= executable, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/tar-1.22:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/xxd-5.7:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ELF 32-bit MSB executabl= e, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped
res/ppc/xxxd:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ELF 32-bit MSB= executable, PowerPC or cisco
4500, version 1 (SYSV), statically linked, stripped


>
> Rich
>
--001a113e3350d420b605639032e6--