From 84635a6e17a8907b1f28d3efb9d3b98ea61cbe66 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 14 Oct 2021 14:42:44 +0200 Subject: apitrace: fix build w/glibc-2.34 Failing Hydra build: https://hydra.nixos.org/build/155150225 --- pkgs/applications/graphics/apitrace/default.nix | 6 ++++++ pkgs/applications/graphics/apitrace/glibc-2.34-compat.patch | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/applications/graphics/apitrace/glibc-2.34-compat.patch diff --git a/pkgs/applications/graphics/apitrace/default.nix b/pkgs/applications/graphics/apitrace/default.nix index f842cf6f5c4b8..756f0da9f3481 100644 --- a/pkgs/applications/graphics/apitrace/default.nix +++ b/pkgs/applications/graphics/apitrace/default.nix @@ -11,6 +11,12 @@ stdenv.mkDerivation rec { owner = "apitrace"; }; + patches = [ + # glibc 2.34 compat + # derived from https://github.com/apitrace/apitrace/commit/d28a980802ad48568c87da02d630c8babfe163bb + ./glibc-2.34-compat.patch + ]; + # LD_PRELOAD wrappers need to be statically linked to work against all kinds # of games -- so it's fine to use e.g. bundled snappy. buildInputs = [ libX11 procps python2 libdwarf qtbase qtwebkit ]; diff --git a/pkgs/applications/graphics/apitrace/glibc-2.34-compat.patch b/pkgs/applications/graphics/apitrace/glibc-2.34-compat.patch new file mode 100644 index 0000000000000..3f8cebe030c04 --- /dev/null +++ b/pkgs/applications/graphics/apitrace/glibc-2.34-compat.patch @@ -0,0 +1,13 @@ +diff --git a/wrappers/dlsym.cpp b/wrappers/dlsym.cpp +index 2eda082..0c0c8ee 100644 +--- a/wrappers/dlsym.cpp ++++ b/wrappers/dlsym.cpp +@@ -34,7 +34,7 @@ + #include "os.hpp" + + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 34 + + + #include -- cgit 1.4.1