Closed randombyte-developer closed 2 months ago
Tried with nightly:
$ zig version
0.14.0-dev.591+1c35e73b6
$ zig build run
run
└─ run mygame
└─ install mygame
└─ zig build-exe mygame Debug native
└─ zig build-lib znoise Debug native 1 errors
error: unable to check cache: stat file 'src/deps/znoise/libs/FastNoiseLite/FastNoiseLite.c' failed: FileNotFound
error: the following command failed with 1 compilation errors:
/home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/zig build-lib -cflags -std=c99 -fno-sanitize=undefined -- src/deps/znoise/libs/FastNoiseLite/FastNoiseLite.c -ODebug -I src/deps/znoise/libs/FastNoiseLite -Mroot -lc --cache-dir /home/sven/development/zig/playground/.zig-cache --global-cache-dir /home/sven/.cache/zig --name znoise -static --zig-lib-dir /home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/lib/ --listen=-
run
└─ run mygame
└─ install mygame
└─ zig build-exe mygame Debug native
└─ zig build-lib zmesh Debug native 1 errors
error: unable to check cache: stat file 'src/deps/zmesh/libs/par_shapes/par_shapes.c' failed: FileNotFound
error: the following command failed with 1 compilation errors:
/home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/zig build-lib -cflags -std=c99 -fno-sanitize=undefined -DPAR_SHAPES_T=uint32_t -- src/deps/zmesh/libs/par_shapes/par_shapes.c -cflags -- src/deps/zmesh/libs/meshoptimizer/clusterizer.cpp src/deps/zmesh/libs/meshoptimizer/indexgenerator.cpp src/deps/zmesh/libs/meshoptimizer/vcacheoptimizer.cpp src/deps/zmesh/libs/meshoptimizer/vcacheanalyzer.cpp src/deps/zmesh/libs/meshoptimizer/vfetchoptimizer.cpp src/deps/zmesh/libs/meshoptimizer/vfetchanalyzer.cpp src/deps/zmesh/libs/meshoptimizer/overdrawoptimizer.cpp src/deps/zmesh/libs/meshoptimizer/overdrawanalyzer.cpp src/deps/zmesh/libs/meshoptimizer/simplifier.cpp src/deps/zmesh/libs/meshoptimizer/allocator.cpp -cflags -std=c99 -- src/deps/zmesh/libs/cgltf/cgltf.c -ODebug -I src/deps/zmesh/libs/par_shapes -I src/deps/zmesh/libs/cgltf -Mroot -lc++ -lc --cache-dir /home/sven/development/zig/playground/.zig-cache --global-cache-dir /home/sven/.cache/zig --name zmesh -static --zig-lib-dir /home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/lib/ --listen=-
run
└─ run mygame
└─ install mygame
└─ zig build-exe mygame Debug native
└─ zig build-lib zaudio Debug native 1 errors
error: unable to check cache: stat file 'src/deps/zaudio/src/zaudio.c' failed: FileNotFound
error: the following command failed with 1 compilation errors:
/home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/zig build-lib -cflags -std=c99 -- src/deps/zaudio/src/zaudio.c -cflags -DMA_NO_WEBAUDIO -DMA_NO_ENCODING -DMA_NO_NULL -DMA_NO_JACK -DMA_NO_DSOUND -DMA_NO_WINMM -std=c99 -fno-sanitize=undefined -- src/deps/zaudio/libs/miniaudio/miniaudio.c -ODebug -I src/deps/zaudio/libs/miniaudio -Mroot -lc --cache-dir /home/sven/development/zig/playground/.zig-cache --global-cache-dir /home/sven/.cache/zig --name zaudio -static --zig-lib-dir /home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/lib/ --listen=-
run
└─ run mygame
└─ install mygame
└─ zig build-exe mygame Debug native
└─ zig build-lib zgui Debug native 1 errors
error: unable to check cache: stat file 'src/deps/imgui/zgui/src/zgui.cpp' failed: FileNotFound
error: the following command failed with 1 compilation errors:
/home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/zig build-lib -cflags -fno-sanitize=undefined -- src/deps/imgui/zgui/src/zgui.cpp -cflags -fno-sanitize=undefined -- src/deps/imgui/zgui/libs/imgui/imgui.cpp src/deps/imgui/zgui/libs/imgui/imgui_widgets.cpp src/deps/imgui/zgui/libs/imgui/imgui_tables.cpp src/deps/imgui/zgui/libs/imgui/imgui_draw.cpp src/deps/imgui/zgui/libs/imgui/imgui_demo.cpp -cflags -fno-sanitize=undefined -- src/deps/imgui/zgui/libs/imgui/implot_demo.cpp src/deps/imgui/zgui/libs/imgui/implot.cpp src/deps/imgui/zgui/libs/imgui/implot_items.cpp -ODebug -I src/deps/imgui/zgui/libs -I src/deps/imgui/zgui/libs/imgui -DZGUI_IMPLOT=1 -Mroot -lc++ -lc --cache-dir /home/sven/development/zig/playground/.zig-cache --global-cache-dir /home/sven/.cache/zig --name zgui -static --zig-lib-dir /home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/lib/ --listen=-
Build Summary: 10/18 steps succeeded; 4 failed
run transitive failure
└─ run mygame transitive failure
├─ zig build-exe mygame Debug native transitive failure
│ ├─ zig build-lib zgui Debug native 1 errors
│ ├─ zig build-lib zaudio Debug native 1 errors
│ ├─ zig build-lib zmesh Debug native 1 errors
│ └─ zig build-lib znoise Debug native 1 errors
└─ install mygame transitive failure
└─ zig build-exe mygame Debug native (+22 more reused dependencies)
error: the following build command failed with exit code 1:
/home/sven/development/zig/playground/.zig-cache/o/d90b653643fb7c8ffc9a04198d6ed191/build /home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/zig /home/sven/.config/Code/User/globalStorage/ziglang.vscode-zig/zig_install/lib /home/sven/development/zig/playground /home/sven/development/zig/playground/.zig-cache /home/sven/.cache/zig --seed 0x36dac2e2 -Za514cf765d50ac5e run
Yes, there is regression with nightly zig build system. It happens from time to time, unfortunately. I will keep looking into the problem.
I'm okay with downgrading zig. Do you know any working version?
Sorry for slow respond, being busy lately. I think zig 0.14.0-dev.363+c3faae6bf should be fine according to commit history. What I normally do though is wait a few days and check if nighly build works again (with a few tweaks perhaps).
Thanks. With that build I get to
sven@sven-MSI:~/development/zig/playground$ ./zig/zig build run
run
└─ run mygame
└─ install mygame
└─ zig build-exe mygame Debug native 9 errors
/home/sven/.cache/zig/p/1220671b150b68fc3f963b790921a9356bc217bfee281f2940e793b4a5e858daa5ba/src/deps/imgui/c/imgui_impl_sdlrenderer.cpp:42:2: error: This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function
#error This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function
^
/home/sven/.cache/zig/p/1220671b150b68fc3f963b790921a9356bc217bfee281f2940e793b4a5e858daa5ba/src/deps/imgui/c/imgui_impl_sdlrenderer.cpp:191:17: error: use of undeclared identifier 'SDL_RenderGeometryRaw'
SDL_RenderGeometryRaw(bd->SDLRenderer, tex,
^
/home/sven/.cache/zig/p/1220671b150b68fc3f963b790921a9356bc217bfee281f2940e793b4a5e858daa5ba/src/deps/imgui/c/imgui_impl_sdlrenderer.cpp:227:46: error: use of undeclared identifier 'SDL_ScaleModeLinear'
SDL_SetTextureScaleMode(bd->FontTexture, SDL_ScaleModeLinear);
...
But that is expected because Linux Mint 20.3 which is based on Ubuntu 20.04 LTS (Focal Fossa) only ships with SDL 2.0.10. Any newer LTS version is above 2.0.17. Ubuntu 22.04 LTS (Jammy Jellyfish) has 2.0.20 and Ubuntu 24.04 LTS (Noble Numbat) has 2.30.0 (SDL seems to have changed its versioning scheme).
I wanted to update my distro anyway in the next weeks. Thanks for your help :)
I have updated repo so that latest zig can compile all examples, at least on Linux platform. I'm not sure about situation of windows platform right now, cause cross-compilation seems to be broken at the moment.
i got isues on my laptop there is win11, will check with updated repo latter
I've got the same issue for zig 0.13.0, MacOS Sonoma 14.4.1
Sorry, only latest zig master is supported.
sory actualy it works i need to manualy copy sdl2.dll to build directory . everything works now it amazing :D im new to zig so sometimes stupid
here https://youtu.be/kgBXFTg1x-I?t=1652 my project
@MartinAbilev Nice, have fun!
Hi!
I am trying to just set up the most basic project and build it.
I also tried zig's nightly but this complains about znoise missing.