Open voroskoi opened 2 years ago
see Troubleshooting in wiki entry I added for the meantime https://github.com/ziglang/zig/wiki/Troubleshooting-Build-Issues#building-stage2-and-stage3 Vexu's PR #11501 should also fix that.
Hi,
Thanks for Your help.
I have tried these, but got no luck. I've forgotten to mention that I have to create a symlink, to fix the following error (missing cc in PATH):
Zig attempted to find the path to native system libc headers by executing this command:
cc -E -Wp,-v -xc /dev/null
error: unable to create compilation: UnableToSpawnCCompiler
When I link to gcc
gives the shown error. When I try clang
I got the linking errors from LLVM, which should be fixed by pointing to build/config.h
, but that does not help my case.
I've just tried this with https://github.com/ziglang/zig/pull/12508 (cmake-stage3 branch) and stage3 build gives this very same error. (Setting CC and applying zlib patch is prerequisite.)
I'm not really sure, if the Zig build system handles symlinks in all places yet or will ever support that due to the many corner cases and easy potential to wracking havoc with sandboxing (if unhandled).
Zig Version
0.10.0-dev.1853+9c2cbe39c
Steps to Reproduce
I have followed these steps: https://github.com/ziglang/zig/wiki/Building-Zig-From-Source
The output below is after building stage1 with cmake, but I even tried using a prebuilt zig version (1/b step), got similar error message.
I use the following guix.scm manifest file to install dependencies: (
guix shell -m guix.scm
)I can reproduce this error on a rpi4 and x86_64 too. The base system is alpine on aarch64 and manjaro on x86_64. Build deps came from guix in both case.
Expected Behavior
There should be no linking issue.
Actual Behavior
Running
build/zig -p stage2 -Denable-llvm
gives the following error: