Skip to content

fix: static Linux binaries to eliminate libssl/glibc deps#245

Closed
dyc12389 wants to merge 1 commit intoRightNow-AI:mainfrom
dyc12389:fix/static-linux-binaries
Closed

fix: static Linux binaries to eliminate libssl/glibc deps#245
dyc12389 wants to merge 1 commit intoRightNow-AI:mainfrom
dyc12389:fix/static-linux-binaries

Conversation

@dyc12389
Copy link
Copy Markdown

@dyc12389 dyc12389 commented Mar 3, 2026

Summary

  • Vendor OpenSSL in openfang-channels for Linux so native-tls/imap statically link OpenSSL instead of requiring system libssl.so.3/libcrypto.so.3
  • Add x86_64-unknown-linux-musl and aarch64-unknown-linux-musl targets to the release workflow, producing fully static binaries with zero system dependencies
  • Default install.sh to musl on Linux for maximum portability (works on Ubuntu 20.04, older NAS distros, Alpine, etc.)

Problem

The installer downloads linux-gnu binaries built on Ubuntu 22.04, which dynamically link against glibc 2.35 and OpenSSL 3. Systems with older glibc or OpenSSL (e.g. Ubuntu 20.04 NAS) fail at runtime:

error while loading shared libraries: libssl.so.3: cannot open shared object file
GLIBC_2.32 not found
GLIBC_2.33 not found
GLIBC_2.34 not found

Test plan

  • Verify cargo build --workspace --lib passes
  • Verify cargo test --workspace passes
  • Verify musl CI targets build successfully in release workflow
  • Install on an Ubuntu 20.04 (or similar older) system and confirm openfang --version works
  • Verify ldd shows statically linked (or no dynamic deps) for the musl binary

🤖 Generated with Claude Code

…deps

The install script downloads linux-gnu binaries built on Ubuntu 22.04,
which dynamically link against glibc 2.35 and OpenSSL 3. Systems with
older glibc (e.g. Ubuntu 20.04 NAS) fail with missing libssl.so.3,
libcrypto.so.3, and GLIBC_2.32+ symbols.

- Vendor OpenSSL in openfang-channels for Linux (native-tls/imap dep)
- Add x86_64 and aarch64 linux-musl targets to release workflow
- Default install.sh to musl binaries for maximum portability
- Update smoke test to validate musl target string

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jaberjaber23
Copy link
Copy Markdown
Member

Good addition for static Linux binaries. Has merge conflicts in release.yml. Please rebase onto main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants