2
$\begingroup$

I think there is a problem with TxDb.Hsapiens.UCSC.hg19.knownGene and EnsDb.Hsapiens.v75. I'm struggling to install all of these packages as they pause at byte-compile and prepare package for lazy loading . Can anyone try to re-install them in their local machine because am not the only one who is having the problem, please? They used to work fine until a week ago!

As usual, I install the packages by:

BiocManager::install(c("Homo.sapiens", "EnsDb.Hsapiens.v75", "TxDb.Hsapiens.UCSC.hg19.knownGene"))

I also tried installing them individually:

BiocManager::install("EnsDb.Hsapiens.v75")
BiocManager::install("TxDb.Hsapiens.UCSC.hg19.knownGene")

It pause at:

* installing *source* package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading

sessionInfo( )

R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.10 compiler_4.0.3      tools_4.0.3    

I've tried with and without RStudio. I'd be grateful if someone can try to replicate the error, please?

$\endgroup$
10
  • $\begingroup$ Can you edit your question to include how you are trying to install the packages? thanks. $\endgroup$
    – user438383
    Jan 1 at 13:18
  • $\begingroup$ Sorry @user438383, I forgot to add how I installed the pacakges. I edited the question now and added more details. $\endgroup$
    – Sam
    Jan 1 at 13:27
  • $\begingroup$ Thanks. Just tried it on macOs 10.15 and it seems to have installed OK. Does the same problem occur if you try and install a different package via bioconductor, or a package using install.packages()? $\endgroup$
    – user438383
    Jan 1 at 13:33
  • $\begingroup$ Oh, thank you. This is extremely strange because I tried it on my friend's computer and had the same problem. I can install any other package via Bioconductor without problem except for these three. Can I ask if you installed all three of them? $\endgroup$
    – Sam
    Jan 1 at 13:37
  • $\begingroup$ It's been a week and I've tried uninstalling R, RStudio and RFrameworks countless times but still not working. I'm sorry but can I ask if if you used BiocManager::install(c("Homo.sapiens", "EnsDb.Hsapiens.v75", "TxDb.Hsapiens.UCSC.hg19.knownGene")) to install them? $\endgroup$
    – Sam
    Jan 1 at 13:39
1
$\begingroup$

I am able to successfully install these packages using:

BiocManager::install(c("Homo.sapiens", "EnsDb.Hsapiens.v75", "TxDb.Hsapiens.UCSC.hg19.knownGene"))

This completes without any errors / warnings (R v4.0.3 / macOS 10.16), so I don't believe the packages themselves/Bioconductor are 'broken', but I suspect you are having compiler issues due to the Big Sur update.

These are the steps I used to solve the problem:

  1. Reinstall xcode command line tools (even if it says "up to date")
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
  1. Install gcc & llvm via Homebrew (instructions for installing Homebrew) or, if you already have gcc/llvm installed via Homebrew, skip to the next step
# This can take several hours
brew install gcc
brew install llvm
  1. Once you have gcc & llvm installed via Homebrew:
brew cleanup
brew update
brew upgrade
brew reinstall gcc
brew reinstall llvm
  1. Link some headers into /usr/local/include
sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/

# You can safely ignore warnings like this:
#ln: /usr/local/include//tcl.h: File exists
#ln: /usr/local/include//tclDecls.h: File exists
#ln: /usr/local/include//tclPlatDecls.h: File exists
#ln: /usr/local/include//tclTomMath.h: File exists
#ln: /usr/local/include//tclTomMathDecls.h: File exists
#ln: /usr/local/include//tk.h: File exists
#ln: /usr/local/include//tkDecls.h: File exists
#ln: /usr/local/include//tkPlatDecls.h: File exists
  1. Create a new ~/.R/Makevars file (if you already have a ~/.R/Makevars file, save it in a different directory (away from ~/.R/)) and include only these lines in the file:
FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++

LLVM_LOC = /usr/local/opt/llvm
CC=/usr/local/gfortran/bin/gcc -fopenmp
CXX=/usr/local/gfortran/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
  1. Compile a package from source in R/Rstudio
# To check whether openmp is enabled, compile data.table:
install.packages("data.table", type = "source")
  1. If your package fails to compile, a couple of SO users have had to install a fresh gfortran (re: https://stackoverflow.com/a/65334247/12957340), which you can download from https://github.com/fxcoudert/gfortran-for-macOS/releases/tag/10.2-bigsur-intel

Once you can install packages from source without error/issue, update Bioconductor

BiocManager::install(version = "3.12")

Then, finally, you should be able to install your packages using

BiocManager::install(c("Homo.sapiens", "EnsDb.Hsapiens.v75", "TxDb.Hsapiens.UCSC.hg19.knownGene"))
$\endgroup$
2
  • $\begingroup$ You are amazing Jared, I'll go through the steps right now to see if it works, fingers crossed. $\endgroup$
    – Sam
    Jan 7 at 19:46
  • 1
    $\begingroup$ Awesome, it is working now. Thank you so much, Jared :) $\endgroup$
    – Sam
    Jan 16 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.