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

aarch64-linux-gnu build fails on macbook pro m1 during stage3 #167

Open
msf opened this issue Apr 7, 2024 · 0 comments
Open

aarch64-linux-gnu build fails on macbook pro m1 during stage3 #167

msf opened this issue Apr 7, 2024 · 0 comments

Comments

@msf
Copy link

msf commented Apr 7, 2024

macbookpro m1

Linux metal-brick 6.6.3-414.asahi.fc39.aarch64+16k #1 SMP PREEMPT_DYNAMIC Sun Mar 24 19:44:17 UTC 2024 aarch64 GNU/Linux

build was triggered with:

⚡ ./build native-linux-gnu native

vanilla build fails with:

[ 94%] Built target zig2
[100%] Building stage3
thread 184915 panic: reached unreachable code
Panicked during a panic. Aborting.
error: the following build command crashed:
/home/miguel/zig/zig-bootstrap/zig/zig-cache/o/fb20d86f0892d236eaa50fafb42a04aa/build /home/miguel/zig/zig-bootstrap/out/build-zig-host/zig2 /home/miguel/zig/zig-bootstrap/zig /home/miguel/zig/zig-bootstrap/zig/zig-cache /home/miguel/.cache/zig --seed 0x91ab733a --prefix /home/miguel/zig/zig-bootstrap/out/build-zig-host/stage3 --zig-lib-dir /home/miguel/zig/zig-bootstrap/zig/lib -Dconfig_h=/home/miguel/zig/zig-bootstrap/out/build-zig-host/config.h -Denable-llvm -Doptimize=ReleaseFast -Dstrip -Dno-langref -Dno-autodocs -Dtarget=native -Dcpu=native -Dversion-string=0.12.0-dev.2058+04ac028a2
gmake[2]: *** [CMakeFiles/stage3.dir/build.make:73: stage3/bin/zig] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:196: CMakeFiles/stage3.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

attempting to build zig with 16kb memory pages, with this simple patch:


diff --git a/zig/lib/std/mem.zig b/zig/lib/std/mem.zig
index 10ddd55ca..697006a0f 100644
--- a/zig/lib/std/mem.zig
+++ b/zig/lib/std/mem.zig
@@ -13,7 +13,7 @@ const native_endian = builtin.cpu.arch.endian();
 pub const page_size = switch (builtin.cpu.arch) {
     .wasm32, .wasm64 => 64 * 1024,
     .aarch64 => switch (builtin.os.tag) {
-        .macos, .ios, .watchos, .tvos => 16 * 1024,
+        .macos, .ios, .watchos, .tvos, .linux => 16 * 1024,
         else => 4 * 1024,
     },
     .sparc64 => 8 * 1024,
(END)

produces this very different error that I'm leaving as a gist: https://gist.github.com/msf/761ff5776b5a76674471907924803066

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant