From d308044690fbf91cd6bfc2afe75cce28a4813647 Mon Sep 17 00:00:00 2001 From: Krystie Date: Sat, 27 Jun 2026 17:09:51 -0700 Subject: [PATCH] ci: strip -std=c++17 from rocksdb.pc Cflags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RocksDB's install-shared writes a rocksdb.pc with both: -isystem third-party/gtest-1.8.1/fused-src -std=c++17 The previous PR fix scrubbed the bad include path but left -std=c++17. pkg-config consumers inherit that flag via INTERFACE_COMPILE_OPTIONS, which propagates to CMake imported targets as a compile option. Result: Triangles' configure sets CXX_STANDARD 20, but the compile command line ends up with '-std=c++20 ... -std=c++17' (rocksdb.pc's flag comes last and wins). GCC reports: error: defaulted 'bool operator!=...' only available with '-std=c++20' or '-std=gnu++20' Strip -std=c++17 from Cflags. Triangles sets its own standard via CMake; the flag from rocksdb.pc was never useful anyway (consumers should choose their own standard). This bug only surfaced now because we replaced librocksdb-dev 6.11.4 with a locally-built RocksDB 8.9.1 — the system package's .pc didn't have this -std flag, the freshly-built one does. --- scripts/ci/build-rocksdb.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci/build-rocksdb.sh b/scripts/ci/build-rocksdb.sh index 15f4355..515bafa 100755 --- a/scripts/ci/build-rocksdb.sh +++ b/scripts/ci/build-rocksdb.sh @@ -57,6 +57,8 @@ if [ -f "${PC_FILE}" ]; then sed -i \ -e "s|-isystem third-party/gtest-1.8.1/fused-src|-I${INSTALL_PREFIX}/include|g" \ -e "s|-isystem \\\${prefix}/third-party/gtest-1.8.1/fused-src|-I${INSTALL_PREFIX}/include|g" \ + -e 's|-std=c++17 ||g' \ + -e 's|-std=c++17$||g' \ "${PC_FILE}" fi