Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 20 Apr 2012 12:41:06 -0400
From: Rich Felker <>
Subject: Re: musl vs wireless-tools

On Fri, Apr 20, 2012 at 09:23:11AM -0700, Isaac Dunham wrote:
> Getting farther...
> But still not working.
> Here it looks like musl-gcc may be forgetting the -lm  I gave it.

I don't think that would be an issue:

$ ls -l libm.a
-rw-r--r--    1 dalias   users            8 Apr 17 13:18 libm.a

> musl-gcc -Os -W -Wall -Wstrict-prototypes -I. -DIW_USES_ITS_OWN_DOGFOOD -I/opt/musl/linux-headers/include -D_GNU_SOURCE -MMD     -fPIC -c -o iwlib.c
> musl-gcc -shared -o -Wl,-soname,  -lm -lc
> musl-gcc -Os -W -Wall -Wstrict-prototypes -I. -DIW_USES_ITS_OWN_DOGFOOD -I/opt/musl/linux-headers/include -D_GNU_SOURCE -MMD     -c iwconfig.c
> musl-gcc   -Os -W -Wall -Wstrict-prototypes -I. -DIW_USES_ITS_OWN_DOGFOOD -I/opt/musl/linux-headers/include -D_GNU_SOURCE -MMD     -o iwconfig iwconfig.o
> /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000008048c68

This line is actually more troubling and suggests to be that your
installation of musl is broken (it's not linking crt1.o).

> undefined reference to `ceil'
> undefined reference to `floor'
> undefined reference to `pow'
> undefined reference to `log10'
> collect2: ld returned 1 exit status
> make: *** [iwconfig] Error 1

Not sure what's happening here; why not add -v to the command line so
gcc shows you the actual commands it's passing to the compiler (cc1)
and linker (collect2/ld)?

Actually, there's one other line that looks odd; I'll repeat it here:

> musl-gcc -shared -o -Wl,-soname,  -lm -lc

Having only libraries (-lm -lc as input for the linker makes
no sense. Can you tell what they're trying to do? I'm doubtful that
even the package authors knew what they were trying to do here. If
it's possible to build this package static-linked (or at least with
none of its own .so files) that would be a much smarter approach).


Powered by blists - more mailing lists

Your e-mail address:

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