automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with Libtool library and parallel builds


From: Roberto Bagnara
Subject: Problem with Libtool library and parallel builds
Date: Thu, 30 Aug 2007 21:13:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050929 Thunderbird/1.0.7 Fedora/1.0.7-1.1.fc4 Mnenhy/0.7.3.0


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:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]