ci(mobile): symlink legacy NDK binutils so vendored OpenSSL cross-compiles for Android#6335
Merged
Conversation
…piles for Android The Android Tauri builds — mobile-smoke `Android (debug, unsigned)` and release `Mobile / Android (aab + apk)` — have failed on main since OpenSSL was vendored unconditionally (#6279). openssl-src builds OpenSSL from source for `aarch64-linux-android` and runs `make install_dev`, which shells out to `aarch64-linux-android-ranlib` via its `CROSS_COMPILE` prefix. NDK r23+ (this repo pins r27) removed the legacy `<target>-ranlib` / `-ar` wrappers in favour of `llvm-ranlib` / `llvm-ar`, so the build dies with `ranlib: not found` (exit 127) at the archive-indexing step. Symlink the legacy-named `ar`/`ranlib`/`nm`/`strip` to their `llvm-*` equivalents right after `NDK_HOME` is exported, in both the smoke and release Android jobs. `release.yml` also builds `armv7-linux-androideabi`, so both ABI prefixes are linked there. The same-target `CLI / aarch64-linux-android` job already passes — only the Tauri desktop/mobile build pulls the vendored `openssl-sys`, which is why this surfaced only on the mobile legs.
Contributor
Author
|
Verification run (Mobile Build Smoke dispatched against this branch): https://github.com/librefang/librefang/actions/runs/28225522115 The |
houko
enabled auto-merge (squash)
June 26, 2026 08:07
houko
added a commit
that referenced
this pull request
Jun 26, 2026
…b symlink (#6338) #6335 symlinked the legacy `<target>-ranlib` / `-ar` / `-nm` / `-strip` names to their llvm equivalents inside the NDK bin directory, but that directory is not on `$PATH`, so the Android Tauri builds still failed with `aarch64-linux-android-ranlib: not found` (exit 127). The CI log shows why the symlink alone was not enough: openssl-src invokes Configure as `env -u CROSS_COMPILE AR="<abs>/llvm-ar" ... RANLIB="aarch64-linux-android-ranlib"` — it passes AR as an absolute path but RANLIB as a bare command name, so RANLIB is resolved through a `$PATH` lookup that never included the NDK bin directory. Append `$NDK_BIN` to `$GITHUB_PATH` in the symlink step (mobile-smoke.yml aarch64 job, release.yml aarch64 + armv7 job) so the bare-name RANLIB resolves to the symlink. The symlinks themselves are unchanged. Verification: cannot reproduce the Android cross-compile locally (Linux-only, NDK r27 host toolchain); the fix is grounded in the run-28226134802 log line `RANLIB="aarch64-linux-android-ranlib"` (bare name) versus `AR="<abs>/llvm-ar"` (absolute), and `AR` resolving from exactly the `$NDK_BIN` dir we symlink into. Both workflow files pass `yaml.safe_load`. Co-authored-by: Evan <[email protected]>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Android Tauri legs have been red on
mainfor days, independent of any feature work:Mobile Build Smoke / Android (debug, unsigned)(push-to-main canary)Release / Mobile / Android (aab + apk)(continue-on-error: true, so it does not block a release but ships no Android artifact)Both fail at the same spot while building vendored OpenSSL for
aarch64-linux-android:This is pre-existing — the
v2026.6.24-beta.23release run shows the sameMobile / Android: failure, andmobile-smokehas failed on every relevant main push since 2026-06-23.Root cause
#6279vendored OpenSSL unconditionally so cross-compiled targets link.openssl-srcthen builds OpenSSL from source for Android and runsmake install_dev, which archives via${CROSS_COMPILE}ranlib=aarch64-linux-android-ranlib.NDK r23+ removed the legacy GNU-style
<target>-ar/-ranlibwrappers in favour ofllvm-ar/llvm-ranlib. This repo pins NDK r27 (27.0.12077973), soaarch64-linux-android-ranlibdoes not exist and the archive-indexing step exits 127.The same-target
CLI / aarch64-linux-androidjob passes — only the Tauri desktop/mobile build pulls the vendoredopenssl-sys, which is why this surfaced solely on the mobile legs.Fix
After
NDK_HOMEis exported, symlink the legacy-namedar/ranlib/nm/stripto theirllvm-*equivalents in the NDK toolchain bin, in both Android jobs:.github/workflows/mobile-smoke.yml—aarch64-linux-android-*.github/workflows/release.yml—aarch64-linux-android-*andarm-linux-androideabi-*(this job also buildsarmv7-linux-androideabi)Minimal and additive: it only provides names the modern NDK dropped; nothing else in the toolchain changes.
Verification
Mobile Build Smokeagainst this branch — see the run linked in a comment below. (mobile-smoke.ymldoes not run on PRs by design — ~25 min cold NDK build — but it supportsworkflow_dispatch, which reads the workflow + checks out the code from this branch, so the dispatched run exercises exactly this fix.)Cannot be reproduced on the macOS dev host (no Linux Android NDK cross-compile); the CI Android job is the authoritative check.