From f010bb13a961b2fe42477726ca63dc44676efd2c Mon Sep 17 00:00:00 2001 From: Bartlomiej Moskal Date: Tue, 28 May 2024 12:04:21 +0200 Subject: [PATCH] Coin: Extend script for fixing FFmpeg dependencies to stubs Add an additional parameter to disable the rpath setting. The rpath update somehow interferes with the ffmpeg libraries fails with: "java.lang.UnsatisfiedLinkError: dlopen failed: empty/none DT_HASH/DT_GNU_HASH" Task-number: QTBUG-122010 Change-Id: Idfe4addacee68edfb0f7ccaac1a19860c539c0e0 Reviewed-by: Artem Dyomin (cherry picked from commit 4f3b057d018e423f3998ceebc7a737032f9d9afc) Reviewed-by: Qt Cherry-pick Bot --- coin/provisioning/common/linux/fix_ffmpeg_dependencies.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coin/provisioning/common/linux/fix_ffmpeg_dependencies.sh b/coin/provisioning/common/linux/fix_ffmpeg_dependencies.sh index 7440fc4c..fc6301cf 100755 --- a/coin/provisioning/common/linux/fix_ffmpeg_dependencies.sh +++ b/coin/provisioning/common/linux/fix_ffmpeg_dependencies.sh @@ -6,6 +6,7 @@ set -x lib_dir="$1/lib" additional_suffix="${2:-}" +set_rpath="${3:-yes}" ffmpeg_libs=("avcodec" "avdevice" "avfilter" "avformat" "avutil" "swresample" "swscale") @@ -37,5 +38,7 @@ for lib_name in "${ffmpeg_libs[@]}"; do done <<< "$(readelf -d $lib_path | grep '(NEEDED)' )" sed -i -E "/^Libs.private:/s/ -l(va|va-x11|va-drm|ssl|crypto)/ -lQt6FFmpegStub-\\1/g;" $pkg_config_file_path - patchelf --set-rpath '$ORIGIN' $lib_path + if [[ "$set_rpath" == "yes" ]]; then + patchelf --set-rpath '$ORIGIN' $lib_path + fi done