From c9f22532e4caf25c46f1d966aca13e9d0e97938d Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 21 Feb 2022 07:52:42 +0000 Subject: [PATCH] pipewire_0_2: add -fcommon workaround Without the change build fails as: $ nix build --impure --expr 'with import ./. {}; pipewire_0_2.override { stdenv = clang12Stdenv; }' -L ... ld: spa/plugins/bluez5/libspa-bluez5.so.p/bluez5-monitor.c.o:(.bss+0x0): multiple definition of `spa_a2dp_sink_factory' Newer versions don't require the fix as upstream removed the code completely later. --- pkgs/development/libraries/pipewire/0.2.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/pipewire/0.2.nix b/pkgs/development/libraries/pipewire/0.2.nix index d21ceafbcf9d..16c8d5d25128 100644 --- a/pkgs/development/libraries/pipewire/0.2.nix +++ b/pkgs/development/libraries/pipewire/0.2.nix @@ -28,6 +28,11 @@ in stdenv.mkDerivation rec { alsa-lib ffmpeg_4 libjack2 udev libva xorg.libX11 sbc SDL2 ]; + # Workaround build on gcc-10+ and clang11+: + # spa/plugins/bluez5/libspa-bluez5.so.p/bluez5-monitor.c.o:(.bss+0x0): + # multiple definition of `spa_a2dp_sink_factory' + NIX_CFLAGS_COMPILE = [ "-fcommon" ]; + mesonFlags = [ "-Ddocs=true" "-Dgstreamer=enabled"