Skip to content

gcc 4.8.5 compatibility #69

Closed
Closed
@VincentGardeux

Description

@VincentGardeux

Hi,

I'm trying to install another package (tidyr) on CentOS7 which is apparently trying to use cpp11 library.
It throws multiple errors:

g++ -std=gnu++11 -I"/software/R-3.6.2/include" -DNDEBUG  -I"/data/software/R-3.6.2/library/cpp11/include" -I/usr/include -I/software/CLAPACK-3.2.1/INCLUDE -I/software/gsl-2.6/include -I/software/proj-6.0.0/include/proj -I/software/hdf5-1.10.4/include/  -fpic  -g -O2  -c cpp11.cpp -o cpp11.o
In file included from /data/software/R-3.6.2/library/cpp11/include/cpp11/as.hpp:8:0,
                 from /data/software/R-3.6.2/library/cpp11/include/cpp11.hpp:5,
                 from /data/software/R-3.6.2/library/cpp11/include/cpp11/declarations.hpp:8,
                 from cpp11.cpp:4:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In lambda function:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: parameter packs not expanded with ‘...’:
       return unwind_protect([&] { return ptr_(a...); });
                                               ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: note:         ‘a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:48: error: expansion pattern ‘a’ contains no argument packs
       return unwind_protect([&] { return ptr_(a...); });
                                                ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In lambda function:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:199:38: error: parameter packs not expanded with ‘...’:
   unwind_protect([&] { Rf_error(fmt, args...); });
                                      ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:199:38: note:         ‘args’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:199:42: error: expansion pattern ‘args’ contains no argument packs
   unwind_protect([&] { Rf_error(fmt, args...); });
                                          ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In lambda function:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:206:46: error: parameter packs not expanded with ‘...’:
   unwind_protect([&] { Rf_error(fmt.c_str(), args...); });
                                              ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:206:46: note:         ‘args’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:206:50: error: expansion pattern ‘args’ contains no argument packs
   unwind_protect([&] { Rf_error(fmt.c_str(), args...); });
                                                  ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {}; F = void(); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = void]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {}; F = void(); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = void]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:195:65:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
       return unwind_protect([&] { return ptr_(a...); });
                                               ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {}; F = void(); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = void]’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:195:65:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55: error: return-statement with a value, in function returning 'void' [-fpermissive]
       return unwind_protect([&] { return ptr_(a...); });
                                                       ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {const char*, cetype_t}; F = SEXPREC*(const char*, cetype_t); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {const char*, cetype_t}; F = SEXPREC*(const char*, cetype_t); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/r_string.hpp:16:69:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
       return unwind_protect([&] { return ptr_(a...); });
                                               ^
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {int, long unsigned int}; F = SEXPREC*(unsigned int, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {int, long unsigned int}; F = SEXPREC*(unsigned int, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/list.hpp:75:67:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {int, long int}; F = SEXPREC*(unsigned int, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {int, long int}; F = SEXPREC*(unsigned int, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/list.hpp:107:74:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, long int}; F = SEXPREC*(SEXPREC*, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, long int}; F = SEXPREC*(SEXPREC*, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/list.hpp:108:73:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {const char*}; F = SEXPREC*(const char*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {const char*}; F = SEXPREC*(const char*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/function.hpp:59:50:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, SEXPREC*}; F = SEXPREC*(SEXPREC*, SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, SEXPREC*}; F = SEXPREC*(SEXPREC*, SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/function.hpp:59:58:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, cpp11::sexp}; F = SEXPREC*(SEXPREC*, SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, cpp11::sexp}; F = SEXPREC*(SEXPREC*, SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/function.hpp:69:66:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, SEXPREC*, Rboolean}; F = SEXPREC*(SEXPREC*, SEXPREC*, Rboolean); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*, SEXPREC*, Rboolean}; F = SEXPREC*(SEXPREC*, SEXPREC*, Rboolean); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/environment.hpp:36:81:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {cpp11::sexp, SEXPREC*, Rboolean}; F = SEXPREC*(SEXPREC*, SEXPREC*, Rboolean); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {cpp11::sexp, SEXPREC*, Rboolean}; F = SEXPREC*(SEXPREC*, SEXPREC*, Rboolean); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/environment.hpp:47:58:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {int, int}; F = SEXPREC*(unsigned int, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {int, int}; F = SEXPREC*(unsigned int, long int); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/strings.hpp:71:70:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*}; F = SEXPREC*(SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {SEXPREC*}; F = SEXPREC*(SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/strings.hpp:73:45:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::protect::function<F>::operator()(A ...) const [with A = {cpp11::sexp, SEXPREC*}; F = SEXPREC*(SEXPREC*, SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]::__lambda2’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:55:   required from ‘decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) cpp11::protect::function<F>::operator()(A ...) const [with A = {cpp11::sexp, SEXPREC*}; F = SEXPREC*(SEXPREC*, SEXPREC*); decltype (declval<F*>()(cpp11::protect::function::operator()::a ...)) = SEXPREC*]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/function.hpp:27:43:   required from ‘cpp11::sexp cpp11::function::operator()(Args&& ...) const [with Args = {SEXPREC*&, cpp11::named_arg&}]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/environment.hpp:60:35:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:183:47: error: using invalid field ‘cpp11::protect::function<F>::operator()(A ...) const::__lambda2::__a’
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp: In instantiation of ‘struct cpp11::stop(const char*, Args ...) [with Args = {}]::__lambda3’:
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:199:49:   required from ‘void cpp11::stop(const char*, Args ...) [with Args = {}]’
/data/software/R-3.6.2/library/cpp11/include/cpp11/as.hpp:98:39:   required from ‘cpp11::is_logical<T> cpp11::as_cpp(SEXP) [with T = bool; cpp11::is_logical<T> = bool; SEXP = SEXPREC*]’
cpp11.cpp:24:452:   required from here
/data/software/R-3.6.2/library/cpp11/include/cpp11/protect.hpp:199:38: error: using invalid field ‘cpp11::stop(const char*, Args ...)::__lambda3::__args’
   unwind_protect([&] { Rf_error(fmt, args...); });
                                      ^
make: *** [cpp11.o] Error 1
ERROR: compilation failed for package ‘tidyr’

Apparently the compilation errors are coming from several hpp files.
If you have any idea of a simple flag to add to make it work? Or if I need to recompile the cpp11 library with specific flags.

Thanks in advance

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