docs: Cuprate cross-compiles for Android aarch64 (NDK r28c, minSdk 26) #93
Loading…
Reference in a new issue
No description provided.
Delete branch "wt/cuprate-android-crosscompile-spike"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spike answer for the Phase 1 Android question (kanban
t_8293d96d): does the Cuprate-in-process dependency tree cross-compile for the Android NDK targetaarch64-linux-android?Yes. Both halves were run, on the
cuprate-pocgraph (cupratedgit4f8fcd1b,randomx-rsgit76c2385,arti-client0.46 + 0.44):cargo check --release --target aarch64-linux-android-> EXIT=0 (cold target dir: 152 crates, 43.66 s)cargo build --release+ link -> EXIT=0;filesaysELF 64-bit LSB pie executable, ARM aarch64 ... interpreter /system/bin/linker64, for Android 26, built by NDK r28cRandomX (the C++ part):
librandomx.amemberaes_hash.cpp.oisELF64 / AArch64(readelf -h) - real cross-built objectsjit_compiler_a64.cpp.o,jit_compiler_a64_static.S.o),-march=armv8-a+crypto,HAVE_HWCAPDARCH=nativefromrandomx-rs's build.rs is a no-op (RandomX's CMakeLists never readsDARCH), so no-march=nativehost-arch hazard todayWhat the doc records (
docs/cuprate-android-spike.md), each item cost a run:PATHmust put rustup's cargo/rustc first, elseE0463 can't find crate for std.cargo check --target ...is not enough - cc-rs cannot findaarch64-linux-android-clangandlibsqlite3-sysfails first;cargo ndk-envsupplies the NDK C toolchain env.ANDROID_NDK/ANDROID_NDK_ROOTexported orAndroid-Determine.cmakeaborts ("Neither the NDK or a standalone toolchain was found"), even though cmake-rs passesCMAKE_SYSTEM_NAME=Android.cargo-ndk-env's exported LINKER iscargo-ndkitself, which dies on rustc's-Wl,...args ("unexpected argument '-W' found") and leaves a stale directory namedlibrandomx_rs-<hash>.sointarget/.../depsthat breaks the next run; use the NDK clang as linker.-lc++_static -lc++abi(NDK'slibstdc++.ais a stub;-static-libstdc++is ignored by NDK clang) and-lclang_rt.builtins-aarch64-androidfor RandomX's__clear_cache.-P 26, matchingandroid/app/build.gradle.ktsminSdk), because at the NDK default 21rand's fork handler leavespthread_atforkundefined (API 23+).Scope: docs only - one new file plus one sentence in
docs/payment-integration-plan.mdsection 7a. The spike harness and logs live under/var/tmp/cuprate-android-pocand are not committed (throwaway spike code). No repo build was run because the change is documentation; the evidence is cargo/cmake output.Not claimed: a
cargo ndk/ Gradle build of the SDK with Cuprate in it, and runtime behaviour on a device. The remaining Android work is packaging plumbing (wiring those link args intocargoBuildAndroid), not a Cuprate gap.