Hi,

On 2024-07-15 12:37:54 -0700, Andres Freund wrote:
> On 2024-07-15 11:30:59 -0700, Andres Freund wrote:
> > On 2024-07-15 09:43:26 -0700, Andres Freund wrote:
> > > I've now applied the guc fix to all branches and the CI changes to 15+.
> >
> > Ugh. I see that this fails on master, because of
> >
> > commit 0c3930d0768
> > Author: Peter Eisentraut <pe...@eisentraut.org>
> > Date:   2024-07-01 07:30:38 +0200
> >
> >     Apply COPT to CXXFLAGS as well
> >
> > I hadn't seen that because of an independent failure (the macos stuff, I'll
> > send an email about it in a bit).
> >
> > Not sure what the best real fix here is, this is outside of our code. I'm
> > inclined to just disable llvm for the compiler warning task for now.
>
> Oh - there's a better fix: Turns out bookworm does have llvm 16, where the
> warning has been fixed. Upgrading the CI image to install llvm 16 should fix
> this.   Any arguments against that approach?

Specifically, something like the attached.

Due to the CI failure this is causing, I'm planning to apply this soon...

Arguably we could backpatch this, the warning are present on older branches
too. Except that they don't cause errors, as 0c3930d0768 is only on master.

Greetings,

Andres
>From e696e8ded144095c4c4435d2e729fa37ed9e6903 Mon Sep 17 00:00:00 2001
From: Andres Freund <and...@anarazel.de>
Date: Mon, 15 Jul 2024 14:08:38 -0700
Subject: [PATCH v1 1/4] ci: Use newer llvm version with gcc

gcc emits a warning for LLVM 14 code outside of our control. To avoid that,
update to a newer LLVM version. Do so both in the CompilerWarnings and normal
tasks - the latter don't fail, but the warnings make it more likely that we'd
miss other warnings.

The warning has been fixed in newer LLVM versions.

Discussion: https://postgr.es/m/20240715193754.awdxgrzurxnww...@awork3.anarazel.de
---
 .cirrus.tasks.yml | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/.cirrus.tasks.yml b/.cirrus.tasks.yml
index b14fe91cdb7..df476a1d65a 100644
--- a/.cirrus.tasks.yml
+++ b/.cirrus.tasks.yml
@@ -272,6 +272,8 @@ task:
     LDFLAGS: $SANITIZER_FLAGS
     CC: ccache gcc
     CXX: ccache g++
+    # GCC emits a warning for llvm-14, so switch to a newer one.
+    LLVM_CONFIG: llvm-config-16
 
     LINUX_CONFIGURE_FEATURES: *LINUX_CONFIGURE_FEATURES
     LINUX_MESON_FEATURES: *LINUX_MESON_FEATURES
@@ -334,7 +336,7 @@ task:
             \
             ${LINUX_CONFIGURE_FEATURES} \
             \
-            CLANG="ccache clang"
+            CLANG="ccache clang-16"
         EOF
       build_script: su postgres -c "make -s -j${BUILD_JOBS} world-bin"
       upload_caches: ccache
@@ -689,6 +691,8 @@ task:
   # different compilers to build with different combinations of dtrace on/off
   # and cassert on/off.
 
+  # GCC emits a warning for llvm-14, so switch to a newer one.
+
   # gcc, cassert off, dtrace on
   always:
     gcc_warning_script: |
@@ -696,7 +700,8 @@ task:
         --cache gcc.cache \
         --enable-dtrace \
         ${LINUX_CONFIGURE_FEATURES} \
-        CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
+        CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang-16" \
+        LLVM_CONFIG=llvm-config-16
       make -s -j${BUILD_JOBS} clean
       time make -s -j${BUILD_JOBS} world-bin
 
@@ -707,7 +712,8 @@ task:
         --cache gcc.cache \
         --enable-cassert \
         ${LINUX_CONFIGURE_FEATURES} \
-        CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang"
+        CC="ccache gcc" CXX="ccache g++" CLANG="ccache clang-16" \
+        LLVM_CONFIG=llvm-config-16
       make -s -j${BUILD_JOBS} clean
       time make -s -j${BUILD_JOBS} world-bin
 
@@ -755,7 +761,7 @@ task:
         --cache gcc.cache \
         CC="ccache gcc" \
         CXX="ccache g++" \
-        CLANG="ccache clang"
+        CLANG="ccache clang-16"
       make -s -j${BUILD_JOBS} clean
       time make -s -j${BUILD_JOBS} -C doc
 
-- 
2.45.2.746.g06e570c0df.dirty

Reply via email to