Skip to content

Conversation

xnox
Copy link
Contributor

@xnox xnox commented Jul 22, 2025

libanl was addedd to resolv in glibc 2.2.5 in 2001 to support async
dns queries.

It uses private GLIBC symbols, thus to ensure it works with higher
glibc runtime versions, it must be shared linked and should not be
vendored into the wheels. (similar to libdl / dlopen)

In 2021 with glibc 2.34 similar to many other split libraries, libanl
got folded into libc itself, and thus any applications that use async
dns queries no longer gain libanl NEEDED shared library dependency
with a stub remaining in place. (similar to libdl / libpthread etc).

Thus for policies between 2.2.5 and 2.33 there is a need to allow list
libanl, for example when vendoring modern builds of icu.

Longer term, it would be interested to support dropping libraries,
because policies built to manylinux 2.34 policy really should no
longer link with libanl / libdl / libpthread etc. As in all of those
libraries have now become no-op stubs.

libanl was addedd to resolv in glibc 2.2.5 in 2001 to support async
dns queries.

It uses private GLIBC symbols, thus to ensure it works with higher
glibc runtime versions, it must be shared linked and should not be
vendored into the wheels. (similar to libdl / dlopen)

In 2021 with glibc 2.34 similar to many other split libraries, libanl
got folded into libc itself, and thus any applications that use async
dns queries no longer gain libanl NEEDED shared library dependency
with a stub remaining in place. (similar to libdl / libpthread etc).

Thus for policies between 2.2.5 and 2.33 there is a need to allow list
libanl, for example when vendoring modern builds of icu.

Longer term, it would be interested to support dropping libraries,
because policies built to manylinux 2.34 policy really should no
longer link with libanl / libdl / libpthread etc. As in all of those
libraries have now become no-op stubs.
xnox added a commit to xnox/os that referenced this pull request Jul 22, 2025
libanl is a glibc component between versions 2.2.5 and 2.33, which
should be allowed by default in those older policies. Newer builds do
not gain such a dependency, as libanl got folded into libc itself, but
it is harmless.

Cherry-picked from:
- pypa/auditwheel#607
xnox added a commit to xnox/os that referenced this pull request Jul 22, 2025
libanl is a glibc component between versions 2.2.5 and 2.33, which
should be allowed by default in those older policies. Newer builds do
not gain such a dependency, as libanl got folded into libc itself, but
it is harmless.

Cherry-picked from:
- pypa/auditwheel#607
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.83%. Comparing base (f29f567) to head (d3aaba1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #607   +/-   ##
=======================================
  Coverage   92.83%   92.83%           
=======================================
  Files          21       21           
  Lines        1772     1772           
  Branches      333      333           
=======================================
  Hits         1645     1645           
  Misses         77       77           
  Partials       50       50           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@auvipy auvipy requested review from mayeut and Copilot and removed request for mayeut July 22, 2025 15:57
Copy link
Contributor

@Copilot 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

This PR adds the libanl.so.1 library to the manylinux policy whitelists across all policy versions to support async DNS queries. The libanl library was added to glibc 2.2.5 in 2001 for asynchronous DNS resolution and was later folded into libc itself in glibc 2.34 (2021).

  • Adds libanl.so.1 to library whitelists for all manylinux policy versions
  • Enables proper handling of async DNS query dependencies in wheel builds
  • Addresses compatibility requirements for libraries like ICU that use modern async DNS functionality

smoser pushed a commit to wolfi-dev/os that referenced this pull request Jul 22, 2025
libanl is a glibc component between versions 2.2.5 and 2.33, which
should be allowed by default in those older policies. Newer builds do
not gain such a dependency, as libanl got folded into libc itself, but
it is harmless.

Cherry-picked from:
- pypa/auditwheel#607
@mayeut mayeut merged commit c2f4f8a into pypa:main Jul 26, 2025
13 of 14 checks passed
@mayeut
Copy link
Member

mayeut commented Jul 26, 2025

Thanks for the details @xnox
A new patch version should be released by tomorrow

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