Closed spnda closed 3 months ago
I have seen similar issues as well. I see the following when building for macOS with Xcode 15.2:
MoltenVK/Package/Release/MoltenVK/dylib/macOS/libMoltenVK.dylib
. The dylib now appears at MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib
. This is unfortunate, as it breaks compatiblity with Vulkan SDK structure and thus application cmake scripts also break when doing development with local MoltenVK builds, i.e. you can no longer just change the VULKAN_SDK env variable to point at your local MVK build. You have to either change your cmake script, or manually create a symlink at MoltenVK/Package/Release/MoltenVK/dylib
.Hmm, interesting find about the size of the file, which I can confirm. I just checked out the latest again and compiled it and got a 86KB dylib instead of the 15.2MB one. And I can confirm that doing make clean && make macos
then produces the 15.2MB dylib file again. Btw I am on Xcode 15.3.
This is unfortunate, as it breaks compatiblity with Vulkan SDK structure and thus application cmake scripts also break when doing development with local MoltenVK builds, i.e. you can no longer just change the VULKAN_SDK env variable to point at your local MVK build. You have to either change your cmake script, or manually create a symlink at MoltenVK/Package/Release/MoltenVK/dylib.
FWIW, the next SDK is using v1.2.8 (which will be out next week). Vulkan-Tools cmake files have also been updated to reflect the new location of the .dylib.
Hi @richard-lunarg, will cmake’s find_package(Vulkan OPTIONAL_COMPONENTS MoltenVK)
(using the FindVulkan.cmake module) continue to work with this change, assuming you first do source setup-env.sh
inside the Vulkan SDK directory? Many cross platform apps depend on this working.
Or put another way, will the Vulkan SDK layout change in any way as a result of this MoltenVK change? Hopefully not...
libMoltenVK.dylib will be in the same place in the SDK for quite some time moving forward. It's just moved in the MoltenVK build artifacts.
install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Users/sean/Documents/git/spnda/MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib (for architecture x86_64)
and
I just checked out the latest again and compiled it and got a 86KB dylib instead of the 15.2MB one.
These should be fixed in PR #2175. Try running from the SDK release v.1.2.8 tag.
#define MVK_HIDE_VULKAN_SYMBOLS 1
)I'm not sure, but perhaps incremental builds are not linking in some missing pieces. Kind of annoying since you have to build clean and rebuild with every change to get a functional dylib.
install_name_tool: warning: changes being made to the file will invalidate the code signature in: /Users/sean/Documents/git/spnda/MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib (for architecture x86_64)
and
I just checked out the latest again and compiled it and got a 86KB dylib instead of the 15.2MB one.
These should be fixed in PR #2175. Try running from the SDK release v.1.2.8 tag.
As stated in the original comment, I tested past #2175, which fixed the first issue, but was the one which brought up the issue with the tiny binary which contains no Vulkan symbols. So, no, that PR did not fix the second issue.
PR #2196 should fix this. Please retest with latest, and close this issue if the problem has been fixed.
Checking out 9082ca839f4eb83d183837fe656059ac12e4ee03, which is the last commit before the merge of #2170, and building the dylib with
make macos
my application runs just as it used to.Now if I checkout eff757144614a20d7b452c8388019783d9511a25 (from #2170), build the driver with
make macos
I get this output:After changing the symlink to the new dylib location the application crashes with an EXC_BAD_ACCESS while loading the dylib file and this reason:
If I update past #2175, build it and run my application, instead of an application crash I now get this output (running with
VK_LOADER_DEBUG=error,warn,info
:The rest of my setup did not change and switching to any of the commits always gives the same exact result. I also can't find the section of the documentation anymore that talked about symlinking the dylib file from
/usr/local/lib
to the build output directly when developing, so did that perhaps change?