From a18f273584d09ca309c2cc983027fa444a6f488e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 8 Oct 2010 20:59:10 -0700 Subject: [PATCH] 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. --- perl-module/automake.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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` ;\ -- 2.30.2