glmGamPoi icon indicating copy to clipboard operation
glmGamPoi copied to clipboard

Can't install the package on MacOS Monterey

Open sjwu571 opened this issue 1 year ago • 1 comments

Hi,

I noticed in the error message below it mentioned "big sur" which was the previous MacOS version. Is that why my installation kept failing?

Thanks! JS

BiocManager::install("glmGamPoi") 'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories: CRAN: https://cran.rstudio.com/

Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.0 (2022-04-22) Installing package(s) 'glmGamPoi' Warning: unable to access index for repository https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2: cannot open URL 'https://bioconductor.org/packages/3.15/bioc/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2: cannot open URL 'https://bioconductor.org/packages/3.15/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2: cannot open URL 'https://bioconductor.org/packages/3.15/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2: cannot open URL 'https://bioconductor.org/packages/3.15/workflows/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2: cannot open URL 'https://bioconductor.org/packages/3.15/books/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES' Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘glmGamPoi’ Do you want to attempt to install these from sources? (Yes/no/cancel) y installing the source package ‘glmGamPoi’

trying URL 'https://bioconductor.org/packages/3.15/bioc/src/contrib/glmGamPoi_1.8.0.tar.gz' Content type 'application/x-gzip' length 914728 bytes (893 KB)

downloaded 893 KB

  • installing source package ‘glmGamPoi’ ... ** using staged installation ** libs clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/beachmat/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/beachmat/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c beta_estimation.cpp -o beta_estimation.o clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/beachmat/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c deviance.cpp -o deviance.o clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/beachmat/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c overdispersion.cpp -o overdispersion.o clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/beachmat/include' -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c utils.cpp -o utils.o clang++ -arch arm64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o glmGamPoi.so RcppExports.o beta_estimation.o deviance.o overdispersion.o utils.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1 -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1' ld: warning: directory not found for option '-L/opt/R/arm64/gfortran/lib' ld: library not found for -lgfortran clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [glmGamPoi.so] Error 1 ERROR: compilation failed for package ‘glmGamPoi’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/glmGamPoi’

sjwu571 avatar Aug 11 '22 17:08 sjwu571

Hi sjwu571,

someone reported a somewhat similar issue on the support side recently: https://support.bioconductor.org/p/9137290/

I assume that you have one of the fancy new M1 Macs, which have a different processor architecture. The official recommendation by the Bioconductor team (see Herve Pages response) is to install the Intel version of R and run it in emulation mode.

Alternatively, you can go ahead and use the R version build specifically for M1 Macs, but that means that you will have to compile all source packages from scratch. Accordingly, you will need to install some additional tools for the compilation. For glmGamPoi in particular you seem to lack a Fortran compiler (from your error log ld: library not found for -lgfortran). The best place to get the neccessary libraries and tools is to download them from https://mac.r-project.org/tools/

There is a specific section how to install Fortran for Apple silicon Macs.

Best, Constantin

https://mac.r-project.org/tools/

const-ae avatar Aug 12 '22 08:08 const-ae