Skip to content

fix(release): build x86_64 Linux target as static musl binary - #20

Merged
rjfranc0 merged 1 commit into
mainfrom
fix/linux-musl-release
Jul 10, 2026
Merged

rjfranc0 merged 1 commit into
mainfrom
fix/linux-musl-release

Conversation

@rjfranc0

Copy link
Copy Markdown
Owner

Summary

  • lore-linux-x86_64 built x86_64-unknown-linux-gnu directly on the bare ubuntu-latest runner (no cross-compilation), so it linked against whatever glibc that runner image shipped. When ubuntu-latest rolled to 24.04 (glibc 2.39), every released binary silently required glibc 2.39+ and broke on older distros (Ubuntu 22.04, Debian 12, etc.).
  • Switched the target to x86_64-unknown-linux-musl, built via cross (same pattern already used for aarch64-unknown-linux-gnu), producing a statically linked binary with zero glibc dependency.
  • Updated docs/infra/release-and-distribution.md to match (build matrix table + a new "what breaks" entry warning against reverting to a bare -gnu build).

Test plan

  • cross build --release --target x86_64-unknown-linux-musl succeeds locally
  • file/ldd on the resulting binary confirm static-pie linked, not stripped / statically linked
  • lore version runs correctly from the cross-compiled binary
  • cargo test + cargo clippy -- -D warnings pass (pre-push hook)
  • Next tagged release (or a workflow_dispatch rebuild of the current tag) should be checked to confirm the uploaded lore-linux-x86_64 artifact is now the musl binary

🤖 Generated with Claude Code

The released lore-linux-x86_64 binary built x86_64-unknown-linux-gnu
directly on the ubuntu-latest runner with no cross-compilation, so it
linked against whatever glibc that runner image shipped. When
ubuntu-latest rolled to 24.04 (glibc 2.39), every released binary
silently required glibc 2.39+, breaking on older distros (Ubuntu
22.04, Debian 12, etc.). Building x86_64-unknown-linux-musl via cross
instead produces a statically linked binary with no glibc dependency,
closing this class of breakage for good.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: rjfranc0 <jean.franco.ratovoson@gmail.com>
@rjfranc0
rjfranc0 merged commit 0f01e25 into main Jul 10, 2026
2 checks passed
@rjfranc0
rjfranc0 deleted the fix/linux-musl-release branch July 10, 2026 12:08
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.

1 participant