From d9efac4aa626f91470bf610bd168c3ec2c022149 Mon Sep 17 00:00:00 2001 From: whispers Date: Wed, 23 Sep 2026 16:31:39 -0400 Subject: [PATCH] afflib: fix build with gcc 16 libafflib.so fails to link due to undefined references when using GCC 16. --- pkgs/by-name/af/afflib/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/af/afflib/package.nix b/pkgs/by-name/af/afflib/package.nix index 58944ead3050..e939092afa10 100644 --- a/pkgs/by-name/af/afflib/package.nix +++ b/pkgs/by-name/af/afflib/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, zlib, curl, expat, @@ -22,6 +23,16 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "sha256-pGInhJQBhFJhft/KfB3J3S9/BVp9D8TZ+uw2CUNVC+Q="; }; + patches = [ + # libafflib.so fails to link due to undefined references when using GCC 16. + # https://github.com/sshock/AFFLIBv3/issues/60 + (fetchpatch { + name = "gcc16-missing-declarations.patch"; + url = "https://github.com/sshock/AFFLIBv3/commit/f35df6c1d2610e3233c30d50054c00e29d7d5a23.patch"; + hash = "sha256-D7/PnePwb7ikuHIo+3MBPp4PI8uN8vNJ1rZykeXDdxU="; + }) + ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ zlib