Date: Fri, 20 Apr 2012 10:00:21 -0700 From: Isaac Dunham <idunham@...abit.com> To: musl@...ts.openwall.com Subject: Re: musl vs wireless-tools On Fri, 20 Apr 2012 12:41:06 -0400 Rich Felker <dalias@...ifal.cx> wrote: > 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.so iwlib.c musl-gcc > > -shared -o libiw.so.30 -Wl,-soname,libiw.so.30 -lm -lc iwlib.so > > 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 libiw.so.30 /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). > > > libiw.so.30: undefined reference to `ceil' > > libiw.so.30: undefined reference to `floor' > > libiw.so.30: undefined reference to `pow' > > libiw.so.30: 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 libiw.so.30 -Wl,-soname,libiw.so.30 -lm -lc > > iwlib.so Here's what the makefile has... # Compilation of the dynamic library $(DYNAMIC): $(OBJS:.o=.so) $(CC) -shared -o $@ -Wl,-soname,$@ $(STRIPFLAGS) $(LIBS) -lc $^ # Compilation of the static library $(STATIC): $(OBJS:.o=.so) $(RM) $@ $(AR) cru $@ $^ $(RANLIB) $@ > Having only libraries (-lm -lc iwlib.so) 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
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.