Skip to content

fix(release): build Linux binaries as static musl to restore glibc 2.35 compatibility#479

Merged
platinummonkey merged 1 commit intomainfrom
fix/linux-musl-static-build
May 8, 2026
Merged

fix(release): build Linux binaries as static musl to restore glibc 2.35 compatibility#479
platinummonkey merged 1 commit intomainfrom
fix/linux-musl-static-build

Conversation

@platinummonkey
Copy link
Copy Markdown
Collaborator

@platinummonkey platinummonkey commented May 7, 2026

Summary

Fixes the GLIBC version compatibility issue reported where pup 0.58.3 fails to run on Ubuntu 22.04 (Jammy) with glibc 2.35. The binary was built against glibc ≥ 2.38, causing runtime errors on older systems.

Solution: Switch Linux release builds to fully static musl libc binaries that have no glibc dependency.

Changes

Release Pipeline (.github/workflows/release.yml)

  • Changed rustup targets from *-gnu to *-musl (.goreleaser-linux.yaml:24-25)
  • Install musl-tools package for x86_64-musl toolchain
  • Install aarch64-musl cross compiler from messense/homebrew-macos-cross-toolchains (v13.3.0)
  • Set per-target CC and linker environment variables for musl builds

CI Pipeline (.github/workflows/ci.yml)

  • Consolidated Linux cross-compile job with sequential x86_64 and aarch64 musl builds
  • Added positive test: file command verifies "statically linked"
  • Added negative test: ldd verifies "not a dynamic executable"

Documentation

  • docs/ARCHITECTURE.md: Added "Static Linking for Linux" section explaining musl approach
  • docs/TROUBLESHOOTING.md: Added "GLIBC version error on Linux" entry with upgrade instructions

Testing

  • Local cargo clippy --all-targets -- -D warnings passes
  • CI will verify both x86_64 and aarch64 binaries are statically linked
  • End-to-end validation on Ubuntu 22.04 Jammy (pending release)

Verification

After this change, Linux binaries will:

  • Be fully statically linked (no dynamic library dependencies)
  • Work on any Linux distribution regardless of glibc version
  • Be slightly larger (~5-10 MB) but far more portable

Release Notes

Users on Ubuntu 22.04 and other systems with glibc < 2.38 can now run pup after upgrading to the release containing this fix.


🤖 Implementation: pi + Kimi k2.5
📝 Planning: Claude Opus

@platinummonkey platinummonkey requested a review from a team as a code owner May 7, 2026 20:22
@platinummonkey platinummonkey force-pushed the fix/linux-musl-static-build branch 4 times, most recently from 1f040c6 to dc7ac8e Compare May 7, 2026 22:29
…35 compatibility

Switches Linux release and CI builds from `*-unknown-linux-gnu` to
`*-unknown-linux-musl` so the published binaries are fully statically
linked and have no glibc dependency. Resolves the GLIBC_2.38/2.39 errors
reported on Ubuntu 22.04 (jammy, glibc 2.35).

- .goreleaser-linux.yaml: target the musl triples
- .github/workflows/release.yml: install musl-tools + the messense
  aarch64-unknown-linux-musl cross toolchain, set per-target CC and
  linker env vars, build with `-C target-feature=+crt-static`
- .github/workflows/ci.yml: mirror the release setup; build x86_64 and
  aarch64 musl sequentially and verify each binary with `file` (statically
  linked) and `ldd` (not a dynamic executable)
- docs/ARCHITECTURE.md, docs/TROUBLESHOOTING.md: document the static
  linking and the glibc upgrade guidance for affected users

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@platinummonkey platinummonkey force-pushed the fix/linux-musl-static-build branch from dc7ac8e to 69ca572 Compare May 7, 2026 22:45
@platinummonkey platinummonkey merged commit cd9975e into main May 8, 2026
6 checks passed
@platinummonkey platinummonkey deleted the fix/linux-musl-static-build branch May 8, 2026 00:41
@platinummonkey platinummonkey added bug Something isn't working usability labels May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working usability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant