I think it is because of a problem previously handled here #149398 for binutils-2.17. I am going to attach an excerpt of ebuild.log and a provisionary patch which worked for my special case (host: armeb-softfloat-linux-uclibc), but probably would mess up the ebuild in general. I am currently testing another patch which is not that invasive, but truth to be told: I am not really good at patching configure-scripts, so someone with more experience should take a look at it (the non-invasive one). PS: It's my first filed Gentoo bug: Please bear with me.
Created attachment 156621 [details] selected passage from ebuild.log
Created attachment 156627 [details, diff] invasive patch for host: armeb-softfloat-linux-uclibc
Created attachment 156631 [details, diff] more general patch This worked for me and seems to me more general than the preliminary patch I submitted before, but as I told I lack experience with configure-files.
I think there is something wrong with your setup. I've compiled this version of binutils under uclibc 5 times on a single host starting around Oct Sun Oct 21 12:12:45 2007 Are you sure this is not limited strictly to armeb- ?
this has come up before, but i havent been able to reproduce it maybe search bugzilla/gentoo embedded mailing list for more info
@solar: I assume with "setup" you mean the information you can get with "emerge --info", which I will attach just in case. Can you post yours too? Maybe someone can reproduce the bug that way. @SparKY: Yup, it did come up: * http://www.mail-archive.com/t2@t2-project.org/msg00488.html * http://article.gmane.org/gmane.comp.handhelds.openembedded.scm/4378 and * http://www.uclibc.org/lists/uclibc/2006-August/016088.html (already referenced in the mentioned bug http://bugs.gentoo.org/149398). Whereby the last one has a similar patch to mine. And while I was searching: dev-lang/tcc (http://bugs.gentoo.org/show_bug.cgi?id=133781) had a problem alike and you pointed out the missing link to "libm". Anyways, I am pretty sure of binutils/gas needing "libm" at least in my setup: If linked with uclibc and using softfloat. Maybe you guys succeeding have a floating point unit (FPU)? But it would be strange if that were the reason. I looked a bit deeper into the "gas/configure" script and I found the local variable "need_libm", which is used once in a "case ${need_libm} in"-statement which provides "-lm" at compile-time if necessary. BUT it was only set before once in gas/configure.tgt for a tic54x-* architecture. So, I improved my previous patch and integrated it a bit more in the given configure-script-structure and made it very specific to my architecture, it tests for ${generic_target} == "arm*-softfloat*-uclibc". I think the patch is safe to be integrated into the portage tree (could be 92_bla.patch in the patch-compilation). You probably could loosen the comparison to "*-softfloat*-uclibc" but I have no way of testing it.
Created attachment 160653 [details, diff] patch integrated into configure.tgt
Created attachment 160656 [details] emerge --info
Ups, the name was SpanKY not SparKY. Sorry.
Here, binutils-2.18-r3 don't compile either. The error message is: libtool: link: armeb-softfloat-linux-uclibc-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -march=armv5t -mtune=xscale -O2 -Wl,-O1 -o .libs/as-new app.o as.o atof-generic.o cond.o depend.o dwarf2dbg.o dw2gencfi.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o remap.o sb.o stabs.o subsegs.o symbols.o write.o tc-arm.o obj-elf.o atof-ieee.o ../opcodes/.libs/libopcodes.so ../bfd/.libs/libbfd.so -L/var/tmp/portage/sys-devel/binutils-2.18-r3/work/build/libiberty/pic -liberty ../libiberty/libiberty.a -Wl,-rpath -Wl,/usr/lib/binutils/armeb-softfloat-linux-uclibc/2.18 /var/tmp/portage/sys-devel/binutils-2.18-r3/work/build/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double': floatformat.c:(.text+0x2e8): undefined reference to `frexp' floatformat.c:(.text+0x498): undefined reference to `ldexp' /var/tmp/portage/sys-devel/binutils-2.18-r3/work/build/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double': floatformat.c:(.text+0x578): undefined reference to `ldexp' floatformat.c:(.text+0x728): undefined reference to `ldexp' collect2: ld returned 1 exit status make[4]: *** [as-new] Error 1 make[4]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.18-r3/work/build/gas' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.18-r3/work/build/gas' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.18-r3/work/build/gas' make[1]: *** [all-gas] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.18-r3/work/build' make: *** [all] Error 2 * * ERROR: sys-devel/binutils-2.18-r3 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2715: Called toolchain-binutils_src_compile * environment, line 3300: Called die * The specific snippet of code: * emake all || die "emake failed"; * The die message: * emake failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/log/portage/sys-devel:binutils-2.18-r3:20080826-103349.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-2.18-r3/temp/environment'. * My emerge --info is: Portage 2.1.4.4 (uclibc/arm, gcc-4.1.2, uclibc-0.9.28.3-r7, 2.6.21.7 armv5teb) ================================================================= System uname: 2.6.21.7 armv5teb XScale-IXP42x Family rev 2 (v5b) Timestamp of tree: Mon, 25 Aug 2008 13:18:01 +0000 distcc 2.18.3 armeb-softfloat-linux-uclibc (protocols 1 and 2) (default port 3632) [disabled] app-shells/bash: 3.2_p33 dev-lang/python: 2.4.4-r6 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5, 1.10.1 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="arm" CBUILD="armeb-softfloat-linux-uclibc" CFLAGS="-march=armv5t -mtune=xscale -Os" CHOST="armeb-softfloat-linux-uclibc" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=armv5t -mtune=xscale -Os" DISTDIR="/usr/src/distfiles" FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS=" http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ " LANG="de_DE.UTF-8" LC_ALL="de_DE.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="de" PKGDIR="/usr/portage/packages" 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="/var/portage/tree" PORTDIR_OVERLAY="/var/portage/local" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="arm cli cracklib crypt dri midi mudflap ncurses openmp pam pcre perl python readline reflection session spl ssl tcpd uclibc unicode vim-syntax 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="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 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" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="dummy fbdev v4l" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
binutils-2.18-r3 actually does build with the proposed patch on my NSLU2. As the patch really seems not to interfere with any other build environment than arm-softfloat-uclibc, I think it should be integrated in the tree.
*** Bug 254288 has been marked as a duplicate of this bug. ***
binutils-2.21.1 just built fine for me