| Summary: | Several compile problems due to libm | ||
|---|---|---|---|
| Product: | uClibc | Reporter: | rhabarber1848 |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | aldot, rhabarber1848, uclibc-cvs, vda.linux |
| Priority: | P5 | ||
| Version: | 0.9.30.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | x86 | Target: | ppc |
| Build: | |||
| Attachments: |
Complete readelf output for libm-0.9.30-svn.so
Patch to fix this bug |
||
|
Description
rhabarber1848
2009-01-15 20:09:02 UTC
I can confirm that the last working SVN revision is 24486, revision 24487 is the first one producing the compile errors. My uClibc .config can be found here: https://bugs.busybox.net/show_bug.cgi?id=53#c2 Can you dump libm-0.9.30-svn.so and look whether pow() is in there?
powerpc-tuxbox-linux-uclibc-readelf -a -W libm-0.9.30-svn.so
I see this:
Symbol table '.dynsym' contains 215 entries:
...
105: 000092f0 18 FUNC GLOBAL DEFAULT 6 lrintf
106: 000092ba 27 FUNC GLOBAL DEFAULT 6 logbf
107: 000092d5 27 FUNC GLOBAL DEFAULT 6 logf
108: 00004d12 1947 FUNC GLOBAL DEFAULT 6 pow <===
109: 00009054 27 FUNC GLOBAL DEFAULT 6 atanf
110: 00009c95 28 FUNC GLOBAL DEFAULT 6 sqrtl
111: 00009ad8 45 FUNC GLOBAL DEFAULT 6 modfl
112: 00002624 216 FUNC GLOBAL DEFAULT 6 atanh
...
Regarding this:
> checking for pow in -lm... (cached) no
Can you find out which example program configure runs here?
libpng config.log shows this:
configure:20136: checking for pow in -lm
configure:20171: powerpc-tuxbox-linux-uclibc-gcc -o conftest -pipe -Os -fPIC -Wl,-O1 conftest.c -lm >&5
conftest.c:33: warning: conflicting types for built-in function 'pow'
/root/tuxbox/work_uclibc/image/cdk/lib/gcc/powerpc-tuxbox-linux-uclibc/3.4.6/../../../../powerpc-tuxbox-linux-uclibc/lib/nof/libm.so: undefined reference
to `__GI___finitel'
/root/tuxbox/work_uclibc/image/cdk/lib/gcc/powerpc-tuxbox-linux-uclibc/3.4.6/../../../../powerpc-tuxbox-linux-uclibc/lib/nof/libm.so: undefined reference
to `__GI___isnanl'
/root/tuxbox/work_uclibc/image/cdk/lib/gcc/powerpc-tuxbox-linux-uclibc/3.4.6/../../../../powerpc-tuxbox-linux-uclibc/lib/nof/libm.so: undefined reference
to `__GI___signbitl'
/root/tuxbox/work_uclibc/image/cdk/lib/gcc/powerpc-tuxbox-linux-uclibc/3.4.6/../../../../powerpc-tuxbox-linux-uclibc/lib/nof/libm.so: undefined reference
to `__GI___fpclassifyl'
/root/tuxbox/work_uclibc/image/cdk/lib/gcc/powerpc-tuxbox-linux-uclibc/3.4.6/../../../../powerpc-tuxbox-linux-uclibc/lib/nof/libm.so: undefined reference
to `__GI___isinfl'
collect2: ld returned 1 exit status
pow is part of libm here:
# ../../image/cdk/bin/powerpc-tuxbox-linux-uclibc-readelf -a -W ../../image/cdkroot/lib/libm-0.9.30-svn.so | grep pow
24: 00010f64 84 FUNC GLOBAL DEFAULT 6 powf
114: 000088c0 4232 FUNC GLOBAL DEFAULT 6 pow
183: 000114dc 12 FUNC GLOBAL DEFAULT 6 powl
The error in libpng configure seems related to the busybox/libsndfile/libxml2 problems, here is some other data from libm:
# ../../image/cdk/bin/powerpc-tuxbox-linux-uclibc-readelf -a -W ../../image/cdkroot/lib/libm-0.9.30-svn.so | grep "finitel\|isnanl\|signbitl\|fpclassifyl\|isinfl"
3: 00011390 12 FUNC GLOBAL DEFAULT 6 __isnanl
25: 00000000 0 NOTYPE GLOBAL DEFAULT UND __GI___finitel
40: 00011338 12 FUNC GLOBAL DEFAULT 6 __fpclassifyl
52: 00000000 0 NOTYPE GLOBAL DEFAULT UND __GI___isnanl
68: 00000000 0 NOTYPE GLOBAL DEFAULT UND __GI___signbitl
139: 00000000 0 NOTYPE GLOBAL DEFAULT UND __GI___fpclassifyl
142: 00000000 0 NOTYPE GLOBAL DEFAULT UND __GI___isinfl
143: 00011530 8 FUNC GLOBAL DEFAULT 6 __signbitl
186: 00011384 12 FUNC GLOBAL DEFAULT 6 __isinfl
221: 000112e4 12 FUNC GLOBAL DEFAULT 6 __finitel
# ../../image/cdk/bin/powerpc-tuxbox-linux-uclibc-readelf --version
GNU readelf 2.17.50.0.9 20070103
Created attachment 31 [details]
Complete readelf output for libm-0.9.30-svn.so
Comparing uClibc 0.9.30 and uClibc SVN HEAD
# cdk/bin/powerpc-tuxbox-linux-uclibc-readelf -a -W cdkroot/lib/libm-0.9.30.so | grep signbit
75: 000107c0 16 FUNC GLOBAL DEFAULT 6 __signbit
194: 000107d0 16 FUNC GLOBAL DEFAULT 6 __signbitf
# cdk/bin/powerpc-tuxbox-linux-uclibc-readelf -a -W cdkroot/lib/libm-0.9.30-svn.so | grep signbit
68: 00000000 0 NOTYPE GLOBAL DEFAULT UND __GI___signbitl
77: 00010594 16 FUNC GLOBAL DEFAULT 6 __signbit
143: 00011530 8 FUNC GLOBAL DEFAULT 6 __signbitl
197: 000105a4 16 FUNC GLOBAL DEFAULT 6 __signbitf
lead me to try the attached patch which removes libm_hidden_def for the problematic functions. libm now looks like this:
# cdk/bin/powerpc-tuxbox-linux-uclibc-readelf -a -W cdkroot/lib/libm-0.9.30-svn.so | grep signbit
74: 00010518 16 FUNC GLOBAL DEFAULT 6 __signbit
138: 000114b4 8 FUNC GLOBAL DEFAULT 6 __signbitl
192: 00010528 16 FUNC GLOBAL DEFAULT 6 __signbitf
Well, thats better, isn't it? libpng compiles now:
checking for pow... no
checking for pow in -lm... yes
Created attachment 33 [details]
Patch to fix this bug
Offending commit: http://sources.busybox.net/index.py/trunk/uClibc/libm/ldouble_wrappers.c?r1=24398&r2=24487&diff_format=h Applied, thanks! Please try svn and confirm that it works for you. Thanks, this bug is solved. I think this patch should also be applied to branches/uClibc_0_9_30 as well because the broken code also made it into that branch: http://sources.busybox.net/index.py/branches/uClibc_0_9_30/libm/ldouble_wrappers.c?r1=24011&r2=24489&pathrev=24489 Fixed in rev 24963 http://lists.uclibc.org/pipermail/uclibc-cvs/2009-January/025891.html Unfortunately I'm still getting the following error (with 0.9.30.1) on ppc: gcc -c libm/ldouble_wrappers.c -o libm/finitel.o -include ./include/libc-symbols.h -Wall -Wstrict-prototypes -fno-strict-aliasing -DHAVE_ASM_PPC_REL16 -fno-stack-protector -fno-builtin -nostdinc -I./include -I. -I./libc/sysdeps/linux/powerpc -fno-asm -DUCLIBC_INTERNAL -DSTATIC -std=gnu99 -Os -funit-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -I./kernel-include/ -I/usr/lib/gcc/ppc64-redhat-linux/4.4.0//include-fixed -I/usr/lib/gcc/ppc64-redhat-linux/4.4.0/include -DNDEBUG -DNOT_IN_libc -DIS_IN_libm -D_IEEE_LIBM -MT libm/finitel.o -MD -MP -MF libm/.finitel.o.dep -DL_finitel libm/ldouble_wrappers.c:561: error: '__EI___finitel' aliased to undefined symbol '__GI___finitel' (Disabling C99 math is a workaround.) Milos, does this happen to you on current svn? Also, please attach your .config Fixed in 0.9.30.2 |