From 298b76dabccf848a50a823ab10f66bd3ba42725a Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 20 May 2022 08:29:11 +0100 Subject: [PATCH] djmount: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: libupnp/upnp/.libs/libupnp.a(libupnp_la-gena_ctrlpt.o):libupnp/upnp/src/inc/upnpapi.h:163: multiple definition of `pVirtualDirList'; libupnp/upnp/.libs/libupnp.a(libupnp_la-upnpapi.o):libupnp/upnp/src/inc/upnpapi.h:163: first defined here --- pkgs/tools/filesystems/djmount/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/djmount/default.nix b/pkgs/tools/filesystems/djmount/default.nix index 3111be5b4d12..b53656a069e3 100644 --- a/pkgs/tools/filesystems/djmount/default.nix +++ b/pkgs/tools/filesystems/djmount/default.nix @@ -17,7 +17,13 @@ stdenv.mkDerivation rec { ''; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ fuse]; + buildInputs = [ fuse ]; + + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: libupnp/upnp/.libs/libupnp.a(libupnp_la-gena_ctrlpt.o):libupnp/upnp/src/inc/upnpapi.h:163: + # multiple definition of `pVirtualDirList'; libupnp/upnp/.libs/libupnp.a(libupnp_la-upnpapi.o):libupnp/upnp/src/inc/upnpapi.h:163: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; meta = { homepage = "http://djmount.sourceforge.net/";