travisvroman/kohi

[macOS] Build error re: Vulkan

Closed this issue · 2 comments

First off, just want to thank you for this amazing project and related videos. I'm right at the beginning but really enjoying it so far! Learning a lot. I'm a Swift developer for  platforms so it's also been interesting re-learning C – you have a really great, clean approach IMO. Anyway, thanks!

Describe the bug
I installed Vulkan and I think setup correctly through environment. From either command line or in VSCode everything seems to "build" fine, but when I try to "run" I get the following in the output:

Error opening library: dlopen(libkohi.plugin.renderer.vulkan.dylib, 0x0002): Library not loaded: @rpath/libvulkan.1.dylib
  Referenced from: <A630A10B-6FAC-377C-84FD-FF728A7299BF> /Users/shaps/Developer/kohi/bin/libkohi.plugin.renderer.vulkan.dylib
  Reason: tried: './libvulkan.1.dylib' (no such file)

Desktop (please complete the following information):

  • macOS
  • Sonoma 14.5

@shaps80 Thanks for reporting this! It took me a while to get to the bottom of this issue. I pushed a small temporary fix into the release/v0.8.0 branch. Basically it seems that the way the new Vulkan SDK install works changed the path where the libvulkan.1.dylib is located, seemingly even when the global install option is selected.

I'll need to come up with a more permanent solution in the future, but the changes are here: 86fc6ac

Please let me know if this helps.

Closing this. If this doesn't fix the issue, please feel free to re-open.