I know HaikuOS is on tier-3 and Zig may not work. Just curious about the status and gave it a try. Maybe someone can point me to a direction to resolve this “out of memory” error.
Haiku OS has a posix layer and comes with many common tools such as git. Only cmake needs to be installed additionally. I git clone zig-bootstrap and run “./build native-haiku-none baseline”. The machine is qemu-system-x86_64 with 8G RAM and 30G disk (qcow2 format).
It takes about 8 hours to finish LLVM part with peak memory about 2.5G RAM and cache about 1.5G. The disk usage is about 15G (including Haiku system). It goes all the way to zig1 exectuable. When it tries to generate zig2.c, which is known to be large, it complains “out of memory”. This error can also be reproduced with this command:
/boot/home/zig-bootstrap/out/build-zig-host/zig1 /boot/home/zig-bootstrap/zig/lib build-exe -ofmt=c -lc -OReleaseSmall --name zig2 -target x86_64-haiku-none --dep build_options --dep aro -Mroot=src/main.zig -Mbuild_options=/boot/home/zig-bootstrap/out/build-zig-host/config.zig -Maro=lib/compiler/aro/aro.zig
Since the memory and disk from qemu is not used up, I wonder whether there is an internal limit set by HaikuOS, LLVM or Zig ? The generated zig2.c is empty. I cannot find the log or any other information besides this “error: OutOfMemory”. The zig version is from zig-bootstrap, thus, is about 0.17-dev.
I know there will be more issues after zig2. Just want to see how far it can go. Thanks for any suggestion.