Skip to content

Installation error #2

@dipterix

Description

@dipterix

Hi @mllg , I encounter an installation error on RedHat R 4.0.4

It seems the compiler is complaining about initial declarations in the for loop. Is it possible that R 4.0 uses newer standards , or my gcc version is too low?

Error message (install from source)

* installing *source* package ‘base64url’ ...
** package ‘base64url’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/opt2/software/R/4.0.4/lib64/R/include" -DNDEBUG   -I/opt2/software/gcc/7.2.0/include   -fpic  -g -O2  -c base32.c -o base32.o
base32.c: In function ‘b32e’:
base32.c:257:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (R_xlen_t i = 0; i < n; i++) {
     ^
base32.c:257:5: note: use option -std=c99 or -std=gnu99 to compile your code
base32.c: In function ‘b32d’:
base32.c:293:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (R_xlen_t i = 0; i < n; i++) {
     ^
make: *** [base32.o] Error 1
ERROR: compilation failed for package ‘base64url’

Session info

R version 4.0.4 (2021-02-15)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux

Matrix products: default
BLAS:   /usr/lib64/libblas.so.3.4.2
LAPACK: /opt2/software/R/4.0.4/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               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    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] compiler_4.0.4 tools_4.0.4    packrat_0.5.0 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions