From 5c525e6db0b32161d4dc104ca3bf8a640f719ee2 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 9 Jun 2022 22:04:39 +0100 Subject: [PATCH] gmtp: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: gmtp-preferences.o:src/main.h:72: multiple definition of `scrolledwindowMain'; gmtp-about.o:src/main.h:72: first defined here --- pkgs/applications/misc/gmtp/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/misc/gmtp/default.nix b/pkgs/applications/misc/gmtp/default.nix index 5f03b8ea7e76..9aeed0a7f578 100644 --- a/pkgs/applications/misc/gmtp/default.nix +++ b/pkgs/applications/misc/gmtp/default.nix @@ -18,6 +18,12 @@ stdenv.mkDerivation { enableParallelBuilding = true; + # Workaround build failure on -fno-common toolchains: + # ld: gmtp-preferences.o:src/main.h:72: multiple definition of + # `scrolledwindowMain'; gmtp-about.o:src/main.h:72: first defined here + # TODO: can be removed when 1.4.0 is released. + #NIX_CFLAGS_COMPILE = "-fcommon"; + preFixup = '' gappsWrapperArgs+=(--add-flags "--datapath $out/share"); '';