From 5217ba2d0a13ce979b24b2c9ba49b508694205a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Petter=20Sk=C3=A5lerud?= Date: Wed, 10 Dec 2025 13:24:39 +0100 Subject: [PATCH] FFmpeg, Android: Use 'llvm-strip' from Android NDK explicitly When running 'install-ffmpeg-android.sh' on Ubuntu hosts, it may fail due to the FFmpeg build process using the host's 'strip' executable. This causes the build to fail due to the 'strip' throwing an error due to it not being able to recognize the format of the .so files for the FFmpeg Android build. This patch solves this by explicitly using the executable 'llvm-strip' command from the Android NDK. Pick-to: 6.10 6.8 Change-Id: Ia32c31e3e9d1f550a026f2684362e19d663a8863 Reviewed-by: Assam Boudjelthia (cherry picked from commit c5a42f267fceb277ea79a910914f724558a71944) Reviewed-by: Qt Cherry-pick Bot --- coin/provisioning/common/unix/install-ffmpeg-android.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coin/provisioning/common/unix/install-ffmpeg-android.sh b/coin/provisioning/common/unix/install-ffmpeg-android.sh index 3dcf8e69..01a2e9e3 100755 --- a/coin/provisioning/common/unix/install-ffmpeg-android.sh +++ b/coin/provisioning/common/unix/install-ffmpeg-android.sh @@ -82,12 +82,13 @@ build_ffmpeg_android() { local cc=${toolchain_bin}/${target_toolchain_arch}${api_version}-clang local ar=${toolchain_bin}/llvm-ar local ranlib=${toolchain_bin}/llvm-ranlib + local strip=${toolchain_bin}/llvm-strip local ffmpeg_config_options ffmpeg_config_options=$(get_ffmpeg_config_options $build_type) ffmpeg_config_options+=" --enable-cross-compile --target-os=android --enable-jni --enable-mediacodec --enable-openssl --enable-pthreads --enable-neon --disable-asm --disable-indev=android_camera" ffmpeg_config_options+=" --arch=$target_arch --cpu=${target_cpu} --sysroot=${sysroot} --sysinclude=${sysroot}/usr/include/" - ffmpeg_config_options+=" --cc=${cc} --cxx=${cxx} --ar=${ar} --ranlib=${ranlib}" + ffmpeg_config_options+=" --cc=${cc} --cxx=${cxx} --ar=${ar} --ranlib=${ranlib} --strip=${strip}" ffmpeg_config_options+=" --extra-cflags=-I${openssl_include} --extra-ldflags=-L${openssl_libs}" if [ $page_size == "use_16kb_page_size" ]; then ffmpeg_config_options+=" --extra-ldflags=-Wl,-z,max-page-size=16384"