We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.10.0-dev.3672+cd5a9ba1f
testresolv.c
#include <stdio.h> #include <resolv.h> int main() { printf("res_query: %p\n", res_query); printf("dn_expand: %p\n", dn_expand); }
Compile for x86_64-linux-gnu.2.33:
x86_64-linux-gnu.2.33
$ ZIG_VERBOSE_LINK=1 zig cc --target=x86_64-linux-gnu.2.33 -lresolv testresolv.c -o testresolv LLD Link... ld.lld -error-limit=0 -O0 -z stack-size=16777216 --gc-sections --eh-frame-hdr -znow -m elf_x86_64 -o /home/motiejus/.cache/zig/o/cb35c829f307f454aa748de0e579d29a/testresolv /home/motiejus/.cache/zig/o/479dd8cc8de0fb41dd40abf62f254c4a/Scrt1.o /home/motiejus/.cache/zig/o/e7beca82c5577aea9885d59a7e4096da/crti.o -dynamic-linker /lib64/ld-linux-x86-64.so.2 /home/motiejus/.cache/zig/o/db5fa2707fb80a202fbe609594d23cc2/testresolv.o /home/motiejus/.cache/zig/o/8d7a9daa5963045c0ecc7ac066259b7f/libcompiler_rt.a --as-needed /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/libm.so.6 /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/libpthread.so.0 /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/libc.so.6 /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/libdl.so.2 /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/librt.so.1 /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/libld.so.2 /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/libutil.so.1 /home/motiejus/.cache/zig/o/729209225ef10d542a54765aaf478e99/libc_nonshared.a /home/motiejus/.cache/zig/o/9a75a4492a68987917fb40c469decd3b/crtn.o --allow-shlib-undefined ld.lld: error: undefined symbol: res_query >>> referenced by testresolv.c:5 (/home/motiejus/x/testresolv.c:5) >>> /home/motiejus/.cache/zig/o/db5fa2707fb80a202fbe609594d23cc2/testresolv.o:(main) ld.lld: error: undefined symbol: dn_expand >>> referenced by testresolv.c:6 (/home/motiejus/x/testresolv.c:6) >>> /home/motiejus/.cache/zig/o/db5fa2707fb80a202fbe609594d23cc2/testresolv.o:(main)
If we use gnu.2.34, when it was moved from libresolv.so to libc.so, it compiles successfully:
gnu.2.34
libresolv.so
libc.so
$ zig cc --target=x86_64-linux-gnu.2.34 testresolv.c -o testresolv && ./testresolv res_query: 0x7fb2b12ffa40 dn_expand: 0x7fb2b12f6810
There are a few issues:
-lresolv
ls /home/motiejus/.cache/zig/o/1ccb25741ec2e9c844aced091e012f89/*.so* | xargs -n1 basename libc.so.6 libdl.so.2 libld.so.2 libm.so.6 libpthread.so.0 librt.so.1 libutil.so.1
The text was updated successfully, but these errors were encountered:
abilists: add libresolv
714d32d
This is necessary for ziglang/zig#12628
glibc/abilists: add libresolv stubs
ea785f7
Generated with ziglang/glibc-abi-tool#2 Fixes ziglang#12628
b07bf67
Successfully merging a pull request may close this issue.
Zig Version
0.10.0-dev.3672+cd5a9ba1f
Steps to Reproduce
testresolv.c
Compile for
x86_64-linux-gnu.2.33
:If we use
gnu.2.34
, when it was moved fromlibresolv.so
tolibc.so
, it compiles successfully:There are a few issues:
-lresolv
is a "libc name", which causes it to be skipped from the linker line.libresolv.so
stub is not built together with the rest of glibc stubs:The text was updated successfully, but these errors were encountered: