grimbough / Rhdf5lib

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

Rhdf5lib/libs/Rhdf5lib.so' not valid for use in process: library load disallowed by system policy #49

Closed akhst7 closed 1 year ago

akhst7 commented 1 year ago

Hi,

I am using M1 Mac running OSX 13.1 and installed an arm-64 binary of Rhd5lib (1.21.1). Any packages with Rhdf5lib dependency throws a fit with a following error;

dlopen(/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so, 0x0006): tried: '/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so' (code signature in <91B3FCF0-4D32-3BF4-9306-793F960DD6B1> '/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 <91B3FCF0-4D32-3BF4-9306-793F960DD6B1> '/Volumes/Document/4.x_Rlib/Rhdf5lib/libs/Rhdf5lib.so' not valid for use in process: library load disallowed by system policy)

It looks like an OSX code signing issue but I'd appreciate any workaround for this issue.

> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

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

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.19 compiler_4.2.2      tools_4.2.2         curl_4.3.3          remotes_2.4.2  
(base) ~ neofetch
                    'c.          Mac-Studio.local
                 ,xNMM.          -------------------------------------
               .OMMMMo           OS: macOS 13.1 22C65 arm64
               OMMM0,            Host: Mac13,2
     .;loddo:' loolloddol;.      Kernel: 22.2.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 1 day, 15 hours, 28 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 171 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Light)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: Monaco 12
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M1 Ultra
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M1 Ultra
       .cooc,.    .,coo:.        Memory: 3488MiB / 131072MiB
akhst7 commented 1 year ago

Ok, I found a temporary fix for this (https://github.com/SAP/node-rfc/issues/140#issuecomment-675260978). This allowed the installation of any packages with Rhdf5lib.so dependency without running into the code-sign issue. After installation of packages, enable the spctl global assessment rule.