Skip to content

fix(build): link libresolv for static glibc builds on Linux#321

Merged
DorianZheng merged 1 commit intomainfrom
fix/link-libresolv-for-static-glibc
Mar 2, 2026
Merged

fix(build): link libresolv for static glibc builds on Linux#321
DorianZheng merged 1 commit intomainfrom
fix/link-libresolv-for-static-glibc

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Go's CGO net package calls res_search from libresolv for DNS lookups. With dynamic linking, libresolv.so is resolved transitively. After switching to glibc static linking (#319), libresolv.a must be linked explicitly since glibc separates it from libc.a.

Also make glibc-static a required dependency in manylinux setup since it provides both libc.a and libresolv.a needed for +crt-static builds.

Go's CGO net package calls res_search from libresolv for DNS lookups.
With dynamic linking, libresolv.so is resolved transitively. After
switching to glibc static linking (#319), libresolv.a must be linked
explicitly since glibc separates it from libc.a.

Also make glibc-static a required dependency in manylinux setup since
it provides both libc.a and libresolv.a needed for +crt-static builds.
@DorianZheng DorianZheng merged commit 78b01fb into main Mar 2, 2026
18 checks passed
@DorianZheng DorianZheng deleted the fix/link-libresolv-for-static-glibc branch March 2, 2026 01:07
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