Skip to content

ci: pin PyO3 extension glibc to 2.17 on linux-x86_64#17

Merged
zackees merged 1 commit intomainfrom
test/pyo3-glibc-pin
Apr 7, 2026
Merged

ci: pin PyO3 extension glibc to 2.17 on linux-x86_64#17
zackees merged 1 commit intomainfrom
test/pyo3-glibc-pin

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented Apr 7, 2026

The native linux-x86_64 PyO3 extension was being linked against the ubuntu-latest runner's system glibc (currently 2.39), but the wheel ships as manylinux_2_17_x86_64 — claiming to work on glibc >= 2.17.

A user on Ubuntu 22.04 (glibc 2.35) or Debian 12 (glibc 2.36) would download the wheel and get a runtime symbol error when Python loaded _native.abi3.so.

Use cargo-zigbuild --target x86_64-unknown-linux-gnu.2.17 for the native linux-x86_64 PyO3 extension build, mirroring what we already do for linux-aarch64 cross. CLI binaries are unaffected — they remain plain musl static builds.

cargo-zigbuild is now installed for any Linux runner, not just the linux_cross path.

Summary by CodeRabbit

  • Chores
    • Improved Linux build process for the Python extension by streamlining artifact generation and enhancing control over binary compatibility across different Linux distributions.

The native linux-x86_64 PyO3 extension was being linked against the
ubuntu-latest runner's system glibc (currently 2.39), but the wheel
ships as manylinux_2_17_x86_64 — claiming to work on glibc >= 2.17.

A user on Ubuntu 22.04 (glibc 2.35) or Debian 12 (glibc 2.36) would
download the wheel and get a runtime symbol error when Python loaded
_native.abi3.so.

Use cargo-zigbuild --target x86_64-unknown-linux-gnu.2.17 for the
native linux-x86_64 PyO3 extension build, mirroring what we already
do for linux-aarch64 cross. CLI binaries are unaffected — they remain
plain musl static builds.

cargo-zigbuild is now installed for any Linux runner, not just the
linux_cross path.
@zackees zackees merged commit 913d992 into main Apr 7, 2026
65 of 81 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84468f67-652e-4838-917f-a28d45b8528a

📥 Commits

Reviewing files that changed from the base of the PR and between 30b637d and 83267d5.

📒 Files selected for processing (1)
  • .github/workflows/template_native_build.yml

📝 Walkthrough

Walkthrough

This pull request modifies the GitHub Actions workflow for native builds to unconditionally install cargo-zigbuild on all Linux runners instead of only when cross-compilation is enabled. It also updates artifact staging logic for Python extensions to consistently use the <arch>-unknown-linux-gnu target across all Linux builds.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
.github/workflows/template_native_build.yml
Removed conditional logic for cargo-zigbuild installation; now applies to all Linux runners. Updated Python extension artifact staging to always stage Linux builds as _native.abi3.so from target/${arch}-unknown-linux-gnu/release/ path. Updated comments to document glibc symbol version control via cargo-zigbuild targeting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 Hopping through workflows with zigbuild so bright,
Linux builds unified—no more conditional plight!
All runners now craft glibc symbols with care,
Artifacts stage smoothly, everywhere!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/pyo3-glibc-pin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees zackees deleted the test/pyo3-glibc-pin branch April 7, 2026 02:20
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