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

ERROR: compilation failed for package ‘gridtext’ #7

Closed
matteodefelice opened this issue Feb 17, 2020 · 16 comments
Closed

ERROR: compilation failed for package ‘gridtext’ #7

matteodefelice opened this issue Feb 17, 2020 · 16 comments

Comments

@matteodefelice
Copy link

matteodefelice commented Feb 17, 2020

I am trying to install ggtext on a CentOS machine (R 3.6.0) but I couldn't install gridtext.

When I try to install with remotes::install_github("wilkelab/gridtext") I get an error in the compilation phase.

Click to expand ✓ checking for file ‘/tmp/RtmpfCSOHi/remotes6f2074dcec01/wilkelab-gridtext-5cc4b40/DESCRIPTION’ (509ms) ─ preparing ‘gridtext’: ✓ checking DESCRIPTION meta-information ─ cleaning src ─ checking for LF line-endings in source and make files and shell scripts ─ checking for empty or unneeded directories ─ building ‘gridtext_0.1.0.9000.tar.gz’ Warning: invalid uid value replaced by that for user 'nobody' Warning: invalid gid value replaced by that for user 'nobody'

Installing package into ‘/home/felicma/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)

  • installing source package ‘gridtext’ ...
    ** using staged installation
    ** libs
    g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -I"/home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include" -I"/home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/testthat/include" -I/usr/local/include -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 RcppExports.cpp -o RcppExports.o
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h: In member function ‘void GridRenderer::raster(Rcpp::RObject, Length, Length, Length, Length, bool, const GraphicsContext&)’:
    grid-renderer.h:61:94: error: no matching function for call to ‘Rcpp::Vector<10, Rcpp::PreserveStorage>::Vector(int, bool&, const GraphicsContext&)’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    grid-renderer.h:61:94: note: candidates are:
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:242:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(std::initializer_list<typename Rcpp::traits::init_type::type>) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage; typename Rcpp::traits::init_type::type = bool]
    Vector( std::initializer_list<init_type> list ) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:242:5: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:234:5: note: template<class InputIterator, class Func, class T> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(InputIterator, InputIterator, Func, T, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*)
    Vector( InputIterator first, InputIterator last, Func func, T n,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:234:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: deduced conflicting types for parameter ‘InputIterator’ (‘int’ and ‘bool’)
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:227:5: note: template<class InputIterator, class Func> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(InputIterator, InputIterator, Func)
    Vector( InputIterator first, InputIterator last, Func func) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:227:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: deduced conflicting types for parameter ‘InputIterator’ (‘int’ and ‘bool’)
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:219:5: note: template<class InputIterator, class T> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(InputIterator, InputIterator, T, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*)
    Vector( InputIterator first, InputIterator last, T n,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:219:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: deduced conflicting types for parameter ‘InputIterator’ (‘int’ and ‘bool’)
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:212:5: note: template Rcpp::Vector<RTYPE, StoragePolicy>::Vector(InputIterator, InputIterator)
    Vector( InputIterator first, InputIterator last){
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:212:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: deduced conflicting types for parameter ‘InputIterator’ (‘int’ and ‘bool’)
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:203:5: note: template<class T, class U1, class U2, class U3> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const T&, Rcpp::Vector<RTYPE, StoragePolicy>::stored_type ()(U1, U2, U3), const U1&, const U2&, const U3&, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type)
    Vector( const T& siz, stored_type (gen)(U1,U2,U3), const U1& u1, const U2& u2, const U3& u3,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:203:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘Rcpp::Vector<10, Rcpp::PreserveStorage>::stored_type (
    )(U1, U2, U3)’ and ‘bool’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:194:5: note: template<class T, class U1, class U2> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const T&, Rcpp::Vector<RTYPE, StoragePolicy>::stored_type ()(U1, U2), const U1&, const U2&, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type)
    Vector( const T& siz, stored_type (gen)(U1,U2), const U1& u1, const U2& u2,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:194:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘Rcpp::Vector<10, Rcpp::PreserveStorage>::stored_type (
    )(U1, U2)’ and ‘bool’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:185:5: note: template<class T, class U1> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const T&, Rcpp::Vector<RTYPE, StoragePolicy>::stored_type ()(U1), const U1&, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type)
    Vector( const T& siz, stored_type (gen)(U1), const U1& u1,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:185:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘Rcpp::Vector<10, Rcpp::PreserveStorage>::stored_type (
    )(U1)’ and ‘bool’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:178:5: note: template<bool NA, class T> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::sugar::SingleLogicalResult<NA, T>&)
    Vector( const sugar::SingleLogicalResult<NA,T>& obj ) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:178:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘const Rcpp::sugar::SingleLogicalResult<NA, T>’ and ‘int’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:170:5: note: template<class T, class U> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const T&, const U&, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*)
    Vector( const T& size, const U& u,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:170:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*’ and ‘Rcpp::Vector<19>’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:164:5: note: template<bool NA, class VEC> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::VectorBase<RTYPE, NA_, T>&)
    Vector( const VectorBase<RTYPE,NA,VEC>& other ) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:164:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘const Rcpp::VectorBase<10, LHS_NA, LHS_T>’ and ‘int’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:154:5: note: template Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::Dimension&, const U&)
    Vector( const Dimension& dims, const U& u) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:154:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: candidate expects 2 arguments, 3 provided
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:147:5: note: template Rcpp::Vector<RTYPE, StoragePolicy>::Vector(T, typename Rcpp::traits::enable_if<(Rcpp::traits::is_bool::value && (RTYPE == 10)), void>::type*)
    Vector(T value,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:147:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘typename Rcpp::traits::enable_if<(Rcpp::traits::is_bool::value && (10 == 10)), void>::type*’ and ‘bool’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:135:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::Dimension&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage]
    Vector( const Dimension& dims) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:135:5: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:130:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const int&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage]
    Vector( const int& size ) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:130:5: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:124:5: note: template Rcpp::Vector<RTYPE, StoragePolicy>::Vector(T, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*)
    Vector(T size,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:124:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*’ and ‘bool’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:115:5: note: template Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const T&, Rcpp::Vector<RTYPE, StoragePolicy>::stored_type ()(), typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type)
    Vector( const T& siz, stored_type (gen)(void),
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:115:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: cannot convert ‘interpolate’ (type ‘bool’) to type ‘Rcpp::Vector<10, Rcpp::PreserveStorage>::stored_type (
    )() {aka int ()()}’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:109:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const char
    ) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage]
    Vector( const char* st ) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:109:5: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:103:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const string&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage; std::string = std::basic_string]
    Vector( const std::string& st ){
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:103:5: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:96:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const int&, const stored_type&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage; Rcpp::Vector<RTYPE, StoragePolicy>::stored_type = int]
    Vector( const int& size, const stored_type& u) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:96:5: note: candidate expects 2 arguments, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:89:5: note: template Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const T&, const stored_type&, typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*)
    Vector( const T& size, const stored_type& u,
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:89:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic::value, void>::type*’ and ‘Rcpp::Vector<19>’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:84:14: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::no_init_vector&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage]
    explicit Vector( const no_init_vector& obj) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:84:14: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:79:5: note: template Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::GenericProxy&)
    Vector( const GenericProxy& proxy ){
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:79:5: note: template argument deduction/substitution failed:
    In file included from gridtext_types.h:12:0,
    from RcppExports.cpp:4:
    grid-renderer.h:61:94: note: mismatched types ‘const Rcpp::GenericProxy’ and ‘int’
    NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp)
    ^
    In file included from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/Vector.h:52:0,
    from /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp.h:40,
    from layout.h:4,
    from gridtext_types.h:11,
    from RcppExports.cpp:4:
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:73:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(SEXP) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage; SEXP = SEXPREC*]
    Vector( SEXP x ) {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:73:5: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:65:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::Vector<RTYPE, StoragePolicy>&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage]
    Vector( const Vector& other){
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:65:5: note: candidate expects 1 argument, 3 provided
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:57:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector() [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage]
    Vector() {
    ^
    /home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/vector/Vector.h:57:5: note: candidate expects 0 arguments, 3 provided
    make: *** [RcppExports.o] Error 1
    ERROR: compilation failed for package ‘gridtext’
  • removing ‘/home/felicma/R/x86_64-redhat-linux-gnu-library/3.6/gridtext’
    Error: Failed to install 'gridtext' from GitHub:
    (converted from warning) installation of package ‘/tmp/RtmpfCSOHi/file6f203c74132d/gridtext_0.1.0.9000.tar.gz’ had non-zero exit status

EDIT: the same happens with the version on CRAN

@clauswilke
Copy link
Collaborator

No idea what the problem is. Can you compile other packages that use Rcpp? Does your C++ compiler support C++11?

The package compiles fine on all supported platforms, so there must be something on your end that isn't set up correctly:
https://cran.r-project.org/web/checks/check_results_gridtext.html

@matteodefelice
Copy link
Author

I will check about the C++11 support asap, in general I can install the packages using Rcpp.

@mhaynam
Copy link

mhaynam commented Apr 17, 2020

I'm getting the same issue when trying to install gridtext from either CRAN or github. How do I check to see if my C++ compiler supports C++11? Also, @matteodefelice were you able to get it installed?

@clauswilke
Copy link
Collaborator

From the error messages it doesn't look to me like it's a C++11 error. The problem seems to be that the compiler can't figure out which Rcpp functions I'm calling when creating vectors etc. I just don't understand why it compiles on all supported platforms but fails on CentOS. Could you let me know your versions of g++ and Rcpp? Maybe that helps. I'm still on R 3.6.0 myself, so that shouldn't be the problem.

@mhaynam
Copy link

mhaynam commented Apr 17, 2020

I'm also on R 3.6.0. Rcpp is 1.0.2. Not sure how to tell what version g++ is.. I do see this in the error code: g++ -m64 -std=gnu++11. My platform is x86_64-redhat-linux-gnu, and running under CentOS Linux 7.

I'm loving the package by the way. The development version installed just fine on my local windows platform, but I would love to get it on our RS connect server as well, which is what is running under centos linux.

@clauswilke
Copy link
Collaborator

Can you update to the latest version of Rcpp and see if that helps?

@mhaynam
Copy link

mhaynam commented Apr 17, 2020

Updated to Rcpp 1.0.4.6 but still getting the same error.

Specific line of output where I'm seeing the error:
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘gridtext’

@Zepeng-Mu
Copy link

Zepeng-Mu commented Jun 8, 2020

I had the same error using both R/3.6.0 and R/4.0.0. I had no problem with a Mac.
Curiously, I changed to gcc/6.1, instead of /bin/gcc, and successfully installed the package.

@mhaynam
Copy link

mhaynam commented Jun 19, 2020

Sweet! Can I ask how you changed to gcc/6.1? I don't really understand that side of things.

@Zepeng-Mu
Copy link

I am using the computing cluster, so all I need to do is running module load gcc, and the default version is 6.1. I am not sure how to do that if you are using your personal computer. Probably you need to install it.

@clauswilke
Copy link
Collaborator

CentOS 7 was released in 2014. It likely ships with a compiler that is too old. You need C++ 11 support, and that wasn't widely available in 2014. You can either update to a more recent linux distribution or update your compiler. How that can be done will depend on your specific circumstances. If you're using a system maintained by somebody else, talk to them about updating the compiler.

I'm going to close this issue because there's nothing I can do about compilers that are missing C++ 11 support.

@thistleknot
Copy link

thistleknot commented Jan 9, 2021

I specifically installed gcc 10.2 to work around this issue and I'm still having the same problem.
"ERROR: compilation failed for package ‘gridtext’"

[root@pxe ansible]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/mnt/distvol/opt/gcc/10.2.0/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --with-system-zlib --disable-multilib --enable-languages=c,c++ --prefix=/mnt/distvol/opt/gcc/10.2.0
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.0 (GCC)

Even installed the development version of rcpp

CentOS 7

errors
/mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:88:5: note: template argument deduction/substitution failed: In file included from gridtext_types.h:12:0, from RcppExports.cpp:4: grid-renderer.h:61:94: note: mismatched types ‘typename Rcpp::traits::enable_if<Rcpp::traits::is_arithmetic<T>::value, void>::type*’ and ‘Rcpp::Vector<19>’ NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp) ^ In file included from /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/Vector.h:52:0, from /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp.h:40, from layout.h:4, from gridtext_types.h:11, from RcppExports.cpp:4: /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:83:14: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::no_init_vector&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage] explicit Vector( const no_init_vector& obj) { ^ /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:83:14: note: candidate expects 1 argument, 3 provided /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:78:5: note: template<class Proxy> Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::GenericProxy<Proxy>&) Vector( const GenericProxy<Proxy>& proxy ){ ^ /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:78:5: note: template argument deduction/substitution failed: In file included from gridtext_types.h:12:0, from RcppExports.cpp:4: grid-renderer.h:61:94: note: mismatched types ‘const Rcpp::GenericProxy<Proxy>’ and ‘int’ NumericVector(1, width), NumericVector(1, height), LogicalVector(1, interpolate, gp) ^ In file included from /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/Vector.h:52:0, from /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp.h:40, from layout.h:4, from gridtext_types.h:11, from RcppExports.cpp:4: /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:72:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(SEXP) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage; SEXP = SEXPREC*] Vector( SEXP x ) { ^ /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:72:5: note: candidate expects 1 argument, 3 provided /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:64:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector(const Rcpp::Vector<RTYPE, StoragePolicy>&) [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage] Vector( const Vector& other){ ^ /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:64:5: note: candidate expects 1 argument, 3 provided /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:56:5: note: Rcpp::Vector<RTYPE, StoragePolicy>::Vector() [with int RTYPE = 10; StoragePolicy = Rcpp::PreserveStorage] Vector() { ^ /mnt/distvol/opt/R/4.0.3/lib64/R/library/Rcpp/include/Rcpp/vector/Vector.h:56:5: note: candidate expects 0 arguments, 3 provided make: *** [RcppExports.o] Error 1 ERROR: compilation failed for package ‘gridtext’

@thistleknot
Copy link

thistleknot commented Jan 9, 2021

I was able to get it to compile finally

Apparently the issue is a statically linked library/function in libstdc++.so.6

I compiled gcc 10.2

wget https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz

tar xvf gcc-10.2.0.tar.gz
cd gcc-10.2.0
mkdir -p /mnt/distvol/opt/gcc/10.2.0
./configure --with-system-zlib --disable-multilib --enable-languages=c,c++ --prefix=/mnt/distvol/opt/gcc/10.2.0
make -j 2
make install
ln -s /mnt/distvol/opt/gcc/10.2.0/bin/* /usr/bin/ -f
mv /usr/bin/lib64/libstdc++.so.6 /usr/bin/lib64/libstdc++.so.6.bak
ln -s /mnt/distvol/opt/gcc/10.2.0/lib64/libstdc++.so.6 /usr/bin/lib64/libstdc++.so.6

References
GLIBCXX_3.4.21 not found on CentOS 7
#https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/
#https://stackoverflow.com/questions/44205687/glibcxx-3-4-21-not-found-on-centos-7

yum install centos-release-scl
yum install devtoolset-9

https://github.com/cdr/code-server/issues/347

#https://unix.stackexchange.com/questions/401856/libstdc-so-6glibcxx-3-4-2064bit-is-needed-by-skypeforlinux-8-9-0-1-1-x86-6
#https://stackoverflow.com/questions/53592796/libstdc-so-6-version-glibcxx-3-4-20-not-found
#https://stackoverflow.com/questions/19386651/how-to-fix-usr-lib-libstdc-so-6-version-glibcxx-3-4-15-not-found
strings $(find /mnt/distvol/opt/gcc/10.2.0/ -name "libstdc++.so.6") | grep GLIBCXX_3.4.

#https://github.com/cdr/code-server/issues/347

@yjzhang2013
Copy link

I have met the same error in CentOS7.3:
图片

I updated gcc by :
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
and keep using updataed gcc by:
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile

Finally, "gridtext" was installed successfully.

@ixxmu
Copy link

ixxmu commented Apr 25, 2021

Can not sovle my problems after reinstall my system from Zero!!!!

Here is my solution!

Make .R files in you Rstudio home;
such as

mkdir /home/rstudio/.R
vi /home/rstudio/.R/Makevars

and add the following content in the Makevars

CXX11=/opt/rh/devtoolset-9/root/usr/bin/g++ -std=c++11

save your Makevars and restart your system or R and Rstudio.

Reinstall "gridtext" again, you will make it!

@tylerlittlefield
Copy link

Just wanted to add my experience. This comment solved my problem: https://stackoverflow.com/a/66811910/7362046

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

8 participants