This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A parallel make bug in libstdc++


Hi,

I am enclosing the build log on a SMP machine. The problem is in
libstdc++ Makefile. There are

LIBS    = $(ARLIB) $(ARLINK)
...
PICDIR = stamp-picdir
....
all: libs multi-all
	.....
libs multi-all: $(PICDIR)
....

libs: $(LIBS)

With make -j 4 on a 2-way SMP machine, both $(PICDIR) and $(LIBS)
may be started at thes same time. As you can see, there is a race
condition. 



-- 
H.J. Lu (hjl@gnu.org)
--
make[1]: Entering directory `/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/i386-pc-linux-gnulibc1/libstdc++'
if [ x"yes" = xyes ] && [ ! -d pic ]; then \
  mkdir pic; \
else true; fi
cd ../libio ; make -j 4 "SHELL=/bin/sh" "INSTALL=/bin/sh /usr/src/redhat/BUILD/gcc-2.95.2/install-sh -c" "INSTALL_DATA=/bin/sh /usr/src/redhat/BUILD/gcc-2.95.2/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh /usr/src/redhat/BUILD/gcc-2.95.2/install-sh -c " "prefix=/opt/i386-pc-linux-gnulibc1" "exec_prefix=/opt/i386-pc-linux-gnulibc1" "tooldir=/opt/i386-pc-linux-gnulibc1/i386-pc-linux-gnulibc1" "gxx_include_dir=/opt/i386-pc-linux-gnulibc1/include/g++-3" "libsubdir=/opt/i386-pc-linux-gnulibc1/lib/gcc-lib/i386-pc-linux-gnulibc1/2.95.2" "gcc_version=2.95.2" "gcc_version_trigger=/usr/src/redhat/BUILD/gcc-2.95.2/gcc/version.c" "AR=ar" "AR_FLAGS=rc" "CC=/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/gcc/xgcc -B/opt/i386-pc-linux-gnulibc1/i386-pc-linux-gnulibc1/bin/ -B/opt/i386-pc-linux-gnulibc1/i386-pc-linux-gnulibc1/lib/ -B/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/gcc/" "CXX=/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/gcc/xgcc -B/opt/i386-pc-linux-gnulibc1/i386-pc-linux-gnulibc1/bin/ -B/opt/i386-pc-linux-gnulibc1/i386-pc-linux-gnulibc1/lib/ -B/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/gcc/" "CFLAGS=-O2 -g -pipe -Dno_inhibit_libc" "CXXFLAGS=-pipe" "NM=nm" "RANLIB=ranlib" "LIBCFLAGS=-O2 -g -pipe -Dno_inhibit_libc" "LIBCXXFLAGS=-pipe -fno-implicit-templates" "LOADLIBES=" "LDFLAGS=" "MAKEINFO=makeinfo " "SHLIB=libstdc++-3-libc5-2-2.10.0.so" "SHCURSES=" "RUNTESTFLAGS=" iostream.list
test x"yes" != xyes || \
  /usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/gcc/xgcc -B/opt/i386-pc-linux-gnulibc1/i386-pc-linux-gnulibc1/bin/ -B/opt/i386-pc-linux-gnulibc1/i386-pc-linux-gnulibc1/lib/ -B/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/gcc/ -c -pipe -fno-implicit-templates -I/usr/src/redhat/BUILD/gcc-2.95.2/libstdc++ -I/usr/src/redhat/BUILD/gcc-2.95.2/libstdc++/stl -I../libio -I/usr/src/redhat/BUILD/gcc-2.95.2/libstdc++/../libio -nostdinc++  -fpic /usr/src/redhat/BUILD/gcc-2.95.2/libstdc++/cstringi.cc -o pic/cstringi.o
Assembler messages:
FATAL: Can't create pic/cstringi.o: No such file or directory
make[2]: Entering directory `/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/i386-pc-linux-gnulibc1/libio'
make[2]: `iostream.list' is up to date.
make[2]: Leaving directory `/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/i386-pc-linux-gnulibc1/libio'
make[1]: *** [cstringi.o] Error 1
touch stamp-picdir
make[1]: Leaving directory `/usr/src/redhat/BUILD/gcc-libc5-2.95.2-i386.build/i386-pc-linux-gnulibc1/libstdc++'
make: *** [all-target-libstdc++] Error 2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]