I'm trying to build sys-apps/coreutils-8.7 on an arm machine, but it fails with chroot.o: In function `set_additional_groups': chroot.c:(.text+0xc): undefined reference to `xstrdup' chroot.c:(.text+0x9c): undefined reference to `xstrtoul' chroot.c:(.text+0xf4): undefined reference to `xrealloc' chroot.c:(.text+0x130): undefined reference to `quote' chroot.c:(.text+0x1f8): undefined reference to `quote' chroot.o: In function `usage': chroot.c:(.text+0x35c): undefined reference to `last_component' chroot.c:(.text+0x3f0): undefined reference to `last_component' chroot.c:(.text+0x420): undefined reference to `last_component' chroot.o: In function `main': chroot.c:(.text+0x60c): undefined reference to `parse_user_spec' chroot.c:(.text+0x6e8): undefined reference to `quote' chroot.c:(.text+0x80c): undefined reference to `close_stdout' collect2: ld returned 1 exit status make[3]: *** [chroot] Error 1 make[3]: *** Waiting for unfinished jobs.... any ideas why it fails? Reproducible: Always Steps to Reproduce:
Portage 2.1.9.25 (default/linux/arm/10.0/server, gcc-4.4.5, glibc-2.11.2-r3, 2.6.36-rc7-00125-gd2a63db armv5tel) ================================================================= System uname: Linux-2.6.36-rc7-00125-gd2a63db-armv5tel-Feroceon_88FR131_rev_1_-v5l-with-gentoo-2.0.1 Timestamp of tree: Fri, 17 Dec 2010 20:00:01 +0000 distcc 3.1 armv5tel-softfloat-linux-gnueabi [disabled] app-shells/bash: 4.1_p9 dev-lang/python: 2.6.6-r1, 3.1.3 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.6.8 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.5 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.82 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="arm ~arm" ACCEPT_LICENSE="* -@EULA" CBUILD="armv5tel-softfloat-linux-gnueabi" CFLAGS="-O2 -march=armv5te -pipe -fomit-frame-pointer" CHOST="armv5tel-softfloat-linux-gnueabi" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-std=gnu++0x -fvisibility-inlines-hidden -O2 -march=armv5te -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" 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/flokli /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl arm avahi berkdb bzip2 cli cracklib crypt cups cxx dbus fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pam pcre pppd readline session snmp ssl sysfs tcpd truetype unicode xml 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 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" 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev omapfb dummy v4l" 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Please attach the entire build log as a file.
Created attachment 257637 [details] build.log coreutils-8.7
your build system is screwed up. not a bug in coreutils. seems like your `test` is broken. try running with FEATURES=-sandbox. or replace `test` in your PATH with a symlink to busybox and see if it builds. or drop -fomit-frame-pointer from CFLAGS. ./configure: line 83: 14252 Broken pipe ( set ) 2>&1 14253 Done(141) | case $as_nl`(ac_space=' '; set) 2>&1` in *${as_nl}ac_space=\ *) sed -n "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac 14254 Segmentation fault | test -n "$ac_unrecognized_opts" ./configure: line 83: 14258 Broken pipe for ac_var in $ac_subst_vars; do eval ac_val=\$$ac_var; case $ac_val in *\'*) ac_val=`$as_echo "$ac_val" | sed "s/'/'\\\\\\\\''/g"` ;; esac; $as_echo "$ac_var='$ac_val'"; done 14259 Segmentation fault | test -n "$ac_unrecognized_opts"
Um... I also had other strange compile errors with other packages that seemed to be caused by a broken coreutils, so I tried to rebuild coreutils which failed... FEATURES=-sandbox doesn't help, because it already is inside my make.conf. I now try to build with a symlink from test to busybox, hope that works...
okay, the build went smoothly after adding symlinks from "test" and "sort" to "busybox". The "sort" and "test" binaries now belong to coreutils again. Thanks :-) Any ideas how to safely repair the system now? Should a "emerge -e world" be enough?
make sure you can still `emerge coreutils`
i did, thanks for your help! Is there anything else I should take a look at?
Interestingly, I also hit this issue (screwed up test and sort). Wonder what caused it.