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.