Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160561 - sys-apps/pciutils-2.2.4 fails to build with MAKEOPTS=-j4
Summary: sys-apps/pciutils-2.2.4 fails to build with MAKEOPTS=-j4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 160827 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-06 20:00 UTC by Mark Glines
Modified: 2007-01-08 08:11 UTC (History)
2 users (show)

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


Attachments
patch to add -j1 to the make command-line (160561.diff,309 bytes, patch)
2007-01-06 20:01 UTC, Mark Glines
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Glines 2007-01-06 20:00:24 UTC
Building pciutils with the -j4 flag, there is a race condition between building the apps (lspci, setpci) and the library (libpci.a).  It tries to build the apps before the library has been completely built, resulting in a linker error.


Reproducible: Sometimes

Steps to Reproduce:
1.  stick -j4 in your MAKEOPTS
2.  emerge pciutils

Actual Results:  
>>> Emerging (1 of 1) sys-apps/pciutils-2.2.4 to /
 * pciutils-2.2.4.tar.gz MD5 ;-) ...                                      [ ok ]
 * pciutils-2.2.4.tar.gz RMD160 ;-) ...                                   [ ok ]
 * pciutils-2.2.4.tar.gz SHA1 ;-) ...                                     [ ok ]
 * pciutils-2.2.4.tar.gz SHA256 ;-) ...                                   [ ok ]
 * pciutils-2.2.4.tar.gz size ;-) ...                                     [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking pciutils-2.2.4.tar.gz ;-) ...                                 [ ok ]
>>> Unpacking source...
>>> Unpacking pciutils-2.2.4.tar.gz to /var/tmp/portage/sys-apps/pciutils-2.2.4/work
 * Applying pciutils-2.2.3-build.patch ...                                [ ok ]
 * Applying pcimodules-pciutils-2.2.4.patch ...                           [ ok ]
 * Applying pciutils-2.2.4-link.patch ...                                 [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-apps/pciutils-2.2.4/work/pciutils-2.2.4 ...
cd lib && ./configure "/usr/share/misc" "2.2.4" "" "" ""
Configuring libpci for your system... i386--linux 2.6.16-vs2.1.1-rc19-gentoo
Looking for access methods... sysfs proc i386-ports dump
Checking for zlib support... yes (auto-detected)
make -C lib all
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes   -c -o lspci.o lspci.c
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes   -c -o common.o common.c
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes   -c -o setpci.o setpci.c
make[1]: Entering directory `/var/tmp/portage/sys-apps/pciutils-2.2.4/work/pciutils-2.2.4/lib'
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o access.o access.c
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes   -c -o pcimodules.o pcimodules.c
M=`echo 2006-09-09 | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <lspci.man >lspci.8 "s/@TODAY@/$M/;s/@VERSION@/pciutils-2.2.4/;s#@IDSDIR@#/usr/share/misc#"
M=`echo 2006-09-09 | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <setpci.man >setpci.8 "s/@TODAY@/$M/;s/@VERSION@/pciutils-2.2.4/;s#@IDSDIR@#/usr/share/misc#"
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o generic.o generic.c
sed <update-pciids.sh >update-pciids "s@^DEST=.*@DEST=/usr/share/misc/pci.ids.gz@;s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=1@"
chmod +x update-pciids
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o dump.o dump.c
M=`echo 2006-09-09 | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <update-pciids.man >update-pciids.8 "s/@TODAY@/$M/;s/@VERSION@/pciutils-2.2.4/;s#@IDSDIR@#/usr/share/misc#"
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o names.o names.c
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o filter.o filter.c
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o sysfs.o sysfs.c
M=`echo 2006-09-09 | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <pcimodules.man >pcimodules.8 "s/@TODAY@/$M/;s/@VERSION@/pciutils-2.2.4/;s#@IDSDIR@#/usr/share/misc#"
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o proc.o proc.c
i686-pc-linux-gnu-gcc -march=athlon-mp -O2 -pipe -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -fPIC   -c -o i386-ports.o i386-ports.c
gzip -9 <pci.ids >pci.ids.gz
i686-pc-linux-gnu-gcc   lspci.o common.o  lib/libpci.a -lz -o lspci
i686-pc-linux-gnu-gcc   setpci.o common.o  lib/libpci.a -lz -o setpci
i686-pc-linux-gnu-gcc: lib/libpci.a: No such file or directory
rm -f libpci.a
i686-pc-linux-gnu-ar rcs libpci.a access.o generic.o dump.o names.o filter.o sysfs.o proc.o i386-ports.o
make: *** [setpci] Error 1
make: *** Waiting for unfinished jobs....
i686-pc-linux-gnu-ranlib libpci.a
make[1]: Leaving directory `/var/tmp/portage/sys-apps/pciutils-2.2.4/work/pciutils-2.2.4/lib'

!!! ERROR: sys-apps/pciutils-2.2.4 failed.
Call stack:
  ebuild.sh, line 1593:   Called dyn_compile
  ebuild.sh, line 951:   Called src_compile
  pciutils-2.2.4.ebuild, line 28:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.


Expected Results:  
A successful build.

I'll attach a patch to fix it.
Comment 1 Mark Glines 2007-01-06 20:01:54 UTC
Created attachment 105695 [details, diff]
patch to add -j1 to the make command-line
Comment 2 SpanKY gentoo-dev 2007-01-07 01:40:30 UTC
the answer is never to apply -j1

fixed patch in cvs
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-01-08 08:11:43 UTC
*** Bug 160827 has been marked as a duplicate of this bug. ***