Spent 10+ builds chasing a __init_tcb+4 / pthread_create SIGSEGV after adding the oboe audio backend. Every "fix" made things worse. Reverting all Android-specific files to the state at35642d1(build #6), which was the last commit where the Tauri Android app actually launched, rendered the home screen, and successfully registered on a relay. Reverted files (all back to their35642d1content): - desktop/src-tauri/Cargo.toml (no build-dep cc, no tracing-android) - desktop/src-tauri/build.rs (git hash only, no Oboe / cc build) - desktop/src-tauri/src/lib.rs (engine cfg-gated on non-android) - desktop/src-tauri/src/main.rs (two-line desktop entry) - desktop/src-tauri/src/engine.rs (desktop-only audio setup) - scripts/Dockerfile.android-builder (no android24→26 clang shim) - scripts/build-tauri-android.sh (no linker env vars / manifest patch) Deleted (were added betweenb314138ande2e023d): - desktop/src-tauri/cpp/getauxval_fix.c - desktop/src-tauri/cpp/oboe_bridge.{h,cpp} - desktop/src-tauri/cpp/oboe_stub.cpp - desktop/src-tauri/src/oboe_audio.rs Next: rebuild image on remote (to drop the baked-in clang shim), build an APK, install on Pixel 6, verify the UI renders the same way build #6 did. From there we add features back ONE at a time so we can actually bisect which one triggers the tao::ndk_glue crash. User's rule: "if you want to change stack, change incrementally, so we can debug". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -74,27 +74,6 @@ RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/nu
|
||||
"platform-tools" \
|
||||
2>&1 | grep -v '^\[' > /dev/null
|
||||
|
||||
# Work around broken API-24 libc/libdl stubs in the NDK. Rust's pre-compiled
|
||||
# libstd.rlib for aarch64-linux-android links against pthread_create / dlsym
|
||||
# from the sysroot. With --target=...24, those resolve to the API-24 "stub"
|
||||
# libc.a/libdl.a that return "libdl.a is a stub --- use libdl.so instead" at
|
||||
# runtime. API-26 has real dynamic bindings. Tauri-cli hard-codes the
|
||||
# android24-clang path so env var overrides don't stick.
|
||||
#
|
||||
# Permanent fix inside the image: replace every `${abi}24-clang` binary with
|
||||
# a shim that exec()s the corresponding `${abi}26-clang`. Any build using
|
||||
# this image now transparently gets the API-26 sysroot even when the caller
|
||||
# asks for API-24.
|
||||
RUN set -eux; \
|
||||
BIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin; \
|
||||
for abi in aarch64-linux-android armv7a-linux-androideabi i686-linux-android x86_64-linux-android; do \
|
||||
for suffix in clang clang++; do \
|
||||
mv "$BIN/${abi}24-${suffix}" "$BIN/${abi}24-${suffix}.orig"; \
|
||||
printf '#!/bin/sh\nexec "%s/%s26-%s" "$@"\n' "$BIN" "$abi" "$suffix" > "$BIN/${abi}24-${suffix}"; \
|
||||
chmod +x "$BIN/${abi}24-${suffix}"; \
|
||||
done; \
|
||||
done
|
||||
|
||||
# Make SDK world-readable so builder user can access it
|
||||
RUN chmod -R a+rX $ANDROID_HOME
|
||||
|
||||
|
||||
Reference in New Issue
Block a user