[dev] [9base] Failure to link against uClibc: undefined references

From: Matthew Farkas-Dyck <strake888_AT_gmail.com>
Date: Sun, 26 Feb 2012 20:06:43 -0500


I am trying to link 9base against uClibc. Linkage fails thus:

make[3]: Entering directory
make[3]: warning: jobserver unavailable: using -j1. Add `+' to parent
make rule.
LD awk
../lib9/lib9.a(fltfmt.o): In function `xdtoa':
fltfmt.c:(.text+0x39a): undefined reference to `frexp'
../lib9/lib9.a(strtod.o): In function `fmtstrtod':
strtod.c:(.text+0x994): undefined reference to `ldexp'
collect2: ld returned 1 exit status
make[3]: *** [awk] Error 1
make[3]: Leaving directory
make[2]: *** [all] Error 2
make[2]: Leaving directory
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/strake/buildroot-2011.11/output/build/9base-6'
make: *** [/home/strake/buildroot-2011.11/output/build/9base-6/.stamp_built]
Error 2

It fails thus also when built without buidroot, but works when linked
against GNU libc.

uClibc configuration here: http://hpaste.org/64419

$ nm uClibc-0.9.32/lib/libm.a | human-grep frexp
0000000000000000 r .LC0
0000000000000000 T __GI_frexp
0000000000000000 T frexp

$ nm uClibc-0.9.32/lib/libm.a | human-grep ldexp
                 U _GLOBAL_OFFSET_TABLE_
                 U __GI___finite
0000000000000000 T __GI_ldexp
                 U __GI_scalbn
                 U __errno_location
0000000000000000 T ldexp

I looked at lib9/libc.h, and found
extern double frexp(double, int*);
/* extern double ldexp(double, int); <math.h> */

Not sure why one is commented out, and not the other.

I searched the dev_AT_suckless.org archives and found no such trouble.

I haven't a clue why this failed. How can I link this?


Received on Mon Feb 27 2012 - 02:06:43 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 27 2012 - 02:12:04 CET