Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31356 - sys-apps/file can die when compiling with parallel make
Summary: sys-apps/file can die when compiling with parallel make
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-17 08:08 UTC by Brandy Westcott (RETIRED)
Modified: 2003-10-17 20:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brandy Westcott (RETIRED) gentoo-dev 2003-10-17 08:08:55 UTC
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')
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-10-17 09:00:52 UTC
MAKEOPTS="-j7" works here
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2003-10-17 19:31:06 UTC
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.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2003-10-17 20:22:40 UTC
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.