Can't install edgeR because of compilation error: make: *** [R_add_prior_count.o] Error 1
Entering edit mode
creasyt • 0
Last seen 6.0 years ago
United States


I can't seem to install edgeR due to an odd compilation error (see below). The error appears to be something about "make: *** [R_add_prior_count.o] Error 1:

Has anyone encountered this error? Any ideas what might be missing (lib dependency)?




> biocLite("edgeR")
Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.1 (2017-06-30).
Installing package(s) ‘edgeR’
trying URL ''
Content type 'application/x-gzip' length 1551888 bytes (1.5 MB)
downloaded 1.5 MB

* installing *source* package ‘edgeR’ ...
** libs
g++ -m64 -std=gnu++0x -I/usr/include/R -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include   -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c R_add_prior_count.cpp -o R_add_prior_count.o
R_add_prior_count.cpp: In function ‘SEXPREC* add_prior_count(SEXPREC*, SEXPREC*, SEXPREC*)’:
R_add_prior_count.cpp:53: error: expected initializer before ‘:’ token
R_add_prior_count.cpp:58: error: expected primary-expression before ‘if’
R_add_prior_count.cpp:58: error: expected ‘;’ before ‘if’
R_add_prior_count.cpp:58: error: expected primary-expression before ‘if’
R_add_prior_count.cpp:58: error: expected ‘)’ before ‘if’
R_add_prior_count.cpp:50: warning: unused variable ‘pptr’
utils.h: At global scope:
utils.h:64: warning: ‘LNtwo’ defined but not used
make: *** [R_add_prior_count.o] Error 1
ERROR: compilation failed for package ‘edgeR’
* removing ‘/usr/lib64/R/library/edgeR’


> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.9 (Santiago)

Matrix products: default
BLAS: /usr/lib64/R/lib/
LAPACK: /usr/lib64/R/lib/

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C

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

other attached packages:
 [1] DESeq2_1.18.1              SummarizedExperiment_1.8.0
 [3] DelayedArray_0.4.1         matrixStats_0.52.2
 [5] Biobase_2.38.0             GenomicRanges_1.30.0
 [7] GenomeInfoDb_1.14.0        IRanges_2.12.0
 [9] S4Vectors_0.16.0           BiocGenerics_0.24.0
[11] BiocInstaller_1.28.0

loaded via a namespace (and not attached):
 [1] genefilter_1.60.0       locfit_1.5-9.1          splines_3.4.1
 [4] lattice_0.20-35         colorspace_1.3-2        htmltools_0.3.6
 [7] base64enc_0.1-3         blob_1.1.0              survival_2.41-3
[10] XML_3.98-1.9            rlang_0.1.4             DBI_0.7
[13] foreign_0.8-69          BiocParallel_1.12.0     bit64_0.9-7
[16] RColorBrewer_1.1-2      GenomeInfoDbData_0.99.1 plyr_1.8.4
[19] stringr_1.2.0           zlibbioc_1.24.0         munsell_0.4.3
[22] gtable_0.2.0            htmlwidgets_0.9         memoise_1.1.0
[25] latticeExtra_0.6-28     knitr_1.17              geneplotter_1.56.0
[28] AnnotationDbi_1.40.0    htmlTable_1.9           Rcpp_0.12.14
[31] acepack_1.4.1           xtable_1.8-2            scales_0.5.0
[34] backports_1.1.1         checkmate_1.8.5         Hmisc_4.0-3
[37] annotate_1.56.1         XVector_0.18.0          bit_1.1-12
[40] gridExtra_2.3           ggplot2_2.2.1           digest_0.6.12
[43] stringi_1.1.6           grid_3.4.1              tools_3.4.1
[46] bitops_1.0-6            magrittr_1.5            RSQLite_2.0
[49] lazyeval_0.2.1          RCurl_1.95-4.8          tibble_1.3.4
[52] Formula_1.2-2           cluster_2.0.6           Matrix_1.2-12
[55] data.table_1.10.4-3     rpart_4.1-11            nnet_7.3-12
[58] compiler_3.4.1
edger compilation error • 2.8k views
Entering edit mode
Aaron Lun ★ 28k
Last seen 4 hours ago
The city by the bay

It seems that your compiler does not have full support for the C++11 standard. This results in a failure to compile edgeR at the line in R_add_prior_count.cpp where we've used the new auto keyword. 

It seems prudent to upgrade your compiler, given that many R packages now (and probably more in the future) are taking advantage of the extra capabilities of the new standard. Admittedly, upgrading GCC usually involves yelling at your computer, your IT team, or both; but it's been 6 years, so I think we've waited long enough.

Also see some of Dirk's comments on this topic:

Entering edit mode
Last seen 49 minutes ago
WEHI, Melbourne, Australia

Depending on your background, it might help if I summarize Aaron's answer in simplified terms:

  1. Yes, we know this error.
  2. The error is because your Unix system is running a very old version of gcc and the current version of edgeR requires a a more recent version of gcc.
  3. If you upgrade gcc on your system (any version from the past few years will be fine, but why not the latest?), then edgeR will install fine.

Login before adding your answer.

Traffic: 431 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6