[PPL-devel] Problem with Libtool library and parallel builds
Roberto Bagnara
bagnara at cs.unipr.it
Thu Aug 30 21:13:26 CEST 2007
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.
But either the g++/mv commands are not correct, or some dependencies are
missing to enforce serialization. Or perhaps I am misusing Automake (1.10)
and/or Libtool (1.5.22).
Any idea?
Thanks,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
More information about the PPL-devel
mailing list