Skip to content

Build the Linux release binaries against glibc 2.17 - #281

Merged
foodandtravel merged 3 commits into
developmentfrom
feature/linux-glibc-floor
Oct 29, 2026
Merged

foodandtravel merged 3 commits into
developmentfrom
feature/linux-glibc-floor

Conversation

@foodandtravel

Copy link
Copy Markdown
Contributor

Closes #272.

The Linux release binaries link against whatever glibc the build runner has. v1.7.6 was built on a newer ubuntu-latest, needs GLIBC_2.43, and won't start on Ubuntu 24.04 (2.39). That's the base of the Code Assurance runner image, so it's stuck on 1.7.5. #279 pinned linux-amd64 to ubuntu-24.04, which only moves the requirement to 2.39.

This sets a glibc 2.17 floor, the same one the PyPI wheels have. release-pypi already builds every release in quay.io/pypa/manylinux2014_* (green since v1.7.4), so the image is known to build aws-lc-sys, onig_sys and esaxx-rs.

What changed

  • packaging/linux/build-manylinux.sh <target> runs cargo build --locked --release -p sigit inside manylinux2014 for the host arch. It mounts the repo and the host's ~/.cargo/{registry,git} (so rust-cache still works), installs the toolchain from rust-toolchain.toml, runs the same yum install -y perl-core as release-pypi, and chowns the output back to the runner user. The binary ends up at target/<target>/release/sigit as before, so nothing downstream changes.
  • packaging/linux/check-glibc.sh <binary> [max] reads the highest GLIBC_* symbol version with objdump -T and fails above the max (2.17 by default). It's the Linux counterpart of check-static-crt.ps1.
  • release-github, release-npm and release-nuget: the Linux rows build with the script and then run the check. Other platforms still use cargo build. Runners are unchanged; the Build the Code Assurance runner image in this repo #279 comment now says the runner's glibc no longer matters.
  • check-linux-glibc.yml runs on PRs touching packaging/linux/**. It builds x86_64, checks the floor, and runs sigit --version on centos:7 (glibc 2.17) and debian:12.
  • .agents/AGENTS.md documents the floor next to the static-CRT note.

It's a script rather than a job-level container: because the JavaScript actions run their Node inside the job container, and that Node needs glibc 2.28. cargo-zigbuild would avoid Docker but replaces the C toolchain for every native dependency. The manylinux image is already proven by PyPI, so I went with that.

Testing

  • check-glibc.sh against the published assets: v1.7.6 fails (needs GLIBC_2.43), v1.7.5 passes with max 2.39 and fails with the default 2.17.
  • cargo fmt --check, cargo clippy --tests -D warnings and cargo test --locked pass (no Rust changes). bash -n on both scripts, and all four workflows parse as YAML.
  • No Docker on my machine, so the container build is verified by check-linux-glibc on this PR.

The real check is the next release: every sigit-linux-* asset, the npm linux-*-glibc packages and the NuGet native/linux-* binaries should pass check-glibc.sh. After that, the image's PR build can go back to latest and the 1.7.5 pin in sigit-app's fetch-sigit.sh can go.

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduces a glibc 2.17 compatibility floor for all Linux release binaries, matching the PyPI wheels. It adds a build script (build-manylinux.sh) that compiles the binary inside the manylinux2014 Docker image, ensuring the correct glibc version. A check script (check-glibc.sh) verifies the binary does not require a newer glibc. The release workflows for GitHub, npm, and NuGet now use these scripts for Linux targets, and a new check-linux-glibc.yml workflow validates the process on PRs affecting the packaging scripts. Documentation is updated to explain the rationale and workflow. No earlier findings are present, and the implementation appears robust and well-tested according to the description.


Automated review by siGit Code Review · commit 021af09 · see the review dashboard

@foodandtravel foodandtravel self-assigned this Oct 29, 2026
@sigit-code-review

Copy link
Copy Markdown

siGit Code Review couldn't finish this review: the model service was unavailable. Mention @sigit-code-review to try again.


Automated review by siGit Code Review · commit 015ba4b · see the review dashboard

@sigit-code-review

Copy link
Copy Markdown

siGit Code Review couldn't finish this review: the model service was unavailable. Mention @sigit-code-review to try again.


Automated review by siGit Code Review · commit 8d65478 · see the review dashboard

foodandtravel and others added 3 commits October 29, 2026 22:40
A plain cargo build links against the runner's glibc. v1.7.6 came off a
newer ubuntu-latest, needed GLIBC_2.43 and wouldn't start on Ubuntu 24.04.
The Linux rows of release-github, release-npm and release-nuget now build
inside quay.io/pypa/manylinux2014_*, the image the PyPI wheels already use,
and check-glibc.sh fails the job if the binary needs anything above 2.17.

check-linux-glibc.yml builds x86_64 the same way on pull requests that touch
packaging/linux/ and runs the binary on centos:7 and debian:12.

Closes #272

Co-Authored-By: Claude Opus 5.5 <[email protected]>
head closed the pipe while ldd was still writing, and under pipefail the
SIGPIPE (141) failed the build step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
That puts it next to CI in the Actions sidebar, matching the "Release
<channel>" names on the release workflows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@foodandtravel
foodandtravel force-pushed the feature/linux-glibc-floor branch from 8d65478 to 7fd8c2f Compare October 29, 2026 21:40

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduces a glibc 2.17 compatibility floor for Linux release binaries by building them inside the manylinux2014 container, matching the PyPI wheel policy. It adds a build script (build-manylinux.sh) and a glibc version check script (check-glibc.sh), updates release workflows (GitHub, npm, NuGet) to use these scripts for Linux targets, and adds a CI workflow to verify the floor on PRs touching packaging/linux. Documentation in AGENTS.md is updated to describe the new process and rationale. The scripts are robust, and the workflow changes are consistent with the stated goals. No prior findings are present, and the implementation appears correct and well-documented throughout.


Automated review by siGit Code Review · commit 7fd8c2f · see the review dashboard

@foodandtravel
foodandtravel merged commit 2916d6b into development Oct 29, 2026
1 check passed
@foodandtravel
foodandtravel deleted the feature/linux-glibc-floor branch October 29, 2026 21:51
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.

3 participants