Well first off there were some problems with the ebuild that should probably be cleared up before it's marked as stable. I have to manually set the USE flag to either: gd, gd-external, or cpdflib. Or enable those flags in package.use A similar problem occurs when emerge realizes that berkdb wants dba in the USE flags.. But the largest problem is libtool fails when linking libphp5.la which i think is due to a bad glibc or gcc installation, see additional information for the large paste. Reproducible: Always Steps to Reproduce: 1. USE="gd dba" emerge mod_php archfiend ~ # emerge --info Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-hardened, glibc-2.3.4.20041102- r0, 2.6.9-gentoo-r3 i686) ================================================================= System uname: 2.6.9-gentoo-r3 i686 Intel(R) Celeron(R) CPU 1.70GHz Gentoo Base System version 1.6.6 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux-headers-2.4.19-r1,sys-kernel/linux-headers-2.4.22 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O1 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3. 2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/ share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O1 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox sfperms" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/ distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/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 bitmap-fonts cdr crypt cscope cups encode esd f77 fam flac foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 guile imagemagick imlib java jpeg junit kde ldap libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcltk tcpd tiff truetype x86 xml xml2 xmms xv zlib" archfiend ~ # emerge mod_php ... * USE flag 'berkdb' needs these additional flag(s) set: * dba ... then... archfiend ~ # USE="gd" emerge mod_php ... * USE flag 'berkdb' needs these additional flag(s) set: * dba ... Ok now the real problem: archfiend ~ # USE="gd dba" emerge mod_php ... functions.lo -lcrypt -lcrypt -lhistory -lreadline -lncurses -lpspell -lpanel - lncurses -lmysqlclient -lmcrypt -lltdl -lldap -llber -lt1 -lfreetype -lpng -lz - ljpeg -lfam -ldb-4.0 -lgdbm -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl - lcrypto -ldl -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcrypt -o libphp5.la grep: /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libstdc++.la: No such file or directory /bin/sed: can't read /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libstdc++.la: No such file or directory libtool: link: `/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libstdc++.la' is not a valid libtool archive make: *** [libphp5.la] Error 1 make: *** Waiting for unfinished jobs.... Ok well I did some poking around and then tried a (probably unsafe and not very good) solution: ln -s /usr/lib/gcc/i686-pc-linux-gnu/3.4.3 /usr/lib/gcc/i686-pc-linux-gnu/3.4.2 the result was.. libtool ran fine but then it gave this warning: libtool: link: warning: `/usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libstdc++.la' seems to be moved
I get the same problem with many applications, kdetv was one and resolved it for the time being by making the symlink as above.
Not a PHP bug. It's a GCC bug that failed to call /sbin/fix_libtool_files.sh properly (long since fixed)