I am trying to load the R library (R 4.0.0 available from https://cran.r-project.org) from my signed and notarized app.
But this is what I get on the console:
dyld: Library not loaded: /Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib
Referenced from: /Users/hecht/Library/Developer/Xcode/DerivedData/JMP-dgmxmeayjbgthlckfcezeplzucmk/Build/Products/Debug/JMP.app/Contents/Frameworks/tkext//tkrproxy
Reason: no suitable image found. Did find:
/Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib: code signature in (/Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib) not valid for use in process using Library Validation: mapping process has no Team ID and is not a platform binary
/Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib: stat() failed with errno=1
/Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib: stat() failed with errno=1
I have checked that libR.dylib has LC_VERSION_MIN_MACOSX set:
% otool -l /Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib | grep -B 1 -A 3 LC_VERSION_MIN
Load command 8
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.13
sdk 10.15
I have checked that the library's load path is absolute and doesn't include @rpath:
% otool -D /Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib
/Library/Frameworks/R.framework/Versions/Current/Resources/lib/libR.dylib:
/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib
My app has com.apple.security.cs.disable-library-validation set to YES.
What am I missing?