Skip to content

Add "/usr/local/lib/libvulkan.dylib" as a path checked when loading Vulkan on MacOS#14935

Open
ItchyTrack wants to merge 2 commits intolibsdl-org:mainfrom
ItchyTrack:main
Open

Add "/usr/local/lib/libvulkan.dylib" as a path checked when loading Vulkan on MacOS#14935
ItchyTrack wants to merge 2 commits intolibsdl-org:mainfrom
ItchyTrack:main

Conversation

@ItchyTrack
Copy link
Copy Markdown

I was having a issue where SDL was not loading with the error of SDL could not create window! SDL_Error: Failed to load Vulkan Portability library. I am also using volk and I saw volk was loading Vulkan from "/usr/local/lib/libvulkan.dylib". SDL does not check this path and so I added it as the last path checked.

This fixed my issues and based on the comments in volk // modern versions of macOS don't search /usr/local/lib automatically contrary to what man dlopen says this may not have been a problem in the past.

Old:

const char *defaultPaths[] = {
    "@executable_path/../Frameworks/libMoltenVK.dylib",
    "vulkan.framework/vulkan",
    "libvulkan.1.dylib",
    "libvulkan.dylib",
    "MoltenVK.framework/MoltenVK",
    "libMoltenVK.dylib"
};

New:

const char *defaultPaths[] = {
    "@executable_path/../Frameworks/libMoltenVK.dylib",
    "vulkan.framework/vulkan",
    "libvulkan.1.dylib",
    "libvulkan.dylib",
    "MoltenVK.framework/MoltenVK",
    "libMoltenVK.dylib",
    "/usr/local/lib/libvulkan.dylib"
};

@slouken slouken added this to the 3.6.0 milestone Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants