From 4e6b9a1d40887ab285a1a95ea041bf00d66b2c33 Mon Sep 17 00:00:00 2001 From: benaryorg Date: Sat, 26 Jul 2025 15:26:04 +0000 Subject: [PATCH 1/2] snappy: restore of RTTI patch This is required for *Ceph* to compile, as the comment states, and was accidentally removed. A similar patch is also present for *leveldb* for instance. Also bumps the patch to the appropriate version. partial revert of 5240499fb672c5f7e25cd84bff780062cb3cf75a Signed-off-by: benaryorg --- pkgs/by-name/sn/snappy/package.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/by-name/sn/snappy/package.nix b/pkgs/by-name/sn/snappy/package.nix index 566dddcc4473..40b0eba2f88a 100644 --- a/pkgs/by-name/sn/snappy/package.nix +++ b/pkgs/by-name/sn/snappy/package.nix @@ -3,6 +3,7 @@ stdenv, fetchFromGitHub, cmake, + fetchpatch, static ? stdenv.hostPlatform.isStatic, }: @@ -19,6 +20,22 @@ stdenv.mkDerivation rec { patches = [ ./revert-PUBLIC.patch + # Re-enable RTTI, without which other applications can't subclass snappy::Source + # While the patch was rejected upstream, it does not make it any less necessary to carry forward. + # ==> lack of RTTI *breaks* Ceph (and others) <== + # + # https://tracker.ceph.com/issues/53060 + # https://build.opensuse.org/package/show/openSUSE:Factory/snappy + # + # Should this patch fail to apply use the above site to get the updated patch (rev in the url below). + # On the page there's a "latest revision" section which lists the last request which was merged into it. + # Click the "Request " link, then view any file using "View file", and copy the rev from your address bar. + # For a different revision (in case nixpkgs is behind or something) you can go through the full revision history. + # Should the patch not be available for the nixpkgs version, ideally wait until the patch becomes available before bumping, or vendor it if necessary. + (fetchpatch { + url = "https://build.opensuse.org/public/source/openSUSE:Factory/snappy/reenable-rtti.patch?rev=e3449869b466869fc6b8a03a1a528fa6"; + hash = "sha256-JhVhkHh7XPx1Bzf5xnOgWLgwh1oihX3O+emQWzE4Dho="; + }) ]; outputs = [ From b727207a973722fb50d2bb0773cae730006b1a29 Mon Sep 17 00:00:00 2001 From: benaryorg Date: Wed, 23 Jul 2025 23:11:12 +0000 Subject: [PATCH 2/2] 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