BiocParallel 1.33.12 binary has incorrect library linkage on macOS x86
0
0
Entering edit mode
@mjsteinbaugh
Last seen 12 months ago
Cambridge, MA

I'm seeing a build issue with the current BiocParallel binary on macOS x86:

BiocManager::install("BiocParallel")
# Works in R, but fails in RStudio.
library(BiocParallel)
Error: package or namespace load failed for ‘BiocParallel’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/site-library/BiocParallel/libs/BiocParallel.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/site-library/BiocParallel/libs/BiocParallel.so, 0x0006): Library not loaded: /Library/Frameworks/R.framework/Versions/4.3/Resources/lib/libR.dylib
  Referenced from: <BE9EB1DB-DF61-3612-B689-0B341783A2EC> /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/site-library/BiocParallel/libs/BiocParallel.so
  Reason: tried: '/Library/Frameworks/R.framework/Versions/4.3/Resources/lib/libR.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.3/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.3/Resources/lib/libR.dylib' (no such file), '/usr/local/lib/libR.dylib' (no such file), '/usr/lib/libR.dylib' (no such file, not in dyld cache)

The binary build is attempting to locate libR.dylib in the incorrect place, which should be /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libR.dylib

Best, Mike

BiocParallel • 2.1k views
ADD COMMENT
1
Entering edit mode

I don't think 1.33.12 is current -- does BiocManager::valid() report TRUE?

ADD REPLY
0
Entering edit mode

On my Apple Silicon Mac I just tried:

BiocManager::install("BiocParallel")
packageVersion("BiocParallel")
[1] ‘1.33.11’

And this is working inside of RStudio. I'll check on my Intel Mac that installed 1.33.12.

ADD REPLY
0
Entering edit mode

On my Intel Mac, seeing this:

Installing 'BiocParallel' with 'BiocManager::install' in '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/site-library'.
trying URL 'https://bioconductor.org/packages/3.17/bioc/bin/macosx/big-sur-x86_64/contrib/4.3/BiocParallel_1.33.12.tgz'
ADD REPLY
0
Entering edit mode

Aha I see the problem, the binaries are outdated:

> BiocManager::install("BiocParallel", type = "source", force = TRUE)
Bioconductor version 3.17 (BiocManager 1.30.20), R 4.3.0 (2023-04-21)
Installing package(s) 'BiocParallel'
trying URL 'https://bioconductor.org/packages/3.17/bioc/src/contrib/BiocParallel_1.34.0.tar.gz'
ADD REPLY
0
Entering edit mode

Here's a temporary fix in case anybody else hits this:

cd /Library/Frameworks/R.framework/Versions
ln -s 4.3-x86_64 4.3
ADD REPLY
0
Entering edit mode

I think this means that your RStudio has a different .libPaths() than your R, probably because of a configuration file, maybe ~/.Rprofile on your system.

ADD REPLY
0
Entering edit mode
> .libPaths()
[1] "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/site-library"
[2] "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library"
ADD REPLY
0
Entering edit mode

The problem here is that current binaries aren't available on macOS:

http://bioconductor.org/packages/release/bioc/html/BiocParallel.html

Source Package  BiocParallel_1.34.0.tar.gz
Windows Binary  BiocParallel_1.34.0.zip (64-bit only)
macOS Binary (x86_64)   BiocParallel_1.33.12.tgz
macOS Binary (arm64)    BiocParallel_1.33.11.tgz

Safe to close when 1.34.0 is updated in the repo

ADD REPLY
0
Entering edit mode

Yes, thanks the build systems don't (currently... they must have at one point) have Rmpi installed so I've asked to have that corrected.

I'm not sure that this explains differences between R versus RStudio, though, which was your original question. I guess these are actually different R? Or as mentioned earlier different .libPaths() (you only provided one .libPaths() above...)

ADD REPLY
0
Entering edit mode

Sorry should have been clearer -- libPaths are the same in R and RStudio. There's something weird going on between R and RStudio's handling of missing ldpaths.

ADD REPLY
0
Entering edit mode

I moved Rmpi to the 'Enhances' field, so the BiocParallel binary propagated for macOS (actually all platforms).

Does this address the problems you were having, or are there remaining issues?

ADD REPLY

Login before adding your answer.

Traffic: 792 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6