Skip to content

Rcpp uses Rf_list6(), which was added around R 3.4 #1048

@DavisVaughan

Description

@DavisVaughan

Rcpp 1.0.4 no longer builds from source on R 3.3 because of a call to Rf_list6() that was added here:

d65f3c0#diff-c524021f4c8787893aa50c251e4c35d7R35

That is because list6() was added to R in this commit here, around R 3.4

wch/r-source@7199ea1#diff-b2ce19943acaccf93558f770778c4730

Compilation on R 3.3 gives:

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/opt/R/3.2.5/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c api.cpp -o api.o
In file included from ../inst/include/RcppCommon.h:135:0,
                 from ../inst/include/Rcpp.h:27,
                 from api.cpp:24:
../inst/include/Rcpp/lang.h: In function ‘SEXPREC* Rcpp::Rcpp_list7(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
../inst/include/Rcpp/lang.h:45:55: error: ‘Rf_list6’ was not declared in this scope
     x0 = Rf_cons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6));
                                                       ^
../inst/include/Rcpp/lang.h: In function ‘SEXPREC* Rcpp::Rcpp_lang7(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
../inst/include/Rcpp/lang.h:53:56: error: ‘Rf_list6’ was not declared in this scope
     x0 = Rf_lcons(x0, Rcpp_list6(x1, x2, x3, x4, x5, x6));
                                                        ^
make: *** [api.o] Error 1
/opt/R/3.2.5/lib/R/etc/Makeconf:143: recipe for target 'api.o' failed
ERROR: compilation failed for package ‘Rcpp’

Rcpp could manually add list6() like purrr does
https://github.com/tidyverse/purrr/blob/aa7bc7f6d9854a1f2d5869536af652322a4bf38b/src/utils.c#L29-L34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions