Alan Conway <[EMAIL PROTECTED]> wrote:
> make -j<N> fails building the c++ tests with an "invalid Foo.lo" error.
> Anyone have an idea what might be causing it?
Hi Alan,
The symptoms look suspiciously like those of the problem I fixed
back in December:
Subject: [cpp] fix for parallel build failure
http://mail-archives.apache.org/mod_mbox/incubator-qpid-dev/200612.mbox/[EMAIL
PROTECTED]
I'm taking a look now...
Yep. It's similar.
Since "make check" builds both $(TESTS) and $(noinst_PROGRAMS),
you end up with two invocations of libtool (ltmain) for e.g.,
client_test. Then, since the two invocations step on each others'
temporary files, one of them fails.
Since this is rather subtle, I think it's more maintainable
simply to turn off parallelism in the src/tests/ directory.
Here's the change I've just checked in:
2007-04-11 Jim Meyering <[EMAIL PROTECTED]>
* src/tests/Makefile.am: Use .NOTPARALLEL target to suppress
parallelism in this directory, even when make is invoked with
e.g., -j2.
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am (révision 527651)
+++ src/tests/Makefile.am (copie de travail)
@@ -121,3 +121,7 @@
.valgrindrc: .valgrindrc-default
cp $(srcdir)/.valgrindrc-default .valgrindrc
+# Tell GNU make not to build targets in this directory in parallel.
+# This is necessary because with two or more identical and simultaneous
+# ltmain invocations, one may corrupt the temporaries of the other.
+.NOTPARALLEL: