I am getting an error when running `R CMD build` on a `forgeBSgenomeDataPkg` directory

80 views Asked by At

I needed to create a custom BSgenome library. I believe I've completed all the steps correctly. Mostly advice from https://www.bioconductor.org/packages/devel/bioc/vignettes/BSgenome/inst/doc/BSgenomeForge.pdf and https://support.bioconductor.org/p/125514/ with some outside help. I managed to run forgeBSgenomeDataPkg(seed) to completion, the last line of output from the run being:

Writing all sequences to './BSgenome.Ppatens.v3.3/inst/extdata/single_sequences.2bit' ... DONE

I can also see the newly created directory and its contents:
$ ls BSgenome.Ppatens.v3.3/
DESCRIPTION NAMESPACE R inst man
The final steps require closing R and running R CMD build on this directory, but something goes wrong when I try that, and I can't find a cause or solution:

$ R CMD build BSgenome.Ppatens.v3.3 dyld[6685]: Library not loaded: '@rpath/libreadline.6.2.dylib' Referenced from: '/Users/me/opt/miniconda3/lib/R/lib/libR.dylib' Reason: tried: '/Users/me/opt/miniconda3/lib/R/lib/../../libreadline.6.2.dylib' (no such file), '/Users/me/opt/miniconda3/lib/R/bin/exec/../../../libreadline.6.2.dylib' (no such file), '/Users/me/opt/miniconda3/lib/R/bin/exec/../../../libreadline.6.2.dylib' (no such file), '/Users/me/opt/miniconda3/lib/R/lib/libreadline.6.2.dylib' (no such file), '/Users/me/opt/miniconda3/lib/libreadline.6.2.dylib' (no such file), '/Users/me/opt/miniconda3/libreadline.6.2.dylib' (no such file) /Users/me/opt/miniconda3/lib/R/bin/build: line 10: 6684 Done echo 'tools:::.build_packages()' 6685 Abort trap: 6 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" --no-restore --slave --args ${args}

(Please be forgiving towards my formatting. I can't get a hang of the line breaks; doublespaces do nothing)

1

There are 1 answers

0
rdv On

So, in case anyone stumbles on this in the future. I don't have an answer on how to fix this issue, but I found a workaround for myself. I uploaded the newly created directory onto a server I have access to and executed the R CMD build BSgenome.Ppatens.v3.3/ command from there. From some clues I gathered searching for "Library not loaded: '@rpath/libreadline.6.2.dylib'", I figured it may be an R/python issue on my computer. I tried reinstalling both, which didn't solve the issue.