Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 24 Jan 2018 19:29:31 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Cc: Po-yi Wang <player@....bc.ca>
Subject: Re: any one managed to compile and run xz-5.0.8 or xz-5.2.3 ?

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
> <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.  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:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> 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.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.