Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262181 - sys-libs/uclibc-0.9.30.1: Bug in libm.so(?)
Summary: sys-libs/uclibc-0.9.30.1: Bug in libm.so(?)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 19:36 UTC by Tom Lloyd
Modified: 2009-03-12 19:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
c99-ldbl-math (toolchain-uClibc-uClibc-0.9.30.1-c99-ldbl-math.patch,16.84 KB, patch)
2009-03-12 18:12 UTC, solar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Lloyd 2009-03-11 19:36:59 UTC
The other day I upgraded to uclibc-0.9.30.1, (from 0.9.30), with the result that lots of things broke, and most stuff doesn't compile any more.  For example, here's sys-libs/ncurses-5.6-r2 failing in a native compile on my powerpc-gentoo-linux-uclibc system:

...
powerpc-gentoo-linux-uclibc-gcc -I../test -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/test -DHAVE_CONFIG_H -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/test/../include -I. -I../include  -D_GNU_SOURCE -DXTSTRINGDEFINES -DNDEBUG -O2 -mcpu=603e -pipe  -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wwrite-strings -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wwrite-strings -fPIC -c /var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/test/xmas.c -o ../obj_s/xmas.o
powerpc-gentoo-linux-uclibc-gcc -O2 -mcpu=603e -pipe  -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wwrite-strings -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wwrite-strings -o background ../obj_s/background.o -Wl,-rpath,/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/lib -Wl,-z,relro -I../test -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/test -DHAVE_CONFIG_H -I/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/ncurses-5.6/test/../include -I. -I../include  -D_GNU_SOURCE -DXTSTRINGDEFINES -DNDEBUG -O2 -mcpu=603e -pipe  -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wwrite-strings -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wwrite-strings -fPIC  `echo "-L../lib -lform -lmenu -lpanel -lncurses  " | sed -e 's/-lform.*-lpanel[^ ]*//'` -lm
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___finitel'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___isnanl'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___signbitl'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___fpclassifyl'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___isinfl'
collect2: ld returned 1 exit status
make[1]: *** [background] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/sys-libs/ncurses-5.6-r2/work/narrowc/test'
make: *** [all] Error 2
 *
 * ERROR: sys-libs/ncurses-5.6-r2 failed.


Almost exactly the same thing happens when I try to cross-compile on my x86 machine.  The problem appears to be libm:

muttley ~ # cat test.c
#include <stdio.h>
int main() { printf("Ok\n"); return(0); }
muttley ~ # gcc test.c -o test
muttley ~ # ./test
Ok
muttley ~ # gcc test.c -o test -lm
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___finitel'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___isnanl'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___signbitl'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___fpclassifyl'
/usr/lib/gcc/powerpc-gentoo-linux-uclibc/3.4.6/../../../libm.so: undefined reference to `__GI___isinfl'
collect2: ld returned 1 exit status


GCC fails to compile too, which is making things interesting.  Here's emerge --info for the uclibc system:

Portage 2.1.6.7 (uclibc/ppc/hardened, gcc-3.4.6, uclibc-0.9.30.1-r0, 2.6.26-hardened-r7-muttley-1-misc ppc)
=================================================================
System uname: Linux-2.6.26-hardened-r7-muttley-1-misc-ppc-G2_LE-with-libc0
Timestamp of tree: Wed, 04 Mar 2009 20:20:01 +0000
distcc 3.0 powerpc-gentoo-linux-uclibc [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r14, 2.5.2-r7
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="ppc"
CBUILD="powerpc-gentoo-linux-uclibc"
CFLAGS="-O2 -mcpu=603e -pipe"
CHOST="powerpc-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mcpu=603e -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-z,relro"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://splig/gentoo-portage"
USE="alsa apache2 bzip2 cgi cli cracklib crypt dri embedded fastcgi hardened ipv6 mudflap mysql ncurses offensive openmp pcre perl php pic ppc python quotas readline reflection samba session sni spl sqlite ssl ssp suhosin syslog tcpd uclibc uclibc-compat unicode xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="alias auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy proxy_http dav dav_fs auth_digest" APACHE2_MPMS="prefork" CAMERAS="sq905" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 solar (RETIRED) gentoo-dev 2009-03-12 18:10:54 UTC
I've been testing ppc32-uclibc this patch for the past  ~24hrs with good results.

http://repo.or.cz/w/buildroot.git?a=blob_plain;f=toolchain/uClibc/uClibc-0.9.30.1-c99-ldbl-math.patch;hb=HEAD
Comment 2 solar (RETIRED) gentoo-dev 2009-03-12 18:12:23 UTC
Created attachment 184821 [details, diff]
c99-ldbl-math
Comment 3 solar (RETIRED) gentoo-dev 2009-03-12 19:04:16 UTC
sys-libs/uclibc-0.9.30.1-r1 pushed to the tree with this fix and one more fix for inlined syscalls.