tidyverse / purrr

A functional programming toolkit for R

Home Page:https://purrr.tidyverse.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compilation error on Amazon Linux 2 using gcc 7.3.1

tyner opened this issue · comments

I am using R version 3.4.3 on Amazon Linux 2 (platform x86_64-koji-linux-gnu). Any idea what could be the issue?

* installing *source* package ‘purrr’ ...
** package ‘purrr’ successfully unpacked and MD5 sums checked
** libs
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c backports.c -o backports.o
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c cleancall.c -o cleancall.o
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c coerce.c -o coerce.o
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c conditions.c -o conditions.o
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c flatten.c -o flatten.o
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c init.c -o init.o
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c map.c -o map.o
map.c: In function ‘map_impl’:
map.c:86:11: warning: implicit declaration of function ‘INTEGER_ELT’; did you mean ‘INTEGER’? [-Wimplicit-function-declaration]
   int n = INTEGER_ELT(ffi_n, 0);
           ^~~~~~~~~~~
           INTEGER
gcc -m64 -I/usr/include/R -DNDEBUG  -I"/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/cli/include" -I/usr/local/include  -fvisibility=hidden -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c pluck.c -o pluck.o
pluck.c: In function ‘extract_vector’:
pluck.c:130:41: warning: implicit declaration of function ‘COMPLEX_ELT’; did you mean ‘COMPLEX’? [-Wimplicit-function-declaration]
   case CPLXSXP: return Rf_ScalarComplex(COMPLEX_ELT(x, offset));
                                         ^~~~~~~~~~~
                                         COMPLEX
pluck.c:130:41: error: incompatible type for argument 1 of ‘Rf_ScalarComplex’
In file included from pluck.c:3:0:
/usr/include/R/Rinternals.h:1411:7: note: expected ‘Rcomplex {aka struct <anonymous>}’ but argument is of type ‘int’
 SEXP  Rf_ScalarComplex(Rcomplex);
       ^~~~~~~~~~~~~~~~
make: *** [pluck.o] Error 1
ERROR: compilation failed for package ‘purrr’
* removing ‘/home/hadoop/R/x86_64-koji-linux-gnu-library/3.4/purrr’
Error in install.packages("purrr") : 
  (converted from warning) installation of package ‘purrr’ had non-zero exit status

R 3.5.0 is required for INTEGER_ELT

R (>= 3.5.0)

See also
https://github.com/r-lib/vctrs/blob/e88a3e28822fa5bf925048e6bd0b10315f7bd9af/src/vctrs-core.h#L99

But i dont think we should add that here

Oh but the version bump isn't on CRAN yet and didn't get a NEWS bullet
#1046

We should probably add a news bullet for that

I'll do a release now too.