From 2e3556fa128b778be62a7ffad5fbe78393035825 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 23 Oct 2020 04:57:05 +0200 Subject: [PATCH] pulse: Add libpulse path to rpath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are linking against PulseAudio’s libpulse, which adds its soname to DT_NEEDED but we are expecting to actually use our shim with the same soname from LIBPULSE_PATH (forced by adding the path to LD_LIBRARY_PATH). Package managers like Nix will detect that we are linking against PulseAudio’s libpulse and mark it as a runtime dependency by adding its path to DT_RUNPATH entry so that it can be easily found by the loader. LD_LIBRARY_PATH will take precedence but it will still pull PulseAudio into the system’s closure. --- pipewire-pulseaudio/src/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipewire-pulseaudio/src/meson.build b/pipewire-pulseaudio/src/meson.build index 50b4f4a57..1a2d0b68d 100644 --- a/pipewire-pulseaudio/src/meson.build +++ b/pipewire-pulseaudio/src/meson.build @@ -85,6 +85,7 @@ pipewire_pulse_mainloop_glib = shared_library('pulse-mainloop-glib', include_directories : [configinc], dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep], install : true, + install_rpath : libpulse_path_dlopen, install_dir : libpulse_path, ) @@ -97,5 +98,6 @@ pipewire_pulse_simple = shared_library('pulse-simple', include_directories : [configinc], dependencies : [pipewire_dep, pulseaudio_dep, mathlib, glib_dep], install : true, + install_rpath : libpulse_path_dlopen, install_dir : libpulse_path, )