Hi,
I've released and packaged an application, and I have a user reporting an error when trying to start the application:
/Applications/Onivim2.app/Contents/MacOS/Oni2 -f --trace --debug
dyld: Library not loaded: @executable_path/../Frameworks/libffi.6.dylib
Referenced from: /Applications/Onivim2.app/Contents/MacOS/Oni2_editor
Reason: no suitable image found. Did find:
/Applications/Onivim2.app/Contents/MacOS/../Frameworks/libffi.6.dylib: open() failed with errno=13
/Applications/Onivim2.app/Contents/MacOS/../Frameworks/libffi.6.dylib: stat() failed with errno=1
/Applications/Onivim2.app/Contents/MacOS/../Frameworks/libffi.6.dylib: open() failed with errno=13
/Applications/Onivim2.app/Contents/MacOS/../Frameworks/libffi.6.dylib: stat() failed with errno=13
file system relative paths not allowed in hardened programs
I'm currently code-signing with the hardened runtime and these entitlements:
com.apple.security.cs.allow-jit
com.apple.security.cs.allow-unsigned-executable-memory
com.apple.security.cs.disable-library-validation
I saw an issue another application ran into, which suggests the problem was with @executable_path, and that they were able to solve their problem by adding the 'com.apple.security.cs.allow-dyld-environment-variables' entitlement. I'm going to test that out and give it a shot!
However, the concerning aspect is I'm not able to reproduce this issue on any OSX environment I've tried. I have access to two environments:
- 10.14.6
- 10.15.3
I'm not able to reproduce this error on either machine - the application starts up successfully. I'd like to figure out how to test for this, so that I can verify the fix.
So two questions:
- Is there anything I should look at, aside from the allow-dyld-environment-variables entitlement?
- Is there any setting I should adjust so I can reproduce this issue locally?
Thank you for your help!