From: Ben Pfaff Date: Sat, 9 Oct 2010 03:59:10 +0000 (-0700) Subject: perl-module: Fix build race. X-Git-Tag: v0.7.6~83 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a18f273584d09ca309c2cc983027fa444a6f488e;p=pspp-builds.git perl-module: Fix build race. perl_module_tarball invokes module-make in a submake. In turn, until now module-make has depended on src/libpspp-core.la. But if a parallel build is in progress, then the parent make is likely also building the same library. Sometimes the race in linking this library causes build failures. The ideal solution would be to avoid the submake. We could do this, by giving the files in the build different names from those in the source directory (e.g. distributing the files with .dist extensions, or copying them into or out of a subdirectory). This commit instead implements a minimal fix, by making the dependency on src/libpspp-core.la part of the top-level perl_module_tarball target, instead of part of the submake's module-make target. With this commit, 10 consecutive test runs on my laptop completed successfully. Without this commit, about 50% of nontrivial builds fail. --- diff --git a/perl-module/automake.mk b/perl-module/automake.mk index becee71b..ca27abdd 100644 --- a/perl-module/automake.mk +++ b/perl-module/automake.mk @@ -31,11 +31,11 @@ perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources) perl-module/ cd perl-module && $(MAKE) $(AM_MAKEFLAGS) tardist PHONY += module-make -module-make: perl-module/Makefile src/libpspp-core.la +module-make: perl-module/Makefile cd perl-module && $(MAKE) $(AM_MAKEFLAGS) ALL_LOCAL += perl_module_tarball -perl_module_tarball: $(module_sources) +perl_module_tarball: $(module_sources) src/libpspp-core.la if test x"$(top_builddir)" != x"$(top_srcdir)" ; then \ for f in $(module_sources); do \ destdir=`dirname $$f` ;\