Skip to content

[macOS] rpath not set correctly on executable when making app bundle #40

@shinra-electric

Description

@shinra-electric

I can see in CMakeLists.txt line 308 that install_name_tool is used to add a generic rpath to @executable_path/../Frameworks.

However, when checking the executable with otool -L iris we can see it's not applied.

There are two paths in there that should be pointing to @executable_path/../Frameworks

@rpath/libvulkan.1.dylib
@rpath/libMoltenVK.dylib 

This could be fixed with:

install_name_tool -change @rpath/libvulkan.1.dylib @executable_path/../Frameworks/libvulkan.1.dylib ${BUNDLE_PATH}/Contents/MacOS/iris
install_name_tool -change @rpath/libMoltenVK.dylib @executable_path/../Frameworks/libMoltenVK.dylib ${BUNDLE_PATH}/Contents/MacOS/iris

I also noticed that there is another dylib in the Frameworks folder that has no reference to it from either the executable or the other dylibs called libvulkan.1.4.341.dylib. I think this is the same as libvulkan.1.dylib, in which case it is duplicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions