this ebuild fails to compile if USERPRIV and USERSANDBOX are used as FEATURES statements. compilation proceeds if this FEATURES are removed. this ebuild is one of a few that fail due to this permissions problem when performing an emerge -e system. # emerge --info Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.3.6-r2, 2.6.14-gentoo-r5 i686) ================================================================= System uname: 2.6.14-gentoo-r5 i686 Pentium III (Coppermine) Gentoo Base System version 1.6.14 distcc 2.18.3 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i586-pc-linux-gnu" CFLAGS="-march=pentium -pipe -O2 -fweb -frename-registers -fforce-addr -fomit-frame-pointer -ftracer" CHOST="i586-pc-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/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium -pipe -O2 -fweb -frename-registers -fforce-addr -fomit-frame-pointer -ftracer -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distcc distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://192.168.1.102 http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LDFLAGS="-Wl,-O1 -Wl,--sort-common -s" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://192.168.1.102/gentoo-portage" USE="x86 alsa apm arts avi berkdb bitmap-fonts bzip2 crypt cups eds emboss encode expat foomaticdb fortran gdbm geoip gif gpm gstreamer gtk2 imlib ipv6 jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl spell ssl tcpd truetype truetype-fonts type1-fonts udev vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS >>> md5 files ;-) wget-1.10.2.ebuild >>> md5 files ;-) wget-1.9.1-r5.ebuild >>> md5 files ;-) files/digest-wget-1.10.2 >>> md5 files ;-) files/wgetrc-ipv6 >>> md5 files ;-) files/digest-wget-1.9.1-r5 >>> md5 src_uri ;-) wget-1.10.2.tar.gz >>> md5 src_uri ;-) wget-1.10.2-gentoo-0.2.tar.bz2 >>> Unpacking source... >>> Unpacking wget-1.10.2.tar.gz to /var/tmp/portage/wget-1.10.2/work >>> Unpacking wget-1.10.2-gentoo-0.2.tar.bz2 to /var/tmp/portage/wget-1.10.2/work * Applying Gentoo patches ... * 001_all_wget-1.9.1-locale.patch ... [ ok ] * 002_all_wget-passive-ftp-by-default.patch ... [ ok ] * 010_all_wget-1.10-ptimer-gettimeofday.patch ... [ ok ] * 020_all_wget-1.10.2-static-link.patch ... [ ok ] * Done with patching * Applying Mandrake patches ... * 002_all_wget-etc-not-usr-local-etc.patch ... [ ok ] * 003_all_wget-print-percentage.patch ... [ ok ] * 004_all_wget-url-password.patch ... [ ok ] * Done with patching configure.in:194: /usr/bin/m4: ERROR: Cannot create temporary file for diversion: Permission denied
Works fine here, as well as libtool does, so this makes me think that your sys-devel/m4 is just screwed. Re-emerge it with *sane* C[XX]FLAGS (like CFLAGS="-march=pentium -pipe -O2) and no LDFLAGS and try again.
And, wrt Bug 120125, Comment #8 - re-emerge coreutils with sane flags as well.