make[1]: Entering directory `/var/tmp/portage/tiff-3.5.7-r1/work/tiff-v3.5.7/port' /usr/lib/ccache/bin/gcc -march=athlon-mp -O3 -pipe -I. -I../port -c -o strcasecmp.o strcasecmp.c make[1]: execvp: /usr/lib/ccache/bin/gcc: Permission denied make[1]: *** [strcasecmp.o] Error 127 make[1]: Leaving directory `/var/tmp/portage/tiff-3.5.7-r1/work/tiff-v3.5.7/port' make: *** [all] Error 2 !!! ERROR: media-libs/tiff-3.5.7-r1 failed. !!! Function src_compile, Line 28, Exitcode 2 !!! (no error message) Reproducible: Always Steps to Reproduce: 1.emerge tiff 2. 3. Gentoo Base System version 1.4.3.13 Portage 2.0.50 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.1-gentoo) ================================================================= System uname: 2.6.1-gentoo i686 AMD Athlon(tm) XP 2200+ Autoconf: sys-devel/autoconf-2.58 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-mp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" 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/env.d" CXXFLAGS="-march=athlon-mp -O3 -pipe" DISTDIR="/opt/no_archive/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio. org/pub/Linux/distributions/gentoo" MAKEOPTS="-j4" PKGDIR="/opt/no_archive/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb cdr crypt cups doc encode foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg junit kde libg++ libwww log4cpp mad mikmod motif mozilla mpeg nas ncurses nls oggvorbis opengl oss pam pdflib perl plotutils png postgres python qt quicktime readline sdl slang spell ssl svga tcltk tcpd truetype usb wxwindows x86 xinerama xml2 xmms xv zlib"
This problem proved to be due to the ccache package having been built with CHOST=i586 while using a compiler built with CHOST=i686. "emerge ccache" solved the problem.