xzhoulab / iDEA

Differential expression (DE); gene set Enrichment Analysis (GSEA); single cell RNAseq studies (scRNAseq)
GNU General Public License v3.0
32 stars 11 forks source link

Installation error on macOS Catalina #3

Closed ahoffrichter closed 3 years ago

ahoffrichter commented 4 years ago

I'm having a problem installing the package. When using the devtools command

devtools::install_github('xzhoulab/iDEA', dependencies = T)

it returns an error:

clang: error: unsupported option '-fopenmp' make: *** [RcppExports.o] Error 1 ERROR: compilation failed for package ‘iDEA’

I guess it's a problem with mac and the clang compiler?

Could there be an easy fix in the package? Or do you have a suggestion how I can solve this?

Thanks in advance, Anne

sessionInfo() R version 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Catalina 10.15.4

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/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] rstudioapi_0.11 magrittr_1.5 usethis_1.6.0 devtools_2.3.0 pkgload_1.0.2 R6_2.4.1
[7] rlang_0.4.6 fansi_0.4.1 tools_3.6.3 pkgbuild_1.0.8 packrat_0.5.0 sessioninfo_1.1.1 [13] cli_2.0.2 withr_2.2.0 ellipsis_0.3.0 remotes_2.1.1 assertthat_0.2.1 digest_0.6.25
[19] rprojroot_1.3-2 crayon_1.3.4 processx_3.4.2 callr_3.4.3 fs_1.4.1 ps_1.3.2
[25] curl_4.3 testthat_2.3.2 memoise_1.1.0 glue_1.4.1 compiler_3.6.3 desc_1.2.0
[31] backports_1.1.6 prettyunits_1.1.1`

YingMa0107 commented 4 years ago

Hi,

The package has been tested on the following systems Windows 10: Home (1903), MAC: Catalina (10.15.1) and Linux: Ubuntu (16.04.6). It should be supported for all these three systems.

Could you please check if you have installed a compiler that does support OpenMP, such as gcc or clang from homebrew, and after install them, you have to modify variables in your personal makeovers file (~/.R/Makevars). Here is an example of the ~/.R/Makevars files when using gcc as the compiler on the macOS Catalina.

VER=-11.0.3 CC=gcc$(VER) CXX=g++$(VER) CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion FLIBS=-L/usr/local/Cellar/gcc/11.0.3/lib/gcc/11

The first line is the gcc version on your computer (type gcc --version on your terminal, you will got the information).And you also have to modify the last line according to your version of gcc. You can use the homebrew to install it, i.e. brew install gcc

If this does not help, here are also other solutions you can follow: https://github.com/RcppCore/RcppArmadillo/issues/143

Hope it helps!

Best, Ying

ahoffrichter commented 4 years ago

Hi Ying,

thank you very much for the quick reply! I will try your suggestions and let you know if it works.

Best, Anne