mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pipewire-jack: Disable LD_LIBRARY_PATH when libjack is in libdir
This avoids prepending /usr/lib to the LD_LIBRARY_PATH, which supersedes DT_RUNPATH and can cause library confusion.
This commit is contained in:
parent
43db03909b
commit
fa7cd96b6e
2 changed files with 9 additions and 2 deletions
|
|
@ -21,12 +21,19 @@ libjack_path = get_option('libjack-path')
|
|||
if libjack_path == ''
|
||||
libjack_path = modules_install_dir / 'jack'
|
||||
libjack_path_dlopen = modules_install_dir_dlopen / 'jack'
|
||||
libjack_path_enable = ''
|
||||
elif libjack_path == get_option('libdir') or libjack_path == pipewire_libdir
|
||||
libjack_path = pipewire_libdir
|
||||
libjack_path_dlopen = libjack_path
|
||||
libjack_path_enable = '#'
|
||||
else
|
||||
libjack_path_dlopen = libjack_path
|
||||
libjack_path_enable = ''
|
||||
endif
|
||||
|
||||
tools_config = configuration_data()
|
||||
tools_config.set('LIBJACK_PATH', libjack_path_dlopen)
|
||||
tools_config.set('LIBJACK_PATH_ENABLE', libjack_path_enable)
|
||||
|
||||
configure_file(input : 'pw-jack.in',
|
||||
output : 'pw-jack',
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ if [ -n "$PERIOD" ]; then
|
|||
fi
|
||||
|
||||
# shellcheck disable=SC2016 # ${LIB} is interpreted by ld.so, not the shell
|
||||
LD_LIBRARY_PATH='@LIBJACK_PATH@'"${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}"
|
||||
export LD_LIBRARY_PATH
|
||||
@LIBJACK_PATH_ENABLE@LD_LIBRARY_PATH='@LIBJACK_PATH@'"${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}"
|
||||
@LIBJACK_PATH_ENABLE@export LD_LIBRARY_PATH
|
||||
|
||||
exec "$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue