I run a hardened uClibc system - with these bugs it's usually uClibc to blame but with that PIE message I'm not so sure. I just upgraded uClibc to 0.9.30.1, and I'm doing emerge -e system. findutils failed, so I tried emerge --resume --skipfirst. Then flex failed in the same way, and apparently Portage forgot about its queue, because --resume stopped working. So I'm filing this bug. Apologies if it's a dupe, I wasn't sure what to search for. The main error message returned "zaroo boogs" at any rate. Reproducible: Always Steps to Reproduce: 1. emerge -1 =sys-apps/findutils-4.4.0 2. Watch it crash and burn Actual Results: >>> Emerging (1 of 1) sys-apps/findutils-4.4.0 * findutils-4.4.0.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking findutils-4.4.0.tar.gz to /var/tmp/portage/sys-apps/findutils-4.4.0/work Can't modify application's text section; use the GCC option -fPIE for position-independent executables. >>> Source unpacked in /var/tmp/portage/sys-apps/findutils-4.4.0/work >>> Compiling source in /var/tmp/portage/sys-apps/findutils-4.4.0/work/findutils-4.4.0 ... * econf: updating findutils-4.4.0/build-aux/config.guess with /usr/share/gnuconfig/config.guess * econf: updating findutils-4.4.0/build-aux/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=powerpc-gentoo-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-nls --libexecdir=/usr/lib/find --without-included-regex --build=powerpc-gentoo-linux-uclibc Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes Can't modify application's text section; use the GCC option -fPIE for position-independent executables. checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... Can't modify application's text section; use the GCC option -fPIE for position-independent executables. yes configure: error: cannot run /bin/sh build-aux/config.sub Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. !!! Please attach the following file when seeking support: !!! /var/tmp/portage/sys-apps/findutils-4.4.0/work/findutils-4.4.0/config.log * * ERROR: sys-apps/findutils-4.4.0 failed. >>> Emerging (1 of 1) sys-devel/flex-2.5.35 * flex-2.5.35.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking flex-2.5.35.tar.bz2 to /var/tmp/portage/sys-devel/flex-2.5.35/work * Applying flex-2.5.34-isatty.patch ... [ ok ] * Applying flex-2.5.33-pic.patch ... [ ok ] >>> Source unpacked in /var/tmp/portage/sys-devel/flex-2.5.35/work >>> Compiling source in /var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35 ... * econf: updating flex-2.5.35/config.guess with /usr/share/gnuconfig/config.guess * econf: updating flex-2.5.35/config.sub with /usr/share/gnuconfig/config.sub ./configure --prefix=/usr --host=powerpc-gentoo-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-nls --build=powerpc-gentoo-linux-uclibc Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. configure: error: cannot find install-sh or install.sh in /.. /../.. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Can't modify application's text section; use the GCC option -fPIE for position-independent executables. !!! Please attach the following file when seeking support: !!! /var/tmp/portage/sys-devel/flex-2.5.35/work/flex-2.5.35/config.log * * ERROR: sys-devel/flex-2.5.35 failed. Expected Results: muttley ~ # emerge --info 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: Thu, 12 Mar 2009 10:45:02 +0000 distcc 3.0 powerpc-gentoo-linux-uclibc [enabled] 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 distcc 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
OK, it isn't just compilations: sed says it, too: muttley ~ # sed Can't modify application's text section; use the GCC option -fPIE for position-independent executables. Of course I can't recompile it to find out if it's just badly linked because it's one of the things that doesn't compile... Hmm, do you think that maybe some of these configure scripts use sed and that's the root of the problem? I will cross-compile sed with the new uclibc and qpkg it and see if that works.
OK, this is interesting. I cross-compiled sed on my x86 box and put it in /usr/local/bin, and it worked fine. I then recompiled sed natively, (it seems that the dodgy binary was the thing preventing the compilation from going ahead), but the result of the native compilation still exhibits the same problem. When a binary is compiled with the exact same toolchain, why would the cross-compiled one work, while the natively compiled one doesn't?
I encountered a similar (same?) error when doing emerge -e world on i386 with uclibc-0.9.30.1 where gzip behaved as sed in comment #1. The workaround was to statically link it: USE="static" emerge gzip.
Oh hey, this is still open. I think I solved it ages ago. It was binaries being called by their full path causing the difficulties - things like /usr/powerpc-gentoo-linux-uclibc/binutils-bin/2.18/ar. I don't remember quite how I rooted out all the bad binaries, (I don't think revdep-rebuild helped), but I seem to recall temporarily replacing them with cross-compiled versions until everythiong worked properly, then recompiling the packages that provided them so that everything was native again. (The last step was needed because my cross-compiler doesn't make hardened binaries as far as I know.) I guess for the "rooting-out" process I must have looked at the unpacked Makefile (Ctrl-Z the emerge process and look at the files in /var/tmp/portage/) and emulated its action line-by-line, editing scripts to make them more verbose, until I traced the error message back to a specific command. Or something. I know I've done that sort of thing before :P To the Gentoo bugsquashers: Should I close this sort of bug myself, or always leave it for one of you to do?
Closing it ... finally.