Skip to content

fix: check external libs for glibc version when determining platform tag#2993

Open
messense wants to merge 1 commit intoPyO3:mainfrom
messense:fix/audit-external-libs-platform-tag
Open

fix: check external libs for glibc version when determining platform tag#2993
messense wants to merge 1 commit intoPyO3:mainfrom
messense:fix/audit-external-libs-platform-tag

Conversation

@messense
Copy link
Member

When bundling external shared libraries (auditwheel repair), the platform tag was determined solely from the main artifact's versioned symbol requirements. External libraries could require a newer glibc (e.g. GLIBC_2.29) while the wheel was tagged as manylinux_2_28, causing ImportErrors at runtime on older systems.

Now scan each external library's ELF versioned symbols and downgrade the policy/tag when needed.

Fixes #1490

@messense messense requested a review from Copilot February 13, 2026 12:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts platform tag selection during auditwheel repair so bundled external shared libraries can influence the chosen manylinux policy, preventing runtime ImportErrors when externals require newer glibc symbol versions than the main artifact.

Changes:

  • Scan external libraries’ ELF versioned symbol requirements when deciding the effective policy/tag.
  • Introduce helper logic to evaluate whether a policy satisfies versioned symbol constraints and to adjust the selected policy accordingly.

@messense messense force-pushed the fix/audit-external-libs-platform-tag branch from 90e8f8f to bb7c924 Compare February 13, 2026 12:34
@messense messense force-pushed the fix/audit-external-libs-platform-tag branch from bb7c924 to 8e0f0ad Compare February 13, 2026 12:37
@messense messense requested a review from Copilot February 13, 2026 12:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

When bundling external shared libraries (auditwheel repair), the platform
tag was determined solely from the main artifact's versioned symbol
requirements. External libraries could require a newer glibc (e.g.
GLIBC_2.29) while the wheel was tagged as manylinux_2_28, causing
ImportErrors at runtime on older systems.

Now scan each external library's ELF versioned symbols and downgrade the
policy/tag when needed.

Fixes PyO3#1490
@messense messense force-pushed the fix/audit-external-libs-platform-tag branch from f3e0f5b to fc5162e Compare February 13, 2026 12:56
@messense messense enabled auto-merge (squash) February 13, 2026 12:57
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.

Incorrect platform tag with external dependencies

1 participant