Skip to content
New issue

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

zig targets, error: unable to read libc/glibc/abilists: Unexpected #21624

Closed
jimying opened this issue Oct 8, 2024 · 10 comments
Closed

zig targets, error: unable to read libc/glibc/abilists: Unexpected #21624

jimying opened this issue Oct 8, 2024 · 10 comments
Labels
os-linux question No questions on the issue tracker, please.
Milestone

Comments

@jimying
Copy link
Contributor

jimying commented Oct 8, 2024

Zig Version

0.14.0-dev.1816+20e03beae

Steps to Reproduce and Observed Behavior

run zig targets, get error :

error: unable to read libc/glibc/abilists: Unexpected

also, i test build simple hello.c, zig cc -target x86_64-linux-gnu hello.c or
zig cc -target x86_64-linux-musl hello.c, get error:

hello.c:1:1: error: Unexpected
error: sub-compilation of glibc crti.o failed
    note: unable to check cache: stat file '/home/pi/bak/zig14/lib/libc/glibc/sysdeps/x86_64/crti.S' failed: Unexpected
error: sub-compilation of compiler_rt failed
    note: unable to check cache: stat file '/home/pi/bak/zig14/lib/compiler_rt.zig' failed: Unexpected
error: unable to build glibc CRT file: SubCompilationFailed
error: sub-compilation of glibc crtn.o failed
    note: unable to check cache: stat file '/home/pi/bak/zig14/lib/libc/glibc/sysdeps/x86_64/crtn.S' failed: Unexpected
error: sub-compilation of glibc Scrt1.o failed
    note: unable to check cache: stat file '/home/pi/bak/zig14/lib/libc/glibc/sysdeps/x86_64/start-2.33.S' failed: Unexpected
error: sub-compilation of glibc libc_nonshared.a failed
    note: unable to check cache: stat file '/home/pi/bak/zig14/lib/libc/glibc/stdlib/atexit.c' failed: Unexpected
error: unable to build glibc shared objects: Unexpected

Expected Behavior

no error

@jimying jimying added the bug Observed behavior contradicts documented or intended behavior label Oct 8, 2024
@andrewrk
Copy link
Member

andrewrk commented Oct 8, 2024

I can't reproduce this. How did you obtain the zig binary? If you do a git pull you have to rerun make/ninja.

@jimying
Copy link
Contributor Author

jimying commented Oct 8, 2024

I can't reproduce this. How did you obtain the zig binary? If you do a git pull you have to rerun make/ninja.

Sorry, I I forgot to mention the system version. linux os:

 Centos7.9.2009 x86_64

@andrewrk andrewrk added this to the unplanned milestone Oct 8, 2024
@andrewrk
Copy link
Member

andrewrk commented Oct 8, 2024

unplanned milestone while we wait for an answer to the question

@jimying
Copy link
Contributor Author

jimying commented Oct 9, 2024

I didn't describe it clearly.

  • the zig binary is downloaded from ziglang.org/download

  • the issue occurred on CentOS 7 X86_64, but there is no problem with the new version of Linux ( tested debian12)

@andrewrk
Copy link
Member

andrewrk commented Oct 9, 2024

Thank you, you have now answered the question, but I still cannot reproduce the problem.

@alexrp
Copy link
Member

alexrp commented Oct 9, 2024

@jimying uname -a?

@jimying
Copy link
Contributor Author

jimying commented Oct 9, 2024

@jimying uname -a?

Linux localhost.localdomain 3.10.0-1160.45.1.el7.03.x86_64 #1 SMP Mon Dec 27 09:59:41 CST 2021 x86_64 x86_64 x86_64 GNU/Linux

@alexrp
Copy link
Member

alexrp commented Oct 9, 2024

That's quite an old kernel (from 2013). Zig currently formally requires 4.19 (2018) or later for the standard library abstractions (and by extension the compiler) to work. The specific problem in this case is that your kernel lacks statx() which was added in 4.11 (2017).

@jimying
Copy link
Contributor Author

jimying commented Oct 9, 2024

zig 0.13 works fine, maybe not this reason?

@alexrp
Copy link
Member

alexrp commented Oct 9, 2024

The switch to statx() happened after 0.13.0 in #20389.

But do note that even Zig 0.13.0 strictly speaking required 4.19+. We just didn't take advantage of that fact at the time.

@andrewrk andrewrk added question No questions on the issue tracker, please. os-linux and removed bug Observed behavior contradicts documented or intended behavior labels Oct 9, 2024
@andrewrk andrewrk closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
@alexrp alexrp modified the milestones: unplanned, 0.14.0 Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os-linux question No questions on the issue tracker, please.
Projects
None yet
Development

No branches or pull requests

3 participants