grimbough / Rhdf5lib

Distribution of the HDF5 library in an R package
https://bioconductor.org/packages/Rhdf5lib/
6 stars 14 forks source link

Can't load 1.20.0 in M1Mac running OSX 13.3.1 and R 4.30 #51

Closed akhst7 closed 1 year ago

akhst7 commented 1 year ago

Hi, I am having a codesign error with a version 1.20.0 in M1 Mac when I try to load it , shown as follows.

library(Rhdf5lib)
Error: package or namespace load failed for ‘Rhdf5lib’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so':
  dlopen(/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so, 0x0006): tried: '/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so' (code signature in <3B12270F-642C-3784-BE84-5436EED4FFE6> '/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so' not valid for use in process: library load disallowed by system policy), '/System/Volumes/Preboot/Cryptexes/OS/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so' (no such file), '/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so' (code signature in <3B12270F-642C-3784-BE84-5436EED4FFE6> '/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so' not valid for use in process: library load disallowed by system policy)

Arm64 Binary Rhdf5lib from bioconductor (1.20.0) was installed and working fine until R was upgraded from 4.2.2 to 4.3.0. This is the same issue in #50. Any workaround ?

R.version
               _                           
platform       aarch64-apple-darwin20      
arch           aarch64                     
os             darwin20                    
system         aarch64, darwin20           
status                                     
major          4                           
minor          3.0                         
year           2023                        
month          04                          
day            21                          
svn rev        84292                       
language       R                           
version.string R version 4.3.0 (2023-04-21)
nickname       Already Tomorrow
sw_vers
ProductName:        macOS
ProductVersion:     13.3.1
BuildVersion:       22E261
> sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.3.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Indiana/Indianapolis
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] BiocManager_1.30.20 compiler_4.3.0      tools_4.3.0         remotes_2.4.2 
grimbough commented 1 year ago

The previous time you reported this (#50) the solution was to use the pre-compiled binary from Bioconductor. Since you've switched to R-4.3, I guess you're now using BioC 3.17. Either the binary distributed by Bioconductor for that version has been built differently, and we should try to figure out what changed, or you're getting the source version and compiling locally instead.

Perhaps you can share the output from installing the package so we can verify which is the case?

akhst7 commented 1 year ago

@grimbough, I just manually compiled a version 1.21.0 which was loaded in R 4.3 without any issues. It's been like this with arm64 M1 Mac. Anyway, I will close this issue now. Thanks.