Open James-Riordan opened 6 months ago
Are you sure that you are on the latest version of vulkan-zig? ComptimeStringMap was removed in #129
Are you sure that you are on the latest version of vulkan-zig? ComptimeStringMap was removed in #129
I downloaded a Zip from the master branch this morning just before trying, so I'd assume so.
I also ran wget https://raw.githubusercontent.com/KhronosGroup/Vulkan-Docs/main/xml/vk.xml
and put a copy both in registry/
and examples/registry/
just to be safe.
Also, FWIW, I'm running Vulkan-SDK version 1.3.268.1
Edit to this comment:
I just did a CMD + F
on the project to search for std.ComptimeStringMap
in the render.zig
file, but it doesn't exist, like you said. This is a very peculiar issue.
User Error discovered. I accidentally swapped out .vulkan_zig
in build.zig.zon
to use an outdated version.
Regardless, with version issues fixed, I still receive the following errors:
0.13.0-dev.46+3648d7df1:
run-triangle
└─ run triangle
└─ install
└─ install triangle
└─ zig build-exe triangle Debug native failure
error: error: unable to find dynamic system library 'glfw' using strategy 'paths_first'. searched paths:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/lib/libglfw.tbd
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/lib/libglfw.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/lib/libglfw.so
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/lib/libglfw.a
error: the following command exited with error code 1:
/Users/jamesriordan/zig/zig-macos-x86_64-0.13.0-dev.46+3648d7df1/zig build-exe -lglfw -ODebug --dep vulkan --dep shaders -Mroot=/Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/triangle.zig -Mvulkan=/Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache/o/a620a53e2ae7bb70b2852b2d64811abf/vk.zig -Mshaders=/Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache/shaders/h0G5grXZG86KQANON22yZ35X6HJ-GAcca_RGBn0wpnDB_VkZjjCUPzkfOEwwsl05 -lc --cache-dir /Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache --global-cache-dir /Users/jamesriordan/.cache/zig --name triangle --listen=-
Build Summary: 3/8 steps succeeded; 1 failed (disable with --summary none)
run-triangle transitive failure
└─ run triangle transitive failure
├─ zig build-exe triangle Debug native failure
└─ install transitive failure
└─ install triangle transitive failure
└─ zig build-exe triangle Debug native (+2 more reused dependencies)
error: the following build command failed with exit code 1:
/Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache/o/74e2174d1d8d2a4c0108d29b83b7abe7/build /Users/jamesriordan/zig/zig-macos-x86_64-0.13.0-dev.46+3648d7df1/zig /Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples /Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache /Users/jamesriordan/.cache/zig --seed 0xc92bc799 -Z60b5da14e6314465 run-triangle
0.13.0-dev.4+c7ffdbcd4:
run-triangle
└─ run triangle
└─ zig build-exe triangle Debug native
└─ run vulkan-zig-generator (vk.zig)
└─ zig build-exe vulkan-zig-generator Debug native 1 errors
src/vulkan/render.zig:106:26: error: root struct of file 'std' has no member named 'StaticStringMap'
const builtin_types = std.StaticStringMap([]const u8).initComptime(.{
~~~^~~~~~~~~~~~~~~~
/Users/jamesriordan/zig/zig-macos-x86_64-0.13.0-dev.4+c7ffdbcd4/lib/std/std.zig:1:1: note: struct declared here
pub const ArrayHashMap = array_hash_map.ArrayHashMap;
^~~
referenced by:
renderName: src/vulkan/render.zig:604:17
renderApiConstant: src/vulkan/render.zig:517:21
remaining reference traces hidden; use '-freference-trace' to see all reference traces
error: the following command failed with 1 compilation errors:
/Users/jamesriordan/zig/zig-macos-x86_64-0.13.0-dev.4+c7ffdbcd4/zig build-exe -ODebug -Mroot=/Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/src/main.zig --cache-dir /Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache --global-cache-dir /Users/jamesriordan/.cache/zig --name vulkan-zig-generator --listen=-
Build Summary: 1/8 steps succeeded; 1 failed (disable with --summary none)
run-triangle transitive failure
└─ run triangle transitive failure
├─ zig build-exe triangle Debug native transitive failure
│ └─ run vulkan-zig-generator (vk.zig) transitive failure
│ └─ zig build-exe vulkan-zig-generator Debug native 1 errors
└─ install transitive failure
└─ install triangle transitive failure
└─ zig build-exe triangle Debug native (+2 more reused dependencies)
error: the following build command failed with exit code 1:
/Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache/o/bb7b12f38710e2aafd46fe8ef991cfc5/build /Users/jamesriordan/zig/zig-macos-x86_64-0.13.0-dev.4+c7ffdbcd4/zig /Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples /Users/jamesriordan/Workspaces/Code-Examples/vulkan-zig-master/examples/zig-cache /Users/jamesriordan/.cache/zig --seed 0x4f061167 -Z8174ad513090a2b2 run-triangle
0.13.0-dev.4+c7ffdbcd4:
This build is too old, it was before the change relevant to #129. Regarding the other issue, well, it can't find GLFW. I'm not too familiar with how dependencies work on Mac OS to be honest, so I doubt that I can be of much help. Its not downloaded automatically by Zig at least - it needs to be provided by your system.
I'm on MacOS, and tested the command
zig build --build-file $(pwd)/examples/build.zig run-triangle
in vulkan-zig's root.The following is the terminal output returned when trying to zig build with two different versions
dev.4+c7ffdbcd4
and0.13.0-dev.46+3648d7df1
.dev.4+c7ffdbcd4:
(shortened error):
(full error output):
0.13.0-dev.46+3648d7df1:
(shortened error):
(full error output):