zig icon indicating copy to clipboard operation
zig copied to clipboard

Compiler exits with no output (code 1) after updating Zig

Open TeamPuzel opened this issue 1 year ago • 2 comments

Zig Version

0.13.0-dev.211+6a65561e3

Steps to Reproduce and Observed Behavior

After updating to 0.13.0-dev.211+6a65561e3 (but I also tried a few versions before) some codestopped compiling and zig doesn't provide any useful information. The last version I have which works correctly is 0.13.0-dev.46+3648d7df1

The source code is on my GitHub: https://github.com/TeamPuzel/minecraft-zig (other code compiles fine)

run
└─ run game
   └─ install
      └─ install game
         └─ zig build-exe game Debug native failure
error: the following command terminated unexpectedly:
/Users/teampuzel/zig/zig build-exe -D_THREAD_SAFE -I/opt/homebrew/include -I/opt/homebrew/include/SDL2 -L/opt/homebrew/lib -lSDL2 -DHWY_SHARED_DEFINE -DAVIF_DLL -D_THREAD_SAFE -I/opt/homebrew/include/SDL2 -I/opt/homebrew/opt/libpng/include/libpng16 -I/opt/homebrew/Cellar/jpeg-xl/0.10.2/include -I/opt/homebrew/Cellar/highway/1.1.0/include -I/opt/homebrew/Cellar/brotli/1.1.0/include -I/opt/homebrew/Cellar/jpeg-xl/0.10.2/include -I/opt/homebrew/Cellar/little-cms2/2.16/include -I/opt/homebrew/Cellar/libtiff/4.6.0/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/xz/5.4.6/include -I/opt/homebrew/Cellar/jpeg-turbo/3.0.2/include -I/opt/homebrew/Cellar/libavif/1.0.4/include -I/opt/homebrew/Cellar/webp/1.4.0/include -I/opt/homebrew/Cellar/webp/1.4.0/include/webp -I/opt/homebrew/include -I/opt/homebrew/include/SDL2 -L/opt/homebrew/Cellar/sdl2_image/2.8.2_1/lib -L/opt/homebrew/lib -lSDL2_image -lSDL2 /Users/teampuzel/Games/minecraft-zig/lib/glad/src/glad.c -ODebug -I /opt/homebrew/include -I /Users/teampuzel/Games/minecraft-zig/lib/glad/include -Mroot=/Users/teampuzel/Games/minecraft-zig/src/main.zig -lc --cache-dir /Users/teampuzel/Games/minecraft-zig/zig-cache --global-cache-dir /Users/teampuzel/.cache/zig --name game --listen=-
Build Summary: 0/5 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
└─ run game transitive failure
   ├─ zig build-exe game Debug native failure
   └─ install transitive failure
      └─ install game transitive failure
         └─ zig build-exe game Debug native (reused)
error: the following build command failed with exit code 1:
/Users/teampuzel/Games/minecraft-zig/zig-cache/o/ef9dae1e7003859054a579293324329b/build /Users/teampuzel/zig/zig /Users/teampuzel/Games/minecraft-zig /Users/teampuzel/Games/minecraft-zig/zig-cache /Users/teampuzel/.cache/zig --seed 0xdb88a3bf -Z770d7711c6af001d run

Expected Behavior

The code should compile, or at least provide any indication why it can't.

TeamPuzel avatar May 21 '24 14:05 TeamPuzel

Problem is this line, changing it to .neighbors = undefined compiles.

Vexu avatar May 21 '24 16:05 Vexu

Oh it's packed structs again... Changing the struct to extern works, thanks. undefined makes it crash in release mode though.

TeamPuzel avatar May 21 '24 17:05 TeamPuzel