Compilation problem installing IRanges
1
0
Entering edit mode
tuto345 • 0
@tuto345-7751
Last seen 2.7 years ago
France

Hi all,

I have R 3.1.3 on a Centos 5 distribution. I can not install IRanges which fails with the following error message:

IntervalTree.c: In function ‘_IntegerIntervalTree_overlapHelper’:
IntervalTree.c:247: erreur: ‘for’ loop initial declarations are only allowed in C99 mode
IntervalTree.c:247: note: use option -std=c99 or -std=gnu99 to compile your code
IntervalTree.c: In function ‘IntegerIntervalForest_dump’:
IntervalTree.c:983: erreur: ‘for’ loop initial declarations are only allowed in C99 mode

 

Any idea of how I can install/compile IRanges succesfully?

Thanks!

Cristian

Iranges install • 1.4k views
ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 4 days ago
Seattle, WA, United States

Hi Cristian,

3 things:

1) The current Bioconductor release is BioC 3.1 and it requires R 3.2. Make sure you use these versions. You can check the former by loading the BiocInstaller package:

> library(BiocInstaller)
Bioconductor version 3.1 (BiocInstaller 1.18.1), ?biocLite for help

and the latter by calling sessionInfo():

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Ubuntu 14.04.2 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] BiocInstaller_1.18.1

2) How are you trying to install the IRanges package? You need to show us the command you used. The highly recommended way is to use biocLite():

biocLite("IRanges")

Same thing if you were trying to install a package that depends on IRanges: just call biocLite() on it and that will take care of installing any other package that it depends on.

3) The C code in R packages is expected to conform to the C99 standard and so is the C code in the IRanges package. On Linux platforms, R is usually configured to use the gcc compiler and the -std=gnu99 flag when compiling the C code found in packages. What compiler are you using? You're not showing enough output for us to be able to tell. A simple way to find out is with:

hpages@latitude:~$ R CMD config CC
gcc -std=gnu99

If you have more than one R on your system, make sure you use the same R here as the one you started when you tried to install IRanges with biocLite().

Thanks,

H.

ADD COMMENT

Login before adding your answer.

Traffic: 491 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6