Segmentation fault when building from source

Hello :slight_smile:

I’m trying to build Zig from source on Debian 12 Bookworm. I did mkdir build && cd build, cmake .. and got everything working, but when I do make install, I get the error

[ 36%] Built target zigcpp
[ 47%] Built target zig-wasm2c
[ 68%] Built target zig1
[ 94%] Built target zig2
[100%] Building stage3
Segmentation fault
make[2]: *** [CMakeFiles/stage3.dir/build.make:73: stage3/bin/zig] Error 139
make[1]: *** [CMakeFiles/Makefile2:196: CMakeFiles/stage3.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

does anyone know what could be causing this and/or how I can fix it?