waldronlab/curatedMetagenomicData

Can't install in Mac M1

Closed this issue · 2 comments

I used BiocManager::install("curatedMetagenomicData") to install, but there are some errors.

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

replacement repositories:
    CRAN: https://ftp.fau.de/cran/

Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.2 (2021-11-01)
Installing package(s) 'curatedMetagenomicData'
also installing the dependencies ‘DirichletMultinomial’, ‘mia’

Package which is only available in source form, and may need
  compilation of C/C++/Fortran: ‘DirichletMultinomial’
Do you want to attempt to install these from sources? (Yes/no/cancel) 
installing the source packages ‘DirichletMultinomial’, ‘mia’, ‘curatedMetagenomicData’

trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/DirichletMultinomial_1.36.0.tar.gz'
Content type 'application/x-gzip' length 478666 bytes (467 KB)
==================================================
downloaded 467 KB

trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/mia_1.2.7.tar.gz'
Content type 'application/x-gzip' length 1878862 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

trying URL 'https://bioconductor.org/packages/3.14/data/experiment/src/contrib/curatedMetagenomicData_3.2.3.tar.gz'
Content type 'application/x-gzip' length 1841917 bytes (1.8 MB)
==================================================
downloaded 1.8 MB

* installing *source* package ‘DirichletMultinomial’ ...
** using staged installation
** libs
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include  `gsl-config --cflags` -DR_DIRICHLETMULTINOMIAL -fPIC  -falign-functions=64 -Wall -g -O2  -c R_init_DirichletMultinomial.c -o R_init_DirichletMultinomial.o
/bin/sh: gsl-config: command not found
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include  `gsl-config --cflags` -DR_DIRICHLETMULTINOMIAL -fPIC  -falign-functions=64 -Wall -g -O2  -c dirichlet_fit.c -o dirichlet_fit.o
/bin/sh: gsl-config: command not found
clang -arch arm64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/arm64/include  `gsl-config --cflags` -DR_DIRICHLETMULTINOMIAL -fPIC  -falign-functions=64 -Wall -g -O2  -c dirichlet_fit_main.c -o dirichlet_fit_main.o
/bin/sh: gsl-config: command not found
dirichlet_fit_main.c:1:10: fatal error: 'gsl/gsl_rng.h' file not found
#include <gsl/gsl_rng.h>

Mac M1

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.2.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-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] paradox_0.8.0               ellipsis_0.3.2             
  [3] rprojroot_2.0.2             XVector_0.34.0             
  [5] set6_0.2.4                  GenomicRanges_1.46.1       
  [7] fs_1.5.2                    rstudioapi_0.13            
  [9] distr6_1.6.7                listenv_0.8.0              
 [11] remotes_2.4.2               mlr3tuning_0.12.1          
 [13] bit64_4.0.5                 AnnotationDbi_1.56.2       
 [15] fansi_1.0.2                 codetools_0.2-18           
 [17] splines_4.1.2               sparseMatrixStats_1.6.0    
 [19] cachem_1.0.6                mlr3pipelines_0.4.0        
 [21] pkgload_1.2.4               annotate_1.72.0            
 [23] png_0.1-7                   graph_1.72.0               
 [25] HDF5Array_1.22.1            BiocManager_1.30.16        
 [27] compiler_4.1.2              httr_1.4.2                 
 [29] backports_1.4.1             assertthat_0.2.1           
 [31] Matrix_1.4-0                fastmap_1.1.0              
 [33] cli_3.2.0                   BiocSingular_1.10.0        
 [35] prettyunits_1.1.1           tools_4.1.2                
 [37] rsvd_1.0.5                  ooplah_0.2.0               
 [39] glue_1.6.2                  GenomeInfoDbData_1.2.7     
 [41] dplyr_1.0.8                 mlr3_0.13.3                
 [43] Rcpp_1.0.8                  Biobase_2.54.0             
 [45] vctrs_0.3.8                 Biostrings_2.62.0          
 [47] rhdf5filters_1.6.0          preprocessCore_1.56.0      
 [49] DelayedMatrixStats_1.16.0   globals_0.14.0             
 [51] ps_1.6.0                    brio_1.1.3                 
 [53] testthat_3.1.2              beachmat_2.10.0            
 [55] lifecycle_1.0.1             irlba_2.3.5                
 [57] devtools_2.4.3              XML_3.99-0.9               
 [59] future_1.24.0               zlibbioc_1.40.0            
 [61] lgr_0.4.3                   MatrixGenerics_1.6.0       
 [63] parallel_4.1.2              SummarizedExperiment_1.24.0
 [65] rhdf5_2.38.0                SingleCellExperiment_1.16.0
 [67] memoise_2.0.1               RSQLite_2.2.10             
 [69] GSVA_1.42.0                 S4Vectors_0.32.3           
 [71] desc_1.4.1                  ScaledMatrix_1.2.0         
 [73] checkmate_2.0.0             dictionar6_0.1.3           
 [75] palmerpenguins_0.1.0        BiocGenerics_0.40.0        
 [77] pkgbuild_1.3.1              BiocParallel_1.28.3        
 [79] GenomeInfoDb_1.30.1         rlang_1.0.2                
 [81] pkgconfig_2.0.3             matrixStats_0.61.0         
 [83] bitops_1.0-7                lattice_0.20-45            
 [85] purrr_0.3.4                 Rhdf5lib_1.16.0            
 [87] bit_4.0.4                   processx_3.5.2             
 [89] tidyselect_1.1.2            GSEABase_1.56.0            
 [91] parallelly_1.30.0           magrittr_2.0.2             
 [93] R6_2.5.1                    IRanges_2.28.0             
 [95] generics_0.1.2              DelayedArray_0.20.0        
 [97] DBI_1.1.2                   mlr3proba_0.4.4.9000       
 [99] pillar_1.7.0                param6_0.2.4               
[101] withr_2.5.0                 survival_3.3-1             
[103] KEGGREST_1.34.0             RCurl_1.98-1.6             
[105] tibble_3.1.6                crayon_1.5.0               
[107] uuid_1.0-3                  utf8_1.2.2                 
[109] usethis_2.1.5               grid_4.1.2                 
[111] data.table_1.14.2           blob_1.2.2                 
[113] callr_3.7.0                 mlr3misc_0.10.0            
[115] bbotk_0.5.1                 digest_0.6.29              
[117] xtable_1.8-4                stats4_4.1.2               
[119] sessioninfo_1.2.2           mlr3extralearners_0.5.26   

MacBook Pro (13-inch, M1, 2020)

R/Bioconductor support for M1 is a broader issue outside of our expertise, and this is an issue with dependencies rather than curatedMetagenomicData itself. Some people on StackExchange (e.g. https://stackoverflow.com/questions/67680663/installing-specific-r-packages-from-source-with-apple-m1-chip-causing-repository) and support.bioconductor.org (e.g. https://support.bioconductor.org/p/9138121/, https://support.bioconductor.org/p/9139482/#9139589) have posted solutions involving installing an x86 R with Rosetta until Bioconductor can offer an M1 binary repository.

One other option - the Docker-based used of cMD outlined at https://github.com/waldronlab/curatedMetagenomicAnalyses will work if you run an x86-based container (https://forums.docker.com/t/run-x86-intel-and-arm-based-images-on-apple-silicon-m1-macs/117123), and the cloud-based solution referenced there (http://app.orchestra.cancerdatasci.org/) will work without any setup or installation.