From b727207a973722fb50d2bb0773cae730006b1a29 Mon Sep 17 00:00:00 2001 From: benaryorg Date: Wed, 23 Jul 2025 23:11:12 +0000 Subject: [PATCH] ceph: arrow 19 compilation fix with protobuf 30 It seems that Arrow 20 which broke compilation initially causes issues with our tests when the patch which was merged upstream is applied. At the same time the bundled Arrow 17 can't work with current Re2 due to its C++ version. The thing that broke the Arrow 19 build is because Arrow 19 is itself not compatible with Protobuf 30, which is pulled in somewhere along the dependency graph by something else causing linking issues. However, the patch for Protobuf 30 compat applies cleanly to our Arrow 19, which means we can dump the older version pin and instead use this patch to get Arrow 19 working again. Signed-off-by: benaryorg --- pkgs/tools/filesystems/ceph/arrow-cpp-19.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/filesystems/ceph/arrow-cpp-19.nix b/pkgs/tools/filesystems/ceph/arrow-cpp-19.nix index d39d01245588..d4226feffb52 100644 --- a/pkgs/tools/filesystems/ceph/arrow-cpp-19.nix +++ b/pkgs/tools/filesystems/ceph/arrow-cpp-19.nix @@ -8,6 +8,7 @@ stdenv, lib, fetchurl, + fetchpatch2, fetchFromGitHub, fixDarwinDylibNames, autoconf, @@ -42,7 +43,7 @@ openssl, perl, pkg-config, - protobuf_29, + protobuf, python3, rapidjson, re2, @@ -67,9 +68,6 @@ }: let - # https://github.com/apache/arrow/issues/45807 - protobuf = protobuf_29; - arrow-testing = fetchFromGitHub { name = "arrow-testing"; owner = "apache"; @@ -101,6 +99,15 @@ stdenv.mkDerivation (finalAttrs: { sourceRoot = "${finalAttrs.src.name}/cpp"; + patches = [ + (fetchpatch2 { + name = "protobuf-30-compat.patch"; + url = "https://github.com/apache/arrow/pull/46136.patch"; + hash = "sha256-WTpe/eT3himlCHN/R78w1sF0HG859mE2ZN70U+9N8Ag="; + stripLen = 1; + }) + ]; + # versions are all taken from # https://github.com/apache/arrow/blob/apache-arrow-${version}/cpp/thirdparty/versions.txt