You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks for Zig! I've recently tried to update from Zig 0.9.1 to Zig 0.10.0.
The build fails at stage 3 after apparently including system headers that in turn include other headers that do not appear to be in the build include path. The steps taken to produce this problem were:
wget https://github.com/ziglang/zig/archive/refs/tags/0.10.0.tar.gz
tar xf 0.10.0.tar.gz
cd zig-0.10.0
mkdir build
cd build
cmake ..
make
The build fails at stage 3 after apparently including system headers that in turn include other headers that do not appear to be in the build include path. Eg I see:
Scanning dependencies of target stage3
[100%] Building stage3
Compile C Objects [11/21] analyze.cpp... error(compilation): clang failed with stderr: In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/src/hash.cpp:9:
In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/include/__hash_table:25:
In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/include/memory:860:
In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/include/__memory/shared_ptr.h:39:
In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/include/atomic:526:
In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/include/__thread/timed_backoff_policy.h:17:
In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/include/__threading_support:18:
In file included from /home/hastings/tmp/zig-0.10.0/lib/libcxx/include/errno.h:31:
In file included from /usr/include/errno.h:28:
In file included from /usr/include/bits/errno.h:26:
/usr/include/linux/errno.h:1:10: fatal error: 'asm/errno.h' file not found
We can see the system header /usr/include/errno.h is included and which then includes /usr/include/bits/errno.h which in turn tries to include asm/errno.h.
Since this is stage 3 of the build I expect that no system headers should be used, only those bundled with Zig.
I have seen this on both Debian unstable (sid) and Debian stable (bullseye) with backported llvm-15.
Please let me know what additional information I could provide or what I may try in order to understand the cause of and to try to resolve this problem.
Cheers,
Nick.
Expected Behavior
I expected (hoped for!) the build to not fail.
The text was updated successfully, but these errors were encountered:
Since this is stage 3 of the build I expect that no system headers should be used, only those bundled with Zig.
You're trying to integrate with your system-installed LLVM libraries, so system headers are included. Is the error message correct? Is /usr/include/linux/errno.h broken on your system?
andrewrk
added
downstream
An issue with a third party project that uses Zig.
and removed
bug
Observed behavior contradicts documented or intended behavior
labels
Dec 19, 2022
It turns out that the unstable chroot I was using hadn't been updated for about 6 months. After updating it, this problem "went away". So this problem still exists on the current release of Debian but shouldn't be there for the next release.
Zig Version
0.10.0
Steps to Reproduce and Observed Behavior
Hi,
thanks for Zig! I've recently tried to update from Zig 0.9.1 to Zig 0.10.0.
The build fails at stage 3 after apparently including system headers that in turn include other headers that do not appear to be in the build include path. The steps taken to produce this problem were:
The build fails at stage 3 after apparently including system headers that in turn include other headers that do not appear to be in the build include path. Eg I see:
We can see the system header
/usr/include/errno.h
is included and which then includes/usr/include/bits/errno.h
which in turn tries to includeasm/errno.h
.Since this is stage 3 of the build I expect that no system headers should be used, only those bundled with Zig.
I have seen this on both Debian unstable (sid) and Debian stable (bullseye) with backported llvm-15.
A log from my terminal session: bullseye-zig-0.1.0-build.log.
Please let me know what additional information I could provide or what I may try in order to understand the cause of and to try to resolve this problem.
Cheers,
Nick.
Expected Behavior
I expected (hoped for!) the build to not fail.
The text was updated successfully, but these errors were encountered: