Hi, The CompilerWarnings cspluspluscheck started failing recently.
1. LLVM library version issue. See commit message for details. 2. pg_verify_backup.h now uses simplehash.h, which references pg_fatal(), which nobody declared. I'm not sure why the first one started happening at the commit (aa2d6b15) that caused the second one, I feel like I'm missing something... https://github.com/postgres/postgres/commits/master/ Anyway, these patches turn it green for me. Please see attached. https://cirrus-ci.com/task/5014011601747968
From 0a0f45ce79907a0e967563ce7dc529429b604f4e Mon Sep 17 00:00:00 2001 From: Thomas Munro <thomas.mu...@gmail.com> Date: Sun, 18 Aug 2024 23:28:10 +1200 Subject: [PATCH 1/2] ci: Fix cpluspluscheck failure due to LLVM warnings. The virtual machine image used to run CompilerWarnings task now has two versions of LLVM installed. While configure is running with LLVM_CONFIG="llvm-config-16", cpluspluscheck was not smart enough to add it to the include search path, so it was finding LLVM 14's headers in /usr/include. Fix that. The warnings come from LLVM 14 headers, and are suppressed in normal building (see commit a56e7b66), but that didn't affect cpluspluscheck. An alternative fix might be to add the warning suppression, but then it doesn't really make sense for cplusplus check to be seeing different headers than the other build tasks. (Note that a proposed change would remove the warning-generating code, and we could then remove the warning suppression from commit a56e7b66 too, see commitfest submission #4920.) --- src/tools/pginclude/headerscheck | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/pginclude/headerscheck b/src/tools/pginclude/headerscheck index 436e2b92a3..5953e9d6bf 100755 --- a/src/tools/pginclude/headerscheck +++ b/src/tools/pginclude/headerscheck @@ -49,6 +49,7 @@ CXX=`sed -n 's/^CXX[ ]*=[ ]*//p' "$MGLOB"` PG_SYSROOT=`sed -n 's/^PG_SYSROOT[ ]*=[ ]*//p' "$MGLOB"` perl_includespec=`sed -n 's/^perl_includespec[ ]*=[ ]*//p' "$MGLOB"` python_includespec=`sed -n 's/^python_includespec[ ]*=[ ]*//p' "$MGLOB"` +llvm_includespec=`sed -n 's/^LLVM_CPPFLAGS[ ]*=[ ]*//p' "$MGLOB"` # needed on Darwin CPPFLAGS=`echo "$CPPFLAGS" | sed "s|\\\$(PG_SYSROOT)|$PG_SYSROOT|g"` @@ -235,6 +236,8 @@ do EXTRAINCLUDES="-I $builddir/src/backend/parser/" ;; src/backend/utils/adt/*) EXTRAINCLUDES="-I $builddir/src/backend/utils/adt/" ;; + src/include/jit/*) + EXTRAINCLUDES="$llvm_includespec" ;; *) EXTRAINCLUDES="" ;; esac -- 2.39.2
From 359461690fd89e79e67e649f1dac7e8898fd3dd2 Mon Sep 17 00:00:00 2001 From: Thomas Munro <thomas.mu...@gmail.com> Date: Sun, 18 Aug 2024 23:56:11 +1200 Subject: [PATCH 2/2] ci: Placate cpluspluscheck about pg_verifybackup.h. simplehash.h references pg_fatal(), which cpluspluscheck says is undeclared. --- src/bin/pg_verifybackup/pg_verifybackup.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/pg_verifybackup/pg_verifybackup.h b/src/bin/pg_verifybackup/pg_verifybackup.h index c395217788..d8c566ed58 100644 --- a/src/bin/pg_verifybackup/pg_verifybackup.h +++ b/src/bin/pg_verifybackup/pg_verifybackup.h @@ -16,6 +16,7 @@ #include "common/controldata_utils.h" #include "common/hashfn_unstable.h" +#include "common/logging.h" #include "common/parse_manifest.h" #include "fe_utils/simple_list.h" -- 2.39.2