-
Notifications
You must be signed in to change notification settings - Fork 102
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 build
always panics
#115
Comments
FWIW, your instructions work fine for me with zig installed from nixpkgs-23.05 on my m2 air. Is there any error in |
The bootloader looking wrong is normal and unrelated. So are the dmesg entries. I can replicate your issue on my M1 Max using the store path you used. This looks like it's something within Zig itself, or some interaction with nixpkgs. 23.05 has Zig 0.10.1 and using that on nixpkgs master ( I can't really offer any further assistance debugging and it seems unrelated to Apple Silicon specifically. |
This does not crash on a VM under macOS, nor on another aarch64 board. I'm guessing it's a page size issue then. I'll keep this open since it's at least Apple Silicon induced but I don't have resources to debug this further. |
Hey so I am actually the developer of the runtime page size PR for Zig and @tpwrules is right that it is indeed this issue. My PR is nearing completion and I expect to have it in by Zig 0.12 is released. Fork: https://github.com/ExpidusOS/zig/tree/fix/linux-page-size |
@RossComputerGuy looks like that PR never happened? I'm still seeing this problem in zig 0.13 on a mac running nixos. Is there a patch we should apply on the nixpkgs side maybe? |
I'm unsure how to properly diagnose this issue, but since it didn't happen on Asahi Fedora (at least I don't think it did, I switched to NixOS so I don't have Fedora installed anymore to test), I assume it happens because of something related to Nix.
When I try to compile any project with Zig, I always get the following error:
Using
zig build-exe
works fine, it's onlyzig build
with abuild.zig
that does not work. I tried using thezig
binary installed by thezig
Nix package, as well as one downloaded from the Zig website. I also tried compiling the bootstrap compiler myself, but it unfortunately had the same result.The text was updated successfully, but these errors were encountered: