-1
$\begingroup$

I want to install NNLM

install_github('linxihui/NNLM')

lang: error: unsupported option '-fopenmp'
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘NNLM’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/NNLM’
Error: Failed to install 'NNLM' from GitHub:
  (converted from warning) installation of package ‘/var/folders/wk/qwgr9yqs6ts0czx__y_w8gch0000gq/T//RtmpA8PudK/filec5bce1f1309/NNLM_0.4.4.tar.gz’ had non-zero exit status
> 
> install.packages('NNLM')
Warning in install.packages :
  package ‘NNLM’ is not available (for R version 3.6.3)
> 

What should I do?

> session_info()
─ Session info ─────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.3 (2020-02-29)
 os       macOS Mojave 10.14.6        
 system   x86_64, darwin15.6.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_GB.UTF-8                 
 ctype    en_GB.UTF-8                 
 tz       Europe/London               
 date     2020-05-11                  

─ Packages ─────────────────────────────────────────────────────────────────────
 package      * version date       lib source                               
 abind          1.4-5   2016-07-21 [1] CRAN (R 3.6.0)                       
 assertthat     0.2.1   2019-03-21 [1] CRAN (R 3.6.0)                       
 backports      1.1.6   2020-04-05 [1] CRAN (R 3.6.3)                       
 broom          0.5.6   2020-04-20 [1] CRAN (R 3.6.3)                       
 callr          3.4.3   2020-03-28 [1] CRAN (R 3.6.2)                       
 car            3.0-7   2020-03-11 [1] CRAN (R 3.6.0)                       
 carData        3.0-3   2019-11-16 [1] CRAN (R 3.6.0)                       
 cellranger     1.1.0   2016-07-27 [1] CRAN (R 3.6.0)                       
 cli            2.0.2   2020-02-28 [1] CRAN (R 3.6.0)                       
 colorspace     1.4-1   2019-03-18 [1] CRAN (R 3.6.0)                       
 crayon         1.3.4   2017-09-16 [1] CRAN (R 3.6.0)                       
 curl           4.3     2019-12-02 [1] CRAN (R 3.6.0)                       
 data.table   * 1.12.8  2019-12-09 [1] CRAN (R 3.6.0)                       
 desc           1.2.0   2018-05-01 [1] CRAN (R 3.6.0)                       
 devtools     * 2.3.0   2020-04-10 [1] CRAN (R 3.6.3)                       
 digest         0.6.25  2020-02-23 [1] CRAN (R 3.6.0)                       
 dplyr          0.8.5   2020-03-07 [1] CRAN (R 3.6.0)                       
 ellipsis       0.3.0   2019-09-20 [1] CRAN (R 3.6.0)                       
 fansi          0.4.1   2020-01-08 [1] CRAN (R 3.6.0)                       
 farver         2.0.3   2020-01-16 [1] CRAN (R 3.6.0)                       
 forcats        0.5.0   2020-03-01 [1] CRAN (R 3.6.0)                       
 foreign        0.8-76  2020-03-03 [1] CRAN (R 3.6.0)                       
 fs             1.4.1   2020-04-04 [1] CRAN (R 3.6.3)                       
 generics       0.0.2   2018-11-29 [1] CRAN (R 3.6.0)                       
 ggplot2      * 3.3.0   2020-03-05 [1] CRAN (R 3.6.0)                       
 ggpubr       * 0.3.0   2020-05-04 [1] CRAN (R 3.6.3)                       
 ggsignif     * 0.6.0   2019-08-08 [1] CRAN (R 3.6.0)                       
 glue           1.4.0   2020-04-03 [1] CRAN (R 3.6.3)                       
 gtable         0.3.0   2019-03-25 [1] CRAN (R 3.6.0)                       
 haven          2.2.0   2019-11-08 [1] CRAN (R 3.6.0)                       
 hms            0.5.3   2020-01-08 [1] CRAN (R 3.6.0)                       
 labeling       0.3     2014-08-23 [1] CRAN (R 3.6.0)                       
 lattice        0.20-41 2020-04-02 [1] CRAN (R 3.6.3)                       
 lifecycle      0.2.0   2020-03-06 [1] CRAN (R 3.6.0)                       
 maftools     * 2.4.05  2020-05-10 [1] Github (PoisonAlien/maftools@6ddf526)
 magrittr       1.5     2014-11-22 [1] CRAN (R 3.6.0)                       
 Matrix         1.2-18  2019-11-27 [1] CRAN (R 3.6.3)                       
 memoise        1.1.0   2017-04-21 [1] CRAN (R 3.6.0)                       
 munsell        0.5.0   2018-06-12 [1] CRAN (R 3.6.0)                       
 nlme           3.1-147 2020-04-13 [1] CRAN (R 3.6.2)                       
 openxlsx       4.1.5   2020-05-06 [1] CRAN (R 3.6.2)                       
 pillar         1.4.4   2020-05-05 [1] CRAN (R 3.6.3)                       
 pkgbuild       1.0.8   2020-05-07 [1] CRAN (R 3.6.2)                       
 pkgconfig      2.0.3   2019-09-22 [1] CRAN (R 3.6.0)                       
 pkgload        1.0.2   2018-10-29 [1] CRAN (R 3.6.0)                       
 plyr           1.8.6   2020-03-03 [1] CRAN (R 3.6.0)                       
 prettyunits    1.1.1   2020-01-24 [1] CRAN (R 3.6.0)                       
 processx       3.4.2   2020-02-09 [1] CRAN (R 3.6.0)                       
 ps             1.3.3   2020-05-08 [1] CRAN (R 3.6.2)                       
 purrr          0.3.4   2020-04-17 [1] CRAN (R 3.6.2)                       
 R6             2.4.1   2019-11-12 [1] CRAN (R 3.6.0)                       
 RColorBrewer   1.1-2   2014-12-07 [1] CRAN (R 3.6.0)                       
 Rcpp           1.0.4.6 2020-04-09 [1] CRAN (R 3.6.3)                       
 readxl         1.3.1   2019-03-13 [1] CRAN (R 3.6.0)                       
 remotes      * 2.1.1   2020-02-15 [1] CRAN (R 3.6.0)                       
 reshape      * 0.8.8   2018-10-23 [1] CRAN (R 3.6.0)                       
 rio            0.5.16  2018-11-26 [1] CRAN (R 3.6.0)                       
 rlang          0.4.6   2020-05-02 [1] CRAN (R 3.6.2)                       
 rprojroot      1.3-2   2018-01-03 [1] CRAN (R 3.6.0)                       
 rstatix        0.5.0   2020-04-28 [1] CRAN (R 3.6.2)                       
 rstudioapi     0.11    2020-02-07 [1] CRAN (R 3.6.0)                       
 scales         1.1.0   2019-11-18 [1] CRAN (R 3.6.0)                       
 sessioninfo    1.1.1   2018-11-05 [1] CRAN (R 3.6.0)                       
 stringi        1.4.6   2020-02-17 [1] CRAN (R 3.6.0)                       
 survival       3.1-12  2020-04-10 [1] CRAN (R 3.6.3)                       
 testthat       2.3.2   2020-03-02 [1] CRAN (R 3.6.0)                       
 tibble         3.0.1   2020-04-20 [1] CRAN (R 3.6.3)                       
 tidyr          1.0.3   2020-05-07 [1] CRAN (R 3.6.2)                       
 tidyselect     1.0.0   2020-01-27 [1] CRAN (R 3.6.0)                       
 usethis      * 1.6.1   2020-04-29 [1] CRAN (R 3.6.2)                       
 vctrs          0.2.4   2020-03-10 [1] CRAN (R 3.6.0)                       
 withr          2.2.0   2020-04-20 [1] CRAN (R 3.6.2)                       
 zip            2.0.4   2019-09-01 [1] CRAN (R 3.6.0)                       

[1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library

Update: I tried installing llvm, but don't know what put here to finish installing llvm-openmp pc-133-235:build fi1d18

$ cmake ../llvm -DLLVM_ENABLE_PROJECTS=openmp -DCMAKE_C_COMPILER=<C compiler> -DCMAKE_CXX_COMPILER=<C++ compiler>
-bash: syntax error near unexpected token `newline' 
$\endgroup$
0
0
$\begingroup$

Answer from @atpoint, converted from comment:

There are dozens of threads in GitHub, SE and other support platforms that clearly explain what to do. (e.g. https://github.com/velocyto-team/velocyto.R/issues/2) The issue is that the compiler does not support openMP, so you have to install one that does.

Answer from @devon-ryan, converted from comment:

In conda on OSX we solve this by installing llvm-openmp, which provides the -fopenmp flag. Maybe the same is possible outside of conda (no clue). Don't compile it, find an easier way to install it.

$\endgroup$
1
$\begingroup$

try devtools::install_github('linxihui/NNLM'), if it doesn't work you need to install the gfortran binary on Mac.

If it still doesn't work, try to upgrade to 4.0.0.

When you have this kind of trouble, look at the issue page of the github page. You will almost always see that others have had the same issue.

$\endgroup$
3
  • $\begingroup$ Thank you installing gfortran did not help $\endgroup$
    – Exhausted
    May 11 '20 at 10:15
  • $\begingroup$ Did you try to update R to 4.0.0 ? $\endgroup$
    – dantarno
    May 11 '20 at 11:32
  • 1
    $\begingroup$ This has nothing to do with binaries or the R version, it is a common issue with the gcc compiler on Mac which does not support openMP, see my comment above. $\endgroup$
    – ATpoint
    May 11 '20 at 11:37

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.