apache-orc: explicitly specify C++17 for abseil-cpp

abseil exposes different interfaces depending on what is available in
`std` in a given C++ standard. gcc 16 defaults to C++20, thus causing
the default abseil-cpp to expose a different interface than the one
apache-orc (built with C++17) expects. this leads to a
great deal of "error: 'partial_ordering' has not been declared in 'std'"
and similar originating from abseil's types/compare.h. thus, we
explicitly override abseil to specify the desired C++ standard. this
happens through protobuf as abseil-cpp is in its propagatedBuildInputs.
This commit is contained in:
whispers
2026-07-24 15:02:23 -04:00
committed by Vladimír Čunát
parent a06d109d48
commit cedf46f815

View File

@@ -4,6 +4,7 @@
fetchFromGitHub,
fetchurl,
cmake,
abseil-cpp_202601,
gtest,
lz4,
protobuf,
@@ -13,6 +14,11 @@
}:
let
# This standard needs to match the version that orc uses, or compilation
# fails if the C++ standard version is different from the compiler's default.
# https://github.com/apache/orc/blob/3738b82366ba64cacae450e7e0e1702c66148afe/CMakeLists.txt#L108
protobuf' = protobuf.override { abseil-cpp = abseil-cpp_202601.override { cxxStandard = "17"; }; };
orc-format =
let
version = "1.1.1";
@@ -57,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
gtest
lz4
protobuf
protobuf'
snappy
zlib
zstd
@@ -81,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: {
GTEST_HOME = gtest.dev;
LZ4_HOME = lz4;
ORC_FORMAT_URL = orc-format;
PROTOBUF_HOME = protobuf;
PROTOBUF_HOME = protobuf';
SNAPPY_HOME = snappy.dev;
ZLIB_HOME = zlib.dev;
ZSTD_HOME = zstd.dev;