I just installed a fresh Gentoo Linux system and tried to configure it using "Gentoo Linux Desktop Configuration Guide" which is found on gentoo.org website. I was following the instructions on that guide and when I got to a point where I invoked the command "emerge kde-base/kdebase" (KDE Desktop), the ebuild did not succeed to install due to error in AudioFile ebuild. All the dependencies compiled OK. It was the last package (the actual KDE) that stopped telling me it can't find a library file. A nice fellow from Russia (forgot your handle, sorry!) was able to help me out with this when I was asking for help on #gentoo IRC-channel. After investigating the problem he was able to come up with a solution that worked - I needed to edit "/usr/lib/libaudiofile.la". The error is on the very last line of that file. The last line looks like this: libdir='/var/tmp/portage/audiofile-0.2.3/image//usr/lib' ...and you will need to change it to this: libdir='/usr/lib' Now try "emerge kde-base/kdebase" again and it will work OK.
The same was reported in bug #368, but that eventually got closed because the submitter didn't respond and it arrived at a dead end. I suspect this can affect other things than libaudiofile. In any case emerging libaudiofile again seemed to generate a correct libaudiofile.la (in the #368 case). Please try it, but even if it helps we need to fix this.
Emerging libaudiofile again did not help in my case. I needed to edit /usr/lib/libaudiofile.la to make it work. Dan, you were right, this can affect other things than libaudiofile also. Once I got KDE up and running, I wanted to emerge some additional software - it installed without any problems, but when I tried to emerge XMMS by typing "emerge media-sound/xmms", it aborted. The error was exactly similar TYPE than I had with KDE. Here's the output: /bin/sh ../libtool --mode=link i686-pc-linux-gnu-gcc -mcpu=i686 -march=i686 -O3 -pipe -Wall -DG_DISABLE_CHECKS=1 -DG_DISABLE_ASSERT=1 -o libgconf-1.la -rpath /usr/lib -version-info 1:3:0 gconf-internals.lo gconf-backend.lo gconf-changeset.lo gconf-error.lo gconf-glib.lo gconf-listeners.lo gconf-locale.lo gconf-schema.lo gconf-sources.lo gconf-value.lo gconf.lo GConf-common.lo GConf-skels.lo GConf-stubs.lo -L/usr/lib -loaf -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lglib -lm -L/usr/lib -rdynamic -lgmodule -lglib -ldl grep: /var/tmp/portage/ORBit-0.5.13-r1/image//usr/lib/libIIOP.la: No such file or directory sed: can't read /var/tmp/portage/ORBit-0.5.13-r1/image//usr/lib/libIIOP.la: No such file or directory libtool: link: `/var/tmp/portage/ORBit-0.5.13-r1/image//usr/lib/libIIOP.la' is not a valid libtool archive make[2]: *** [libgconf-1.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/gconf-1.0.8/work/GConf-1.0.8/gconf'make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gconf-1.0.8/work/GConf-1.0.8' make: *** [all-recursive-am] Error 2 !!! ERROR: The ebuild did not complete successfully. !!! Function src_compile, Line 16, Exitcode 2 !!! (no error message) !!! emerge aborting on /usr/portage/gnome-base/gconf/gconf-1.0.8.ebuild .
I've posted all this plus some more info on gentoo-core (the gentoo developer-only subscriber-access-only mailing list). It's more or less acknowledged to be a generic problem now (wiht binutils apparently), people have reported seeing it in all sorts of packages. So someone else will be handling it soon I hope (I'm just the KDE guy).
This is the problem discussed in the gentoo-core thread " ${D} getting into generated .la files (e.g. libaudiofile.la) - info needed". See for more info there. Noone responded when I asked on that thred for someone to handle this, although some more info came thouh (see thread), so drobbins - I'm reassigning this to you, please give it to someone better equipped to deal with it.
It seems to be a problem with libtool relinking libs at 'make install' time when the prefix=${D}/usr. I do not know if there is a workaround other than 'sed -e "s:${D}::g" /{usr,usr/lib,usr/X11R6/lib}/*.la'. I guess we could contact the libtool author/maintainer.
Im closing this bug. It is a difficult problem, and users should just report problems as they go. The latest libtool should fix most of these; just libtoolize it by adding before ./configure: libtoolize --copy --force