
Hello Roberto,
Thanks for the report.
* Roberto Bagnara wrote on Thu, Aug 30, 2007 at 09:13:26PM CEST:
Now that I routinely use a multiprocessor machine, I discovered what seems to be a bug somewhere. Here is how my make -j 3 fails:
... mkdir .libs g++ -DHAVE_CONFIG_H -I. -I../../.. -I/home/roberto/ppl/ppl/interfaces/Prolog/SWI -I/home/roberto/ppl/ppl/interfaces/Prolog -I/interfaces/Prolog -I../../../src -I../../../Watchdog/src -I/usr/lib64/pl-5.6.35/include -W -Wall -g -O2 -MT ppl_swiprolog.lo -MD -MP -MF .deps/ppl_swiprolog.Tpo -c ppl_swiprolog.cc -fPIC -DPIC -o .libs/ppl_swiprolog.o g++ -DHAVE_CONFIG_H -I. -I../../.. -I/home/roberto/ppl/ppl/interfaces/Prolog/SWI -I/home/roberto/ppl/ppl/interfaces/Prolog -I/interfaces/Prolog -I../../../src -I../../../Watchdog/src -I/usr/lib64/pl-5.6.35/include -W -Wall -g -O2 -MT ppl_swiprolog.lo -MD -MP -MF .deps/ppl_swiprolog.Tpo -c ppl_swiprolog.cc -o ppl_swiprolog.o >/dev/null 2>&1 mv -f .deps/ppl_swiprolog.Tpo .deps/ppl_swiprolog.Po mv -f .deps/ppl_swiprolog.Tpo .deps/ppl_swiprolog.Plo mv: cannot stat `.deps/ppl_swiprolog.Tpo': No such file or directory make[7]: *** [ppl_swiprolog.lo] Error 1
What happens is that the two compilations share the .deps/ppl_swiprolog.Tpo, and one of the mv's may thus fail. The Makefile I am using comes from the following Automake source fragment:
pkglib_LTLIBRARIES = libppl_swiprolog.la nodist_libppl_swiprolog_la_SOURCES = ppl_swiprolog.cc libppl_swiprolog_la_LIBADD = \ $(top_builddir)/src/libppl.la \ $(top_builddir)/Watchdog/src/libpwl.la \ @extra_libraries@ libppl_swiprolog_la_LDFLAGS = -module -avoid-version
The package has been configured to build both the static and dynamic libraries: that is why the same file is compiled twice, with and without -fPIC.
Sorry, I don't see how that can happen: the two different compilations that are issued for PIC and non-PIC, are issued serially, by one libtool script invocation. This isn't the case above: the libtool invocation would never lead to a .deps/*.Po file, only a *.Plo one. So it seems you somewhere have an implicit dependency on ppl_swiprolog.o (or ppl_swiprolog.$(OBJEXT)) rather than ppl_swiprolog.lo. I cannot see how this happens from the above snippet though. Is there other code that uses ppl_swiprolog.cc, or another source file matching ppl_swiprolog.*?
In case of doubt it may be good to see a 'make -j3 -d' output, why that wants to build ppl_swiprolog.o.
Cheers, Ralf