mailing list of musl libc
 help / color / mirror / code / Atom feed
* re: musl setup attempt
@ 2013-03-14 11:02 LM
  2013-03-14 11:58 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: LM @ 2013-03-14 11:02 UTC (permalink / raw)
  To: musl

John Spencer wrote:
>please see http://wiki.musl-libc.org/Getting_started .
>it has detailed instructions about how to use musl from /home.
>after installation, the key point is to use "CC=musl-gcc" when running configure scripts.

I am using a custom, portable build system that sets up the
environment, automates the
builds and handles install and uninstall of packages to a specified
location (in this case
within my home directory).  The build system settings include
CC=musl-gcc, CPP=musl-gcc and
CFLAGS and LDFLAGS are set to only point to the paths where the musl
include and library files
are located.  I'm also use -static.

Some of the applications, like diffh, diction, bzip2 are building and
running fine with musl.
If I check objdump -p, I see a different library when built with musl
than I do when I build
them with gcc.

>also note that many programs need patches because they're using non-portable constructs.
>here you can find build instructions for some programs:
>https://github.com/rofl0r/sabotage/tree/master/pkg

Not seeing any patches referenced for xz:
https://github.com/rofl0r/sabotage/blob/master/pkg/xz

Isaac Dunham wrote:
>If that were the issue, you could not run anything. The loader is specified by the specfile
>musl-gcc uses, and it's what make the program run.  If libraries are missing, the program will >generally fail to run (depending on your settings). So it's probably something else.

The applications that are showing errors on my system include programs from xz,
wavpack, libpaper and speex.

Some programs do appear to be running, so likely it is something else.

>...but it would probably be most helpful if you installed strace...

Am not very familiar with strace, but I ran it on some of the programs
that were displaying errors.
The stderr results from using strace on wavpack were:

execvc ("./wavpack, ["./wavpack"],[/* 30 vars */]) = -1  EIO
(Input/output error)
dup(2)                                             = 3
fcntl64 (3,F_GETFL)                                = 0x8001 (flags
O_WRONLY|O_LARGEFILE)
close(3)                                           = 0
write (2, "strace: exec: Input/output error"..., 33 strace: exec:
Input/output error
) = 33
exit_group(1)                                      = ?

The other programs that displayed the same error had very similar
output using strace.

Thanks.

Sincerely,
Laura


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: re: musl setup attempt
  2013-03-14 11:02 musl setup attempt LM
@ 2013-03-14 11:58 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2013-03-14 11:58 UTC (permalink / raw)
  To: musl

* LM <lmemsm@gmail.com> [2013-03-14 07:02:16 -0400]:
> 
> >...but it would probably be most helpful if you installed strace...
> 
> Am not very familiar with strace, but I ran it on some of the programs
> that were displaying errors.
> The stderr results from using strace on wavpack were:
> 
> execvc ("./wavpack, ["./wavpack"],[/* 30 vars */]) = -1  EIO
> (Input/output error)
> dup(2)                                             = 3
> fcntl64 (3,F_GETFL)                                = 0x8001 (flags
> O_WRONLY|O_LARGEFILE)
> close(3)                                           = 0
> write (2, "strace: exec: Input/output error"..., 33 strace: exec:

there is no execvc syscall, it should be execve

if exec fails then something is wrong before the application
starts, maybe you can see what happens if you strace the
loader, which you can do by

 strace path/to/libc.so wavpack

the output here is

$ strace ../lib/libc.so wavpack
execve("../lib/libc.so", ["../lib/libc.so", "wavpack"], [/* 33 vars */]) = 0
open("wavpack", O_RDONLY|O_LARGEFILE)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\20\225\4\0104\0\0\0"..., 936) = 936
mmap2(0x8048000, 53248, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x8048000
mmap2(0x8053000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xa) = 0x8053000
close(3)                                = 0
...


(this is in a simple musl environment set up with
musl-gcc, although not the latest musl)

if you dont know how to debug the issue then
post all the relevant information
(config.mak, readelf -ld, strace libc.so,
musl version, env)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-14 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14 11:02 musl setup attempt LM
2013-03-14 11:58 ` Szabolcs Nagy

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).