From d63d50cdc044f74e052f6ad0bf98cf113612c13f Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Fri, 10 Apr 2026 21:49:54 +0400 Subject: [PATCH] fix(build): remove apostrophe from libc++_shared comment (broke docker bash -c quoting) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous commit d269600 added the libc++_shared.so copy step but the comment block included "Android's dynamic linker" — the apostrophe closed the enclosing `bash -c '...'` single-quoted string prematurely. Everything after "Android" was interpreted as wrapper-script bash instead of docker-container bash, so JNI_ABI_DIR (set inside the docker context) was unbound when the wrapper tried to use it. Build failed with: /tmp/wzp-tauri-build.sh: line 149: JNI_ABI_DIR: unbound variable Note the pre-existing script uses backticks in its comments ("cargo- tauri`s linker wiring") exactly to avoid this trap. Matched that style and added an explicit NOTE to the comment explaining the quoting hazard for future editors. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/build-tauri-android.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/build-tauri-android.sh b/scripts/build-tauri-android.sh index e28a440..b633e23 100755 --- a/scripts/build-tauri-android.sh +++ b/scripts/build-tauri-android.sh @@ -203,10 +203,13 @@ fi # wzp-native/build.rs uses cpp_link_stdlib(Some("c++_shared")) which adds # a NEEDED entry for libc++_shared.so to libwzp_native.so. cargo-ndk does # NOT copy the actual libc++_shared.so into jniLibs, so unless we copy it -# explicitly, the APK ships without it and Android's dynamic linker fails -# the dlopen with "library libc++_shared.so not found" at runtime. Same -# fix that build-and-notify.sh has had for the legacy wzp-android path -# (lines 126-134 there) — ported here for the Tauri pipeline. +# explicitly, the APK ships without it and the Android dynamic linker +# fails the dlopen with "library libc++_shared.so not found" at runtime. +# Same fix that build-and-notify.sh has had for the legacy wzp-android +# path (lines 126-134 there) — ported here for the Tauri pipeline. +# NOTE: no apostrophes in this comment block. The enclosing docker +# bash -c uses single quotes and a stray apostrophe closes the string +# prematurely, breaking variable scope for everything below. if [ ! -f "$JNI_ABI_DIR/libc++_shared.so" ]; then echo ">>> libc++_shared.so missing, copying from NDK..." NDK_LIBCXX=$(find "$ANDROID_NDK_HOME" -name "libc++_shared.so" -path "*/aarch64-linux-android/*" | head -1)