Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367073 - sys-libs/glibc: static linking with -lm and -mieee-fp fails with multiple _LIB_VERSION errors
Summary: sys-libs/glibc: static linking with -lm and -mieee-fp fails with multiple _LI...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Lowest minor (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 09:14 UTC by Bernd Waibel
Modified: 2013-05-10 15:39 UTC (History)
0 users

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


Attachments
build log for busybox-1.17.4 (20110513-090325.log,44.48 KB, text/plain)
2011-05-13 09:17 UTC, Bernd Waibel
Details
environment for busybox-1.17.4 (environment,104.08 KB, text/plain)
2011-05-13 09:17 UTC, Bernd Waibel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Waibel 2011-05-13 09:14:33 UTC
I have had this problem on an almost stable amd64 system (some masked
packages) for several months by now. I still have the 1.15.3 release installed.
It never bothered me, because I never used bb anyway and when my system doesn't
start for any reason I usually use some livecd to restore it.

But now, the 1.15.3 version (which I have installed) has been removed from the portage tree, but 1.17.4, although it's been marked stable for a couple of months still doesn't compile. The same is true for the masked 1.18.3 release.

  AR      miscutils/lib.a
  LINK    busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
x86_64-pc-linux-gnu-gcc -O2 -pipe -Wall -march=amdfam10 -mmmx -mieee-fp -msse3 -msse4a -m3dnow -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -static -Wl,-O1 -Wl,--as-needed -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--start-group applets/built-in.o archival/lib.a archival/libunarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libunarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libieee.a:(.data+0x0): multiple definition of `_LIB_VERSION'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libm.a(s_lib_version.o):(.data+0x0): first defined here
networking/lib.a(nslookup.o): In function `print_host':
nslookup.c:(.text.print_host+0x75): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_rresolve':
inet_common.c:(.text.INET_rresolve+0xe5): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
util-linux/lib.a(mount.o): In function `nfsmount':
mount.c:(.text.nfsmount+0xc2): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_rresolve':
inet_common.c:(.text.INET_rresolve+0x162): warning: Using 'getnetbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_resolve':
inet_common.c:(.text.INET_resolve+0x6e): warning: Using 'getnetbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(xconnect.o): In function `bb_lookup_port':
xconnect.c:(.text.bb_lookup_port+0x48): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(netstat.o): In function `ip_port_str':
netstat.c:(.text.ip_port_str+0x37): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
emake failed
 * ERROR: sys-apps/busybox-1.17.4 failed (compile phase):
 *   static build failed


Reproducible: Always

Steps to Reproduce:
1. emerge busybox or emerge @system
2.
3.
Actual Results:  
busybox fails to link the final executable

Expected Results:  
busybox should have been upgraded

output of emerge --info =sys-apps/busybox-1.17.4:

Portage 2.1.9.42 (default/linux/amd64/10.0/desktop, gcc-4.4.5, libc-0-r0, 2.6.37-gentoo-r4 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-2.6.37-gentoo-r4-x86_64-AMD_Athlon-tm-_7850_Dual-Core_Processor-with-gentoo-2.0.2
Timestamp of tree: Fri, 13 May 2011 07:45:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r2::sage-on-gentoo, 2.7.1-r1::sage-on-gentoo, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @FREE @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -Wall -march=amdfam10 -mmmx -mieee-fp -msse3 -msse4a -m3dnow"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -Wall -march=amdfam10 -mmmx -mieee-fp -msse3 -msse4a -m3dnow"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--buildpkg y --with-bdep y"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages multilib-strict news parallel-fetch protect-owned sandbox sfperms split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -Wall -march=amdfam10 -mmmx -mieee-fp -msse3 -msse4a -m3dnow"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://de-mirror.org/distro/gentoo/ ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://mirror.netcologne.de/gentoo/ "
LANG="de_DE"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j2"
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="/var/lib/layman/sage-on-gentoo /var/lib/layman/dotnet /var/lib/layman/science /var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa amd64 avahi bash-completion beagle berkdb bluetooth branding bzip2 cairo caps cdr cli consolekit cracklib crypt cups curl cxx dbus dga dri dts dvd dvdr eds emacs emboss encode exif expat fam ffmpeg firefox flac fontconfig fortran fuse galago gconf gcrypt gd gdbm gdu gif glade gmp gnome gnome-keyring gnome-print gnutls gpm gstreamer gtk gzip iconv inotify ipv6 jadetex java jpeg jpeg2k kerberos kipi kpathsea latex lcms ldap libnotify lua lzma mad mmap mmx mng modules mono motif mp3 mp4 mpeg mudflap multilib mysql nautilus ncurses networkmanager nls nptl nptlonly nsplugin odbc offensive ogg openal openexr opengl openmp pam pango pch pcre pdf perl png policykit ppds pulseaudio python qt3support qt4 quicktime readline samba sdl semantic-desktop session skey slp smp source speex spell sse sse2 ssl ssse3 startup-notification svg sysfs syslog tcl tcpd threads tiff tk truetype udev unicode usb vorbis wmf x264 xattr xcb xft xinerama xml xorg xpm xulrunner xv xvid zeroconf zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock 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" APACHE2_MPMS="prefork" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia nv vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



output of emerge -pqv =sys-apps/busybox-1.17.4:
[ebuild     U ] sys-apps/busybox-1.17.4 [1.15.3] USE="ipv6%* mdev%* pam -debug -make-symlinks -savedconfig (-selinux) -static" 



I'll make attachments for the build log and the environment.
Comment 1 Bernd Waibel 2011-05-13 09:17:25 UTC
Created attachment 273039 [details]
build log for busybox-1.17.4
Comment 2 Bernd Waibel 2011-05-13 09:17:58 UTC
Created attachment 273041 [details]
environment for busybox-1.17.4
Comment 3 SpanKY gentoo-dev 2011-05-16 06:26:26 UTC
drop the rice CFLAGS and things will build fine

not sure if this bug is something we should fix ...

$ cat test.c
main(int argc){return pow(argc, argc);}
$ gcc -mieee-fp test.c -static -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libieee.a:(.data+0x0): multiple definition of `_LIB_VERSION'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib64/libm.a(s_lib_version.o):(.data+0x0): first defined here
collect2: ld returned 1 exit status
Comment 4 Bernd Waibel 2011-05-16 11:55:48 UTC
Well, I'll leave it to you, whether you fix this or not. Removing the -mieee-fp for this package worked indeed. Thanks for the hint.
Comment 5 SpanKY gentoo-dev 2012-08-14 16:21:05 UTC
seems to be fixed with glibc-2.16 (if not earlier)
Comment 6 SpanKY gentoo-dev 2013-05-10 15:39:58 UTC
(In reply to comment #5)

or not, but will be in the future (glibc-2.18?)