From 8b8fb6d80e45508bb77fee2d68e9b390ecc7b34a Mon Sep 17 00:00:00 2001 From: "Stephan Guilloux (cos)" Date: Sat, 1 Oct 2022 03:20:58 +0200 Subject: [PATCH] Problem: Android helpers no not validate dependent libraries. Seen in the code: ``` function android_build_verify_so { ... for dep_soname do if [[ $elfoutput != *"library: [${dep_soname}]"* ]]; then ANDROID_BUILD_FAIL+=("Library ${soname} was expected to be linked to library with soname:") ANDROID_BUILD_FAIL+=(" ${dep_soname}") fi done ``` The `for xxx` syntax is wrong, most probably a typo somewhere. Solution: Fix & complete the `for xxx` loop. Tested with & without LIBSODIUM (only available dependent library for LIBZMQ). Note: The same has to be done in ZPROJECT, for CZMQ & ZYRE. --- builds/android/android_build_helper.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builds/android/android_build_helper.sh b/builds/android/android_build_helper.sh index 91e9be82..31023675 100644 --- a/builds/android/android_build_helper.sh +++ b/builds/android/android_build_helper.sh @@ -320,8 +320,12 @@ function android_build_verify_so { ANDROID_BUILD_FAIL+=(" ${elfoutput}") fi - for dep_soname do - if [[ $elfoutput != *"library: [${dep_soname}]"* ]]; then + for dep_soname in "$@" ; do + local dep_sofile="${ANDROID_BUILD_PREFIX}/lib/${dep_soname}" + if [ ! -f "${dep_sofile}" ]; then + ANDROID_BUILD_FAIL+=("Found no library named ${dep_soname}") + ANDROID_BUILD_FAIL+=(" ${dep_sofile}") + elif [[ $elfoutput != *"library: [${dep_soname}]"* ]]; then ANDROID_BUILD_FAIL+=("Library ${soname} was expected to be linked to library with soname:") ANDROID_BUILD_FAIL+=(" ${dep_soname}") fi