Just recently built Gentoo on a SS5. Had an identical problem on four packages. When, upon not finding a newline and/or EOF (not sure which) at the end of the source file the compile would bail out, with gcc claiming to find extraneous symbols on lines that didn't exist in the source file. The problem existed in four packages: sys-devel/binutils-2.16.1 sys-apps/util-linux-2.12q-r1 sys-apps/less-385_p4 sys-libs/ncurses-5.4.20050319 I made sure I could reproduce the problem on both binutils and ncurses before fixing it. Since the SS5 is a bit slow, rather than repackaging the ebuild, I just fixed the file in question on the fly after the source was unpacked. By fixing it on the fly I mean I would open the file in question in vim (from a non-chroot'd terminal), add a line at the end of the file, then :wq. The files in question are as follows: binutils-2.16.1/work/binutils-2.16.1/bfd/hash.c binutils-2.16.1/work/binutils-2.16.1/libiberty/strsignal.c ncurses-5.4.20050319/work/ncurses-5.4/tack/pad.c util-linux-2.12q-r1/work/util-linux-2.12q/sys-utils/ipcs.c less-385_p4/work/less-385/tags.c I thought that maybe this was a problem with the version of gcc on the livecd, but even after bootstrapping, I still had the problem on emerge -e system. (I found myself using the --resume option a lot... =) ) (Note: I haven't emerge sync'd in a few weeks, pending my report of this issue. Sorry I didn't have time to report it earlier.) Reproducible: Always Steps to Reproduce: 1. emerge one of above packages on sparc32 platform 2. 3. Actual Results: package failed to build Expected Results: package should have built. Portage 2.0.51.22-r2 (default-linux/sparc/sparc32/2005.0, gcc-3.3.6, glibc-2.3.3.20040420-r2, 2.4.31-sparc sparc) ================================================================= System uname: 2.4.31-sparc sparc sun4m Gentoo Base System version 1.6.13 dev-lang/python: 2.3.4-r1, 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.4.26-r1 ACCEPT_KEYWORDS="sparc ~sparc" AUTOCLEAN="yes" CBUILD="sparc-unknown-linux-gnu" CFLAGS="-mcpu=hypersparc -O3 -pipe" CHOST="sparc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=hypersparc -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/ http://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="sparc crypt fbcon gpm ithreads libwww mbox ncurses nls pam perl python readline spell ssl tcpd threads zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
The new toolchain (2006.0 profile) seems to fix this. Try upgrading if your toolchain allows that or use a 2006.0 stage3 to rebuild/install.
It works good... switching to 2006.0 and rebuilding the appropriate packages fixed it. Thx.