summaryrefslogtreecommitdiff
path: root/src/Makefile.global.in
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-02-14 10:40:34 +0900
committerMichael Paquier <michael@paquier.xyz>2022-02-14 10:40:34 +0900
commit1d084fba1bd144538dfea22c322f1c148c821148 (patch)
tree7b7455ffbdb1a0ceae09ea8ccce473083279a3aa /src/Makefile.global.in
parent3f74daa8dfc634132ff7270212c57da5e316b001 (diff)
downloadpostgresql-1d084fba1bd144538dfea22c322f1c148c821148.tar.gz
Add ./configure check for "lz4" command
Some environments may compile with --with-lz4 while the command "lz4" goes missing, causing two failures in the TAP tests of pg_verifybackup (008_untar.pl and 010_client_untar.pl) as the code assumed that the command always existed with a hardcoded value in src/Makefile.global. Rather than this method, this adds a ./configure check based on PGAC_PATH_PROGS() to find automatically the command and get an absolute path to it. Both tests need to be adjusted for the case where the command does not exist, actually, as Makefile.global would set now LZ4 to an empty value in this case. The TAP tests of pg_receivewal already do that. Per report from buildfarm member copperhead, as an effect of dab2984. The origin of the failure is actually babbbb5 that did not centralize the check for the existence of a "lz4" command at ./configure to shave a few cycles. Note that one just needs to tweak an environment to move "lz4" out of the way to reproduce the problem, which is what I did to test this change. Per discussion with Robert Haas, Tom Lane, Andres Freund and myself. Discussion: https://postgr.es/m/Ygc51WVAFGocSu4h@paquier.xyz
Diffstat (limited to 'src/Makefile.global.in')
-rw-r--r--src/Makefile.global.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 05c54b27de..9dcd54fcbd 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -350,7 +350,7 @@ XGETTEXT = @XGETTEXT@
GZIP = gzip
BZIP2 = bzip2
-LZ4 = lz4
+LZ4 = @LZ4@
DOWNLOAD = wget -O $@ --no-use-server-timestamps
#DOWNLOAD = curl -o $@