Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation: "Snpcounts.c:82:3: error: ‘for’ loop initial declarations are only allowed in C99 mode" #1079

Open
kurchejs opened this issue Dec 29, 2024 · 0 comments

Comments

@kurchejs
Copy link

Describe the issue
Hi there, I am attempting to install maftools onto a server-based R studio library, however there seems to be an issue with the gcc options invoked during compilation and the install had non-zero exit status. I attempted to download packages using BiocManager, base install(), and installation from the github repository without success. Any additional ideas are greatly appreciated!

Command
Please post your commands and the output (errors or any unexpected output)

> BiocManager::install("maftools", lib=library)
'getOption("repos")' replaces Bioconductor standard repositories, see
'help("repositories", package = "BiocManager")' for details.
Replacement repositories:
    CRAN: https://cran.rstudio.com/
Bioconductor version 3.18 (BiocManager 1.30.25), R 4.3.3 (2024-02-29)
Installing package(s) 'maftools'
trying URL 'https://bioconductor.org/packages/3.18/bioc/src/contrib/maftools_2.18.0.tar.gz'
Content type 'application/gzip' length 11453947 bytes (10.9 MB)
==================================================
downloaded 10.9 MB

* installing *source* packagemaftools...
** using staged installation
** libs
using C compiler: ‘gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)’
gcc -I"/cluster/software/modules-sw/R/4.3.3/lib64/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/cluster/software/modules-sw/R/4.3.3/lib64/R/library/Rhtslib/include' -I'/cluster/software/modules-sw/R/4.3.3/lib64/R/library/zlibbioc/include' -I/usr/local/include    -fpic  -g -O2  -c ntcounts.c -o ntcounts.o
gcc -I"/cluster/software/modules-sw/R/4.3.3/lib64/R/include" -DNDEBUG -D_FILE_OFFSET_BITS=64 -I'/cluster/software/modules-sw/R/4.3.3/lib64/R/library/Rhtslib/include' -I'/cluster/software/modules-sw/R/4.3.3/lib64/R/library/zlibbioc/include' -I/usr/local/include    -fpic  -g -O2  -c snpcounts.c -o snpcounts.o
snpcounts.c: In functionsnpcounts:
snpcounts.c:82:3: error:forloop initial declarations are only allowed in C99 mode
   for(int i = 0; i < n_contigs; i++){
   ^
snpcounts.c:82:3: note: use option -std=c99 or -std=gnu99 to compile your code
make: *** [snpcounts.o] Error 1
ERROR: compilation failed for packagemaftools* removing/beevol/home/kurchejo/R/x86_64-pc-linux-gnu-library/4.3/maftoolsThe downloaded source packages are in/tmp/RtmpzhaAUq/downloaded_packagesWarning message:
In install.packages(...) :
  installation of packagemaftoolshad non-zero exit status

Session info
Run sessionInfo() and post the output below

R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /cluster/software/modules-sw/R/4.3.3/lib64/R/lib/libRblas.so 
LAPACK: /cluster/software/modules-sw/R/4.3.3/lib64/R/lib/libRlapack.so;  LAPACK version 3.11.0

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       

time zone: America/Denver
tzcode source: system (glibc)

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

other attached packages:
[1] dplyr_1.1.4

loaded via a namespace (and not attached):
 [1] desc_1.4.3          utf8_1.2.4          R6_2.5.1           
 [4] tidyselect_1.2.1    magrittr_2.0.3      remotes_2.5.0      
 [7] glue_1.8.0          tibble_3.2.1        pkgconfig_2.0.3    
[10] generics_0.1.3      lifecycle_1.0.4     ps_1.7.6           
[13] cli_3.6.3           processx_3.8.4      fansi_1.0.6        
[16] callr_3.7.6         vctrs_0.6.5         compiler_4.3.3     
[19] rstudioapi_0.16.0   tools_4.3.3         pkgbuild_1.4.4     
[22] curl_5.2.1          pillar_1.9.0        BiocManager_1.30.25
[25] rlang_1.1.4  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant