Skip to content

fix(build): link OpenSSL statically on Linux release targets - #17

Merged
debba merged 2 commits into
mainfrom
fix/linux-arm64-static-openssl
Sep 3, 2026
Merged

fix(build): link OpenSSL statically on Linux release targets#17
debba merged 2 commits into
mainfrom
fix/linux-arm64-static-openssl

Conversation

@debba

@debbadebba commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The v1.0.0-beta.1 release run failed in the linux-arm64 job: cross uses the cross-rs aarch64 image, which has no aarch64 libssl-dev, so openssl-sys (reached through mssql-tds-preview -> native-tls) could not configure and the GitHub release step was skipped. The four other targets built fine.

What changed

  • Cargo.toml: a Linux-only dependency on openssl with the vendored feature. OpenSSL 3.6 is compiled from openssl-src and linked statically on Linux targets. macOS and Windows keep the platform TLS stack selected by native-tls.
  • Cargo.lock: adds openssl-src 300.6.1+3.6.3, nothing else.
  • docs/dependencies.md: licence inventory and a note on the static OpenSSL on Linux.
  • CHANGELOG.md: entry under Unreleased.

Verification

  • cross build --release --target aarch64-unknown-linux-gnu with cross 0.2.5 (the version CI installs) succeeds locally and produces an ELF aarch64 binary.
  • cargo build --release on linux-x64: ldd shows no libssl or libcrypto.
  • Unit and live tests run in CI on this PR.

After merge the v1.0.0-beta.1 tag is moved to the new main head so the release run picks up the fix; the tag never produced a release.

The linux-arm64 release job runs cross with the cross-rs aarch64 image,
which ships no aarch64 libssl-dev, so openssl-sys (pulled in through
mssql-tds-preview -> native-tls) failed to configure and the whole release
was skipped. Enable the vendored feature of openssl for Linux targets only:
OpenSSL is built from openssl-src and linked statically, which also frees
the linux-x64 binary from the runner's OpenSSL major version. Verified with
cross 0.2.5 locally: the aarch64 binary builds and the x64 binary no longer
links libssl or libcrypto.
@debbadebba added the prerelease:beta Publish the next release on the beta prerelease channel label Sep 3, 2026
@github-actions

Copy link
Copy Markdown

Version suggestion

Based on this PR's title (fix) and the prerelease:beta label:

Current1.0.0-beta.1
Suggested next tagv1.0.0-beta.2

This is informational only — no tag or release is created automatically yet.

@debba
debba merged commit a34e634 into mainSep 3, 2026
8 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prerelease:betaPublish the next release on the beta prerelease channel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@debba