Open zkamvar opened 1 week ago
I cannot reproduce the crash on my macOS. Does it crash without renv? It could be possible that the version of python that you are using is not compatible with the R that you are using. For example, they may be linked to different C runtime.
Regrading to the BLAS library thing (note: I have the same issue, it is not relevant to your crash). It seems that python on macOS has silently import the Accelerate.framework
# print the shared libraries loaded
# doesn't not work for system python /usr/bin/python3 which is protected by SIP
$ DYLD_PRINT_LIBRARIES=YES python -c '1' 2>&1 | grep BLAS
dyld[59072]: <BF96AF15-B1D2-3701-A1F6-E5EFA27A924D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
dyld[59072]: <65B3F8D3-EA57-3C22-88A0-DE0FFF2ADB20> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
dyld[59072]: <BF96AF15-B1D2-3701-A1F6-E5EFA27A924D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
dyld[59072]: <65B3F8D3-EA57-3C22-88A0-DE0FFF2ADB20> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
I am still trying to find a valid solution for it. Setting DYLD_INSERT_LIBRARIES
only works for manually installed version of python on macOS and /usr/bin/python3
is protected by System Integrity Protection (SIP).
DYLD_INSERT_LIBRARIES=/Library/Frameworks/R.framework/Resources/lib/libRblas.dylib radian
If I attempt to load a package with compiled code inside a renv project from reticulate, then I get a segmentation fault. I get no segmentation fault with the distributed version of R. I don't know if this is on the radian side or the https://github.com/r-lib/rig side. Any help is appreciated.
EDIT, I decided to compare the outputs of
renv::diagnostics()
for both and I found that there's a different BLAS library used from radian, but that's also in normal radian operation, so I'm not sure what the difference is.Steps to reproduce
Create a directory with a single file that loads the rlang package and initialize the renv project (this works with both radian and regular R).
After that, run radian and try to load rlang:
In base R, it's fine: