If for some reason, a system is missing the /usr/lib/libmagic libraries, then sys-apps/file cannot be installed: /bin/sh ../libtool --mode=link gcc -march=pentium4 -O3 -pipe -fomit-frame-pointer -funroll-loops -fprefetch-loop-arrays -o file -lmagic file.o -lz gcc -march=pentium4 -O3 -pipe -fomit-frame-pointer -funroll-loops -fprefetch-loop-arrays -o file file.o -lmagic -lz gcc -DHAVE_CONFIG_H -I. -I. -I.. -DMAGIC=\"/usr/share/misc/file/magic\" -march=pentium4 -O3 -pipe -fomit-frame-pointer -funroll-loops -fprefetch-loop-arrays -MT apptype.lo -MD -MP -MF .deps/apptype.Tpo -c apptype.c -fPIC -DPIC -o .libs/apptype.o /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lmagic collect2: ld returned 1 exit status make[2]: *** [file] Error 1 make[2]: *** Waiting for unfinished jobs.... gcc -DHAVE_CONFIG_H -I. -I. -I.. -DMAGIC=\"/usr/share/misc/file/magic\" -march=pentium4 -O3 -pipe -fomit-frame-pointer -funroll-loops -fprefetch-loop-arrays -MT apptype.lo -MD -MP -MF .deps/apptype.Tpo -c apptype.c -o apptype.o >/dev/null 2>&1 make[2]: Leaving directory `/var/tmp/portage/file-4.06/work/file-4.06/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/file-4.06/work/file-4.06' make: *** [all] Error 2 !!! ERROR: sys-apps/file-4.06 failed. !!! Function src_compile, Line 49, Exitcode 2 !!! (no error message) And of course the libmagic files are provided by sys-apps/file itself. :) Fortunately, the easiest fix for this is to change the 'emake || die' line in the ebuild to 'make || die' (or 'MAKEOPTS="-j1" emake || die')
MAKEOPTS="-j7" works here
I wasn't able to get it to fail with parallel make. However, if someone does end up making a change to the ebuild, please just use emake -j1 || die "emake failed" There's no need to use MAKEOPTS.
Fixed in CVS. I fixed the latest version of the ebuild, but all of them may have this bug. Probably best if we try to get the latest version marked stable as quickly as possible.