From 7ac1f68ce29bf49bc1f235c6868bc75c50b07a9e Mon Sep 17 00:00:00 2001 From: Jan Stranik Date: Tue, 4 Oct 2022 14:49:13 -0400 Subject: [PATCH] build2: fix build with gcc11 A small source change is needed to make the build2 system compile with current gcc 11 compiler. Without the patch, the compilation fails with an error about failing to deduce a template parameter. --- .../tools/build-managers/build2/default.nix | 2 ++ .../build2/remove-const-void-param.patch | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 pkgs/development/tools/build-managers/build2/remove-const-void-param.patch diff --git a/pkgs/development/tools/build-managers/build2/default.nix b/pkgs/development/tools/build-managers/build2/default.nix index 7b64c14e2ec3..40899903df29 100644 --- a/pkgs/development/tools/build-managers/build2/default.nix +++ b/pkgs/development/tools/build-managers/build2/default.nix @@ -32,6 +32,8 @@ stdenv.mkDerivation rec { ./remove-config-store-paths.patch # Pick up sysdirs from NIX_LDFLAGS ./nix-ldflags-sysdirs.patch + + ./remove-const-void-param.patch ]; strictDeps = true; diff --git a/pkgs/development/tools/build-managers/build2/remove-const-void-param.patch b/pkgs/development/tools/build-managers/build2/remove-const-void-param.patch new file mode 100644 index 000000000000..a0fd973caabb --- /dev/null +++ b/pkgs/development/tools/build-managers/build2/remove-const-void-param.patch @@ -0,0 +1,11 @@ +--- build2-0.14.0_/libbuild2/cc/pkgconfig.cxx 2022-10-04 14:18:24.864604892 -0400 ++++ build2-0.14.0/libbuild2/cc/pkgconfig.cxx 2022-10-04 14:20:58.153254961 -0400 +@@ -186,7 +186,7 @@ + ; + + static bool +- pkgconf_error_handler (const char* msg, const pkgconf_client_t*, const void*) ++ pkgconf_error_handler (const char* msg, const pkgconf_client_t*, void*) + { + error << runtime_error (msg); // Sanitize the message. + return true;