On Sat, Apr 25, 2015 at 7:59 AM, Peter Eisentraut <pete...@gmx.net> wrote:
> On 4/23/15 1:22 PM, Jeff Janes wrote:
>> Something about this commit (dcae5faccab64776376d354d) broke "make
>> check" in parallel conditions when started from a clean directory.  It
>> fails with a different error each time, one example:
>>
>> make -j4 check > /dev/null
>>
>> In file included from gram.y:14515:
>> scan.c: In function 'yy_try_NUL_trans':
>> scan.c:10307: warning: unused variable 'yyg'
>> /usr/bin/ld: tab-complete.o: No such file: No such file or directory
>> collect2: ld returned 1 exit status
>> make[3]: *** [psql] Error 1
>> make[2]: *** [all-psql-recurse] Error 2
>> make[2]: *** Waiting for unfinished jobs....
>> make[1]: *** [all-bin-recurse] Error 2
>> make: *** [all-src-recurse] Error 2
>> make: *** Waiting for unfinished jobs....
>
> I think the problem is that "check" depends on "all", but now also
> depends on temp-install, which in turn runs install and all.  With a
> sufficient amount of parallelism, you end up running two "all"s on top
> of each other.
>
> It seems this can be fixed by removing the check: all dependency.  Try
> removing that in the top-level GNUmakefile.in and see if the problem
> goes away.  For completeness, we should then also remove it in the other
> makefiles.

Yep. I spent some time yesterday and today poking at that, but I
clearly missed that dependency.. Attached is a patch fixing the
problem. I tested check and check-world with some parallel jobs and
both worked. In the case of check, the amount of logs is very reduced
because all the install process is done by temp-install which
redirects everything into tmp_install/log/install.log.
-- 
Michael
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 361897a..42aeaa6 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -62,7 +62,7 @@ distclean maintainer-clean:
 # Garbage from autoconf:
 	@rm -rf autom4te.cache/
 
-check check-tests: all
+check check-tests:
 
 check check-tests installcheck installcheck-parallel installcheck-tests:
 	$(MAKE) -C src/test/regress $@
diff --git a/contrib/test_decoding/Makefile b/contrib/test_decoding/Makefile
index 613e9c3..e47ebab 100644
--- a/contrib/test_decoding/Makefile
+++ b/contrib/test_decoding/Makefile
@@ -39,7 +39,7 @@ submake-test_decoding:
 
 REGRESSCHECKS=ddl rewrite toast permissions decoding_in_xact decoding_into_rel binary prepared
 
-regresscheck: all | submake-regress submake-test_decoding temp-install
+regresscheck: | submake-regress submake-test_decoding temp-install
 	$(MKDIR_P) regression_output
 	$(pg_regress_check) \
 	    --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
@@ -53,7 +53,7 @@ regresscheck-install-force: | submake-regress submake-test_decoding temp-install
 
 ISOLATIONCHECKS=mxact delayed_startup ondisk_startup concurrent_ddl_dml
 
-isolationcheck: all | submake-isolation submake-test_decoding temp-install
+isolationcheck: | submake-isolation submake-test_decoding temp-install
 	$(MKDIR_P) isolation_output
 	$(pg_isolation_regress_check) \
 	    --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile
index fc809a0..d479788 100644
--- a/src/bin/initdb/Makefile
+++ b/src/bin/initdb/Makefile
@@ -58,7 +58,7 @@ clean distclean maintainer-clean:
 # ensure that changes in datadir propagate into object file
 initdb.o: initdb.c $(top_builddir)/src/Makefile.global
 
-check: all
+check:
 	$(prove_check)
 
 installcheck:
diff --git a/src/bin/pg_basebackup/Makefile b/src/bin/pg_basebackup/Makefile
index 58f8b66..0d8421a 100644
--- a/src/bin/pg_basebackup/Makefile
+++ b/src/bin/pg_basebackup/Makefile
@@ -50,7 +50,7 @@ clean distclean maintainer-clean:
 		$(OBJS)
 	rm -rf tmp_check
 
-check: all
+check:
 	$(prove_check)
 
 installcheck:
diff --git a/src/bin/pg_config/Makefile b/src/bin/pg_config/Makefile
index 71ce236..dbc9899 100644
--- a/src/bin/pg_config/Makefile
+++ b/src/bin/pg_config/Makefile
@@ -49,7 +49,7 @@ clean distclean maintainer-clean:
 	rm -f pg_config$(X) $(OBJS)
 	rm -rf tmp_check
 
-check: all
+check:
 	$(prove_check)
 
 installcheck:
diff --git a/src/bin/pg_controldata/Makefile b/src/bin/pg_controldata/Makefile
index f7a4010..fd7399b 100644
--- a/src/bin/pg_controldata/Makefile
+++ b/src/bin/pg_controldata/Makefile
@@ -35,7 +35,7 @@ clean distclean maintainer-clean:
 	rm -f pg_controldata$(X) $(OBJS)
 	rm -rf tmp_check
 
-check: all
+check:
 	$(prove_check)
 
 installcheck:
diff --git a/src/bin/pg_ctl/Makefile b/src/bin/pg_ctl/Makefile
index 525e1d4..37eb482 100644
--- a/src/bin/pg_ctl/Makefile
+++ b/src/bin/pg_ctl/Makefile
@@ -38,7 +38,7 @@ clean distclean maintainer-clean:
 	rm -f pg_ctl$(X) $(OBJS)
 	rm -rf tmp_check
 
-check: all
+check:
 	$(prove_check)
 
 installcheck:
diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile
index 8b6f54c..c831716 100644
--- a/src/bin/scripts/Makefile
+++ b/src/bin/scripts/Makefile
@@ -69,7 +69,7 @@ clean distclean maintainer-clean:
 	rm -f dumputils.c print.c mbprint.c kwlookup.c keywords.c
 	rm -rf tmp_check
 
-check: all
+check:
 	$(prove_check)
 
 installcheck:
diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile
index b80de4e..41460a1 100644
--- a/src/interfaces/ecpg/Makefile
+++ b/src/interfaces/ecpg/Makefile
@@ -26,5 +26,5 @@ install-ecpglib-recurse: install-pgtypeslib-recurse
 clean distclean maintainer-clean:
 	$(MAKE) -C test clean
 
-check checktcp installcheck: all
+check checktcp installcheck:
 	$(MAKE) -C test $@
diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index ea17b1c..583a503 100644
--- a/src/makefiles/pgxs.mk
+++ b/src/makefiles/pgxs.mk
@@ -291,7 +291,7 @@ check:
 	@echo '"$(MAKE) check" is not supported.'
 	@echo 'Do "$(MAKE) install", then "$(MAKE) installcheck" instead.'
 else
-check: all submake $(REGRESS_PREP)
+check: submake $(REGRESS_PREP)
 	$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 temp-install: EXTRA_INSTALL=$(subdir)
diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index 2b69847..7f48067 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -112,7 +112,7 @@ uninstall-data:
 .PHONY: install-data uninstall-data
 
 
-check: all submake
+check: submake
 	$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 installcheck: submake
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile
index c58e56b..cbd0123 100644
--- a/src/pl/plpython/Makefile
+++ b/src/pl/plpython/Makefile
@@ -173,7 +173,7 @@ pg_regress_clean_files += sql/python3/ expected/python3/ results/python3/
 endif # Python 3
 
 
-check: all submake
+check: submake
 	$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 installcheck: submake
diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile
index 851e3c0..533d3b4 100644
--- a/src/pl/tcl/Makefile
+++ b/src/pl/tcl/Makefile
@@ -92,7 +92,7 @@ uninstall-data:
 .PHONY: install-data uninstall-data
 
 
-check: all submake
+check: submake
 	$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
 
 installcheck: submake
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to