build: use cargo-zigbuild for glibc 2.28 single-build Linux compatibility#1
Open
re2zero wants to merge 1 commit into
Open
build: use cargo-zigbuild for glibc 2.28 single-build Linux compatibility#1re2zero wants to merge 1 commit into
re2zero wants to merge 1 commit into
Conversation
…lity Replace the 3-image Linux build matrix (ubuntu 20.04/22.04/24.04) with a single ubuntu:22.04 build using cargo-zigbuild targeting glibc 2.28. The resulting binary runs on UOS V20, Debian 10+, all Ubuntu LTS, and any distro with glibc >= 2.28. build.rs now detects glibc-versioned targets and automatically uses cargo-zigbuild when building the herdr submodule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo-zigbuildto target glibc 2.28, making the binary compatible with UOS V20, Debian 10+, all Ubuntu LTS, and any distro with glibc >= 2.28build.rsnow auto-detects glibc-versioned targets and uses zigbuild for the herdr submoduleRationale
UOS V20 has glibc 2.28, but the old ubuntu 20.04 image provides glibc 2.31. The binary built on ubuntu 20.04 fails on UOS V20 with version not found errors. zig's linker can target specific glibc versions, so we can build on a modern host (ubuntu 22.04) while producing a binary compatible with glibc 2.28+.
Since glibc is backward-compatible, one build covers all target distributions, reducing CI matrix from 3 to 1.
Changes
release.ymlubuntu:22.04only, build withcargo-zigbuild, binary path updated totarget/x86_64-unknown-linux-gnu/release/build.rsbuild_herdr()detects glibc-versioned TARGET and uses zigbuild instead of plain cargoTest plan
ldd zenixshows no missing glibc symbols