From ae2d8278061209e7fa14fe8767c9e9a99927b22b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 9 Jun 2022 22:50:11 +0100 Subject: [PATCH] spaceFM: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: spacefm-item-prop.o:src/settings.h:123: multiple definition of `xsets'; vfs/spacefm-vfs-file-info.o:src/settings.h:123: first defined here --- pkgs/applications/misc/spacefm/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/misc/spacefm/default.nix b/pkgs/applications/misc/spacefm/default.nix index 3d9f72048754..433109cd86af 100644 --- a/pkgs/applications/misc/spacefm/default.nix +++ b/pkgs/applications/misc/spacefm/default.nix @@ -21,6 +21,13 @@ stdenv.mkDerivation rec { ./x11-only.patch ]; + # Workaround build failure on -fno-common toolchains: + # ld: spacefm-item-prop.o:src/settings.h:123: multiple definition of + # `xsets'; vfs/spacefm-vfs-file-info.o:src/settings.h:123: first defined here + # TODO: can be removed once https://github.com/IgnorantGuru/spacefm/pull/772 + # or equivalent is merged upstream. + NIX_CFLAGS_COMPILE = "-fcommon"; + configureFlags = [ "--with-bash-path=${pkgs.bash}/bin/bash" ];