Skip to content

fix(ci): vendor OpenSSL unconditionally so cross-compiled release targets link#6279

Merged
houko merged 3 commits into
mainfrom
fix/release-openssl-vendored
Jun 23, 2026
Merged

fix(ci): vendor OpenSSL unconditionally so cross-compiled release targets link#6279
houko merged 3 commits into
mainfrom
fix/release-openssl-vendored

Conversation

@houko

@houko houko commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Problem

The Release workflow has failed on every tag since beta.21 (also beta.22, #6273). The CLI / * build jobs for every cross-compiled target die in ~4 min during Build CLI:

  • aarch64-unknown-linux-gnu, *-apple-darwin, aarch64-linux-android, *-musl (static)error: failed to run custom build command for openssl-sys v0.9.117
  • Android: Could not find directory of OpenSSL installation
  • Linux/macOS cross: This crate is only compatible with OpenSSL (1.1.0, 1.1.1, 3.x, 4.x) … but a different version of OpenSSL was found (it picked up the build host's 1.0.2g, version_number=1000207f)

The native x86_64-unknown-linux-gnu and Windows jobs pass, which is why it looked intermittent.

Root cause

webauthn-rs (via webauthn-rs-core) pulls in openssl-sys as a non-optional transitive dependency for every target, so every release build must resolve an OpenSSL library. #6161 added openssl = { version = "0.10", features = ["vendored"] } to fix the Windows MSVC runners — but placed it under [target.'cfg(windows)'.dependencies], so the vendored feature only unified on Windows.

Every cross-compiled target therefore still built openssl-sys in non-vendored mode and probed the build host for OpenSSL — which has no usable cross library. Native x86_64-linux happened to have system OpenSSL 3.x and Windows had vendored, so only those two passed.

Fix

Move the openssl dependency from the Windows-only section to the unconditional [dependencies] section. Feature-unification now builds openssl-sys from source (openssl-src) on all targets instead of probing for a system library.

This is the standard, supported approach for cross builds, and as a bonus makes the released native binaries self-contained (statically linked OpenSSL) rather than depending on the user's system OpenSSL at runtime. ubuntu-22.04, macos-latest, and the cross images all ship the Perl + C-compiler prerequisites openssl-src needs; nasm is auto-detected with a no-asm fallback.

Supersedes the Windows-only #6161.

Verification

  • One-line dependency-section relocation; the vendored feature itself is already proven (it is how the Windows release jobs succeed today).
  • Could not compile locally (no native toolchain; Docker dev image's daemon was offline this session) — the real verification is the Release workflow re-running green on the next tag across every CLI target. The build matrix is unchanged otherwise.

@github-actions github-actions Bot added size/S 10-49 lines changed size/XS < 10 lines changed area/ci CI/CD and build tooling and removed size/S 10-49 lines changed size/XS < 10 lines changed labels Jun 22, 2026
@houko
houko enabled auto-merge (squash) June 22, 2026 23:52
Evan and others added 3 commits June 23, 2026 09:27
…gets link

webauthn-rs (via webauthn-rs-core) pulls in openssl-sys as a non-optional transitive dependency for every target, so every release build must resolve an OpenSSL library. #6161 added `openssl = { features = ["vendored"] }` but placed it under `[target.'cfg(windows)'.dependencies]`, so the vendored feature only activated on Windows.

That fixed the Windows MSVC runners but left every cross-compiled target broken: aarch64-unknown-linux-gnu, x86_64/aarch64-apple-darwin, aarch64-linux-android, and the musl static targets have no usable cross OpenSSL, so openssl-sys falls back to probing the build host and either fails to find a directory (Android: "Could not find directory of OpenSSL installation") or finds the host's 1.0.2g and aborts on the version mismatch. The Release workflow has failed on every tag since (beta.21, beta.22).

Move the dependency to the unconditional `[dependencies]` section so feature-unification builds openssl-sys from source on all targets. Vendoring (openssl-src) is the standard, supported path for `cross` builds and also makes the released native binaries self-contained instead of depending on the user's system OpenSSL at runtime. ubuntu-22.04, macos-latest, and the cross images all ship the Perl + C-compiler prerequisites.
A release that loses a single CLI build job ships without that platform's asset and becomes a "stuck" release the installer fallback (#6272) cannot recover from when no release has the asset. Besides the OpenSSL failure fixed in the previous commit, the x86_64-apple-darwin job in v2026.6.22-beta.22 died after 17s on a transient `cargo fetch` error — "[16] Error in the HTTP2 framing layer" while downloading unicode-ident — leaving the Intel-macOS asset missing.

Set CARGO_NET_RETRY=10 and CARGO_HTTP_MULTIPLEXING=false on the workflow so a transient crates.io hiccup retries instead of dropping an asset. Disabling HTTP/2 multiplexing is the canonical workaround for the framing-layer error; the retry bump covers other intermittent registry failures. Env-only, no effect on the produced binaries.
@houko
houko force-pushed the fix/release-openssl-vendored branch from c87c8f5 to 9638b86 Compare June 23, 2026 00:27
@github-actions github-actions Bot added size/S 10-49 lines changed and removed size/XS < 10 lines changed labels Jun 23, 2026
@houko
houko merged commit 1b2d28e into main Jun 23, 2026
33 checks passed
@houko
houko deleted the fix/release-openssl-vendored branch June 23, 2026 01:01
houko added a commit that referenced this pull request Jun 26, 2026
…piles for Android (#6335)

The Android Tauri builds (mobile-smoke `Android (debug, unsigned)` and release `Mobile / Android`) have failed on main since #6279 vendored OpenSSL: openssl-src builds it from source for `aarch64-linux-android` and runs `make install_dev`, which calls `aarch64-linux-android-ranlib` via its CROSS_COMPILE prefix.
NDK r23+ (this repo pins r27) dropped the legacy `<target>-ranlib`/`-ar` wrappers for `llvm-ranlib`/`llvm-ar`, so the archive step exits 127.
Symlink the legacy-named ar/ranlib/nm/strip to their llvm equivalents after NDK_HOME is exported, in both Android jobs; release.yml also builds armv7-linux-androideabi so both ABI prefixes are linked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD and build tooling size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants