Re: Fixing parallel make of libpq
| От | ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) |
|---|---|
| Тема | Re: Fixing parallel make of libpq |
| Дата | |
| Msg-id | 87v9nwx1ts.fsf@wibble.ilmari.org обсуждение исходный текст |
| Ответ на | Re: Fixing parallel make of libpq (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
Tom Lane <tgl@sss.pgh.pa.us> writes:
> OK, got that. But that doesn't directly answer the question of whether
> it's wrong to use a phony target as an order-only prerequisite of
> another phony target. Grepping around for other possible issues,
> I see that you recently added
>
> update-unicode: | submake-generated-headers submake-libpgport
> $(MAKE) -C src/common/unicode $@
> $(MAKE) -C contrib/unaccent $@
>
> Doesn't that also have parallel-make hazards, if libpq does?
The part of 'update-unicode' that needs the generated headers and
libpgport is src/common/unicode/norm_test, which is depended by on by
the normalization-check target in the same directory. Running 'make -C
src/common/unicode normalization-check' in a freshly-configured tree
does indeed fail, independent of parallelism or the update-unicode
target.
Adding the deps to the norm_test target fixes 'make -C
src/common/unicode normalization-check', but 'make -C src/common/unicode
update-unicode' still fails, because submake-generated-headers only does
its thing in the top-level make invocation, so that needs an explicit
dep as well.
Please find a patch attached. However, I don't think it's fair to block
fixing the actual libpq parallel-make bug that has bitten me several
times on auditing the entire source tree for vaguely related issues that
nobody has complained about yet.
- ilmari
--
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen
From df05722a6b287d909698becb9718acce78a88020 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Mon, 24 Feb 2020 00:03:54 +0000
Subject: [PATCH] Add missing dependencies in src/common/unicode/Makefile
The norm_test program needs the generated headers and libpgport.
Because the submake-generated-headers target only does its thing in a
top-level make, add it to the update-unicode target too, so that doing
'make update-unicode' in this directory works, not just in the top
directory.
---
src/common/unicode/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/common/unicode/Makefile b/src/common/unicode/Makefile
index ec78aeec2a..8e92eabdea 100644
--- a/src/common/unicode/Makefile
+++ b/src/common/unicode/Makefile
@@ -18,7 +18,7 @@ LIBS += $(PTHREAD_LIBS)
# By default, do nothing.
all:
-update-unicode: unicode_norm_table.h unicode_combining_table.h
+update-unicode: unicode_norm_table.h unicode_combining_table.h | submake-generated-headers
$(MAKE) normalization-check
mv unicode_norm_table.h unicode_combining_table.h ../../../src/include/common/
@@ -40,7 +40,7 @@ unicode_combining_table.h: generate-unicode_combining_table.pl UnicodeData.txt
normalization-check: norm_test
./norm_test
-norm_test: norm_test.o ../unicode_norm.o
+norm_test: norm_test.o ../unicode_norm.o | submake-generated-headers submake-libpgport
norm_test.o: norm_test_table.h
--
2.22.0
В списке pgsql-hackers по дате отправления: