Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Install instructions should include need to add /usr/local/lib to the library search paths. #1001

Open
billhollings opened this issue Mar 25, 2024 · 2 comments
Labels
build This is relevant to the build system documentation Improvements or additions to documentation

Comments

@billhollings
Copy link
Collaborator

On macOS, the Vulkan SDK installer deposits the Vulkan and MoltenVK dylib files in /usr/local/lib. In order to run Vulkan Samples, this path needs to be included in the library search paths vulkan_samples runs under. Without this, Volk fails to initialize.

macOS does not include /usr/local/lib in the library search paths by default. It can be included a couple of different ways, including either of the following:

  • Include /usr/local/lib in the LD_RUNPATH_SEARCH_PATHS build setting when building vulkan_samples on macOS. Although I am not a cmake expert, I assume this could probably be done by updating the build config files.

  • Invoke export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH prior to launching vulkan_samples from the command line. Since this can be done by the user, this might just need some documentation in either the Usage or Build/macOS sections of the Vulkan Samples documentation.

Also, on a related note, the Build/macOS instructions includes a requirement:

Vulkan SDK ./install_vulkan.py

I suggest this could probably be reworded to just "Installed Vulkan SDK", and removing the reference to ./install_vulkan.py. These days, Vulkan Installer App takes care of installing the dylibs automatically for most Vulkan SDK installations, and the referenced Vulkan SDK Getting Started guide already covers the details of both the installer app and ./install_vulkan.py, if a user wants to install from the command line instead of using the installer app.

@billhollings billhollings added documentation Improvements or additions to documentation build This is relevant to the build system labels Mar 26, 2024
@jeroenbakker-atmind
Copy link
Contributor

Not sure, but just adding it here as it isn't mentioned and perhaps this case should also be considered/included in the docs.

I use source ./setup-env.sh from the Vulkan SDK folder. This adds DYLD_LIBRARY_PATH=/Users/jeroen/VulkanSDK/1.3.275.0/macOS/lib to the environment variables.

@gpx1000
Copy link
Contributor

gpx1000 commented Apr 6, 2024

That's the correct solution, it also would work to use iOS/setup-env.sh for the iOS libs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build This is relevant to the build system documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants