From e4cb4bdb05605d691ca31b54703f2866197944ef Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Jun 2022 19:48:01 +0100 Subject: [PATCH] gnaural: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: src/net/../gnauralnet.h:233: multiple definition of `GN_ScheduleFingerprint'; src/net/../../src/gnauralnet.h:233: first defined here --- pkgs/applications/audio/gnaural/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/audio/gnaural/default.nix b/pkgs/applications/audio/gnaural/default.nix index 10c199d94b69..1cdea4629bbc 100644 --- a/pkgs/applications/audio/gnaural/default.nix +++ b/pkgs/applications/audio/gnaural/default.nix @@ -12,6 +12,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ gtk2 libsndfile portaudio ]; + # Workaround build failure on -fno-common toolchains: + # ld: src/net/../gnauralnet.h:233: multiple definition of `GN_ScheduleFingerprint'; + # src/net/../../src/gnauralnet.h:233: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + postInstall = '' mkdir -p $out/share/applications substitute \