This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
possible race condition in make install?
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Sat, 16 Jul 2011 16:40:22 -0400
- Subject: possible race condition in make install?
I have had a report of i386 darwin10 failing to build gcc 4.4.6 in fink which I've reproduced
myself. The failure looks quite odd...
/usr/bin/install -c -m 644 ./libiberty.a /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/`/sw/src/fink.build/gcc44-4.4.6-1001/darwin_objdir/./gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.6-1001/darwin_objdir/./gcc/ -B/sw/lib/gcc4.4/i386-apple-darwin10.8.0/bin/ -B/sw/lib/gcc4.4/i386-apple-darwin10.8.0/lib/ -isystem /sw/lib/gcc4.4/i386-apple-darwin10.8.0/include -isystem /sw/lib/gcc4.4/i386-apple-darwin10.8.0/sys-include -g -O2 -print-multi-os-directory`/./libiberty.an
mkdir /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/share/locale/zh_TW
mkdir /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/share/locale/zh_TW/LC_MESSAGES
libtool: install: /usr/bin/install -c .libs/libssp.0.dylib /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/x86_64/libssp.0.dylib
libtool: install: (cd /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/x86_64 && { ln -s -f libssp.0.dylib libssp.dylib || { rm -f libssp.dylib && ln -s libssp.0.dylib libssp.dylib; }; })
libtool: install: /usr/bin/install -c .libs/libssp.lai /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/x86_64/libssp.la
libtool: install: /usr/bin/install -c .libs/libssp.a /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/x86_64/libssp.a
( cd /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/`gcc -g -O2 -print-multi-os-directory` ; chmod 644 ./libiberty.an ;ranlib ./libiberty.an )
libtool: install: chmod 644 /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/x86_64/libssp.a
ranlib: file: ./libiberty.an is not an archive
libtool: install: ranlib -c /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/x86_64/libssp.a
make[2]: *** [install_to_libdir] Error 1
make[1]: *** [install-libiberty] Error 2
make[1]: *** Waiting for unfinished jobs....
and only occurs with parallel builds. Is it possible that the command...
/usr/bin/install -c -m 644 ./libiberty.a /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/`/sw/src/fink.build/gcc44-4.4.6-1001/darwin_objdir/./gcc/xgcc -B/sw/src/fink.build/gcc44-4.4.6-1001/darwin_objdir/./gcc/ -B/sw/lib/gcc4.4/i386-apple-darwin10.8.0/bin/ -B/sw/lib/gcc4.4/i386-apple-darwin10.8.0/lib/ -isystem /sw/lib/gcc4.4/i386-apple-darwin10.8.0/include -isystem /sw/lib/gcc4.4/i386-apple-darwin10.8.0/sys-include -g -O2 -print-multi-os-directory`/./libiberty.an
could be in a race condition with the later command...
( cd /sw/src/fink.build/root-gcc44-4.4.6-1001/sw/lib/gcc4.4/lib/`gcc -g -O2 -print-multi-os-directory` ; chmod 644 ./libiberty.an ;ranlib ./libiberty.an )
if so what can be done about this. So far the only work around I've found is to use the --disable-java-multilib patch ala redhat
which seems to cause this issue to go latant again. Any ideas?
Jack