Skip to content

Installation error on centos #310

@dchiu911

Description

@dchiu911

I'm having trouble building from source on centos, getting the following error:

end of install log
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘const string {aka const class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:11:0,
                 from ./clock.h:15,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/function.hpp: In function ‘void cpp11::message(const string&)’:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/function.hpp:109:66: error: invalid use of incomplete type ‘const string {aka const class std::basic_string<char>}’
 inline void message(const std::string& fmt_arg) { message(fmt_arg.c_str()); }
                                                                  ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘const string {aka const class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:11:0,
                 from ./clock.h:15,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/function.hpp: In function ‘void cpp11::message(const string&, Args ...)’:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/function.hpp:113:18: error: invalid use of incomplete type ‘const string {aka const class std::basic_string<char>}’
   message(fmt_arg.c_str(), args...);
                  ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘const string {aka const class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:12:0,
                 from ./clock.h:15,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/integers.hpp: In function ‘cpp11::integers cpp11::as_integers(cpp11::sexp)’:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/integers.hpp:161:69: error: no matching function for call to ‘std::runtime_error::runtime_error(const char [34])’
         throw std::runtime_error("All elements must be integer-like");
                                                                     ^
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/integers.hpp:161:69: note: candidates are:
In file included from /usr/include/c++/4.8.2/array:38:0,
                 from /usr/include/c++/4.8.2/tuple:39,
                 from /usr/include/c++/4.8.2/functional:55,
                 from /usr/include/c++/4.8.2/bits/stl_algo.h:66,
                 from /usr/include/c++/4.8.2/algorithm:62,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/tzdb/include/date/date.h:44,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/tzdb/include/tzdb/date.h:5,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/tzdb/include/tzdb/tzdb.h:4,
                 from ./clock.h:5,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/stdexcept:119:5: note: std::runtime_error::runtime_error(const string&)
     runtime_error(const string& __arg);
     ^
/usr/include/c++/4.8.2/stdexcept:119:5: note:   no known conversion for argument 1 from ‘const char [34]’ to ‘const string& {aka const std::basic_string<char>&}’
/usr/include/c++/4.8.2/stdexcept:112:9: note: constexpr std::runtime_error::runtime_error(const std::runtime_error&)
   class runtime_error : public exception
         ^
/usr/include/c++/4.8.2/stdexcept:112:9: note:   no known conversion for argument 1 from ‘const char [34]’ to ‘const std::runtime_error&’
In file included from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:14:0,
                 from ./clock.h:15,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/list_of.hpp: In member function ‘T cpp11::list_of<T>::operator[](const string&)’:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/list_of.hpp:23:69: error: invalid use of incomplete type ‘const string {aka const class std::basic_string<char>}’
   T operator[](const std::string& pos) { return list::operator[](pos.c_str()); }
                                                                     ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘const string {aka const class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:14:0,
                 from ./clock.h:15,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/list_of.hpp: In member function ‘cpp11::writable::list_of<T>::proxy cpp11::writable::list_of<T>::operator[](const string&)’:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/list_of.hpp:66:42: error: invalid use of incomplete type ‘const string {aka const class std::basic_string<char>}’
     return writable::list::operator[](pos.c_str());
                                          ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘const string {aka const class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:24:0,
                 from ./clock.h:15,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/strings.hpp: In function ‘bool cpp11::writable::operator==(const cpp11::writable::r_vector<cpp11::r_string>::proxy&, cpp11::r_string)’:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/strings.hpp:69:76: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
   return static_cast<r_string>(lhs).operator==(static_cast<std::string>(rhs).c_str());
                                                                            ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11.hpp:24:0,
                 from ./clock.h:15,
                 from ./locale.h:4,
                 from /usr/include/c++/4.8.2/clocale:42,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/strings.hpp:69:76: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
   return static_cast<r_string>(lhs).operator==(static_cast<std::string>(rhs).c_str());
                                                                            ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h: In function ‘std::pair<const std::basic_string<char>*, const std::basic_string<char>*> fill_weekday_names(const strings&, const strings&, std::string (&)[14])’:
./locale.h:18:20: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
     weekday_names[i] = std::string{CHAR(string)};
                    ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:18:48: error: too many initializers for ‘std::string {aka std::basic_string<char>}’
     weekday_names[i] = std::string{CHAR(string)};
                                                ^
./locale.h:18:48: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:22:24: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
     weekday_names[i + 7] = std::string{CHAR(string)};
                        ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:22:52: error: too many initializers for ‘std::string {aka std::basic_string<char>}’
     weekday_names[i + 7] = std::string{CHAR(string)};
                                                    ^
./locale.h:22:52: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:24:74: error: invalid application of ‘sizeof’ to incomplete type ‘std::string [14] {aka std::basic_string<char> [14]}’
   return std::make_pair(weekday_names, weekday_names+sizeof(weekday_names)/sizeof(weekday_names[0]));
                                                                          ^
./locale.h:24:98: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
   return std::make_pair(weekday_names, weekday_names+sizeof(weekday_names)/sizeof(weekday_names[0]));
                                                                                                  ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h: In function ‘std::pair<const std::basic_string<char>*, const std::basic_string<char>*> fill_month_names(const strings&, const strings&, std::string (&)[24])’:
./locale.h:35:18: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
     month_names[i] = std::string{CHAR(string)};
                  ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:35:46: error: too many initializers for ‘std::string {aka std::basic_string<char>}’
     month_names[i] = std::string{CHAR(string)};
                                              ^
./locale.h:35:46: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:39:23: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
     month_names[i + 12] = std::string{CHAR(string)};
                       ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:39:51: error: too many initializers for ‘std::string {aka std::basic_string<char>}’
     month_names[i + 12] = std::string{CHAR(string)};
                                                   ^
./locale.h:39:51: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:41:68: error: invalid application of ‘sizeof’ to incomplete type ‘std::string [24] {aka std::basic_string<char> [24]}’
   return std::make_pair(month_names, month_names+sizeof(month_names)/sizeof(month_names[0]));
                                                                    ^
./locale.h:41:90: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
   return std::make_pair(month_names, month_names+sizeof(month_names)/sizeof(month_names[0]));
                                                                                          ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h: In function ‘std::pair<const std::basic_string<char>*, const std::basic_string<char>*> fill_ampm_names(const strings&, std::string (&)[2])’:
./locale.h:50:17: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
     ampm_names[i] = std::string{CHAR(string)};
                 ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:50:45: error: too many initializers for ‘std::string {aka std::basic_string<char>}’
     ampm_names[i] = std::string{CHAR(string)};
                                             ^
./locale.h:50:45: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/clocale:42:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
./locale.h:52:65: error: invalid application of ‘sizeof’ to incomplete type ‘std::string [2] {aka std::basic_string<char> [2]}’
   return std::make_pair(ampm_names, ampm_names+sizeof(ampm_names)/sizeof(ampm_names[0]));
                                                                 ^
./locale.h:52:86: error: invalid use of incomplete type ‘std::string {aka class std::basic_string<char>}’
   return std::make_pair(ampm_names, ampm_names+sizeof(ampm_names)/sizeof(ampm_names[0]));
                                                                                      ^
In file included from /usr/include/c++/4.8.2/string:39:0,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/bits/stringfwd.h:57:11: error: declaration of ‘std::string {aka class std::basic_string<char>}’
     class basic_string;
           ^
In file included from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:41:0,
                 from /usr/include/c++/4.8.2/bits/localefwd.h:40,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/clocale: At global scope:
/usr/include/c++/4.8.2/clocale:53:11: error: ‘::lconv’ has not been declared
   using ::lconv;
           ^
/usr/include/c++/4.8.2/clocale:54:11: error: ‘::setlocale’ has not been declared
   using ::setlocale;
           ^
/usr/include/c++/4.8.2/clocale:55:11: error: ‘::localeconv’ has not been declared
   using ::localeconv;
           ^
In file included from /usr/include/c++/4.8.2/bits/localefwd.h:40:0,
                 from /usr/include/c++/4.8.2/string:43,
                 from /home/dchiu/R/x86_64-pc-linux-gnu-library/4.2/cpp11/include/cpp11/declarations.hpp:4,
                 from cpp11.cpp:5:
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:52:23: error: ‘uselocale’ was not declared in this scope
   extern "C" __typeof(uselocale) __uselocale;
                       ^
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:52:45: error: invalid type in declaration before ‘;’ token
   extern "C" __typeof(uselocale) __uselocale;
                                             ^
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)’:
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:75:53: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
     __c_locale __old = __gnu_cxx::__uselocale(__cloc);
                                                     ^
/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++locale.h:100:33: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
     __gnu_cxx::__uselocale(__old);

Could I please get some assistance on how to fix this? I think separate from #234 and I've been playing around with .R/Makevars to no avail:

CXX=/usr/bin/g++ -std=gnu++11
CXX11=/usr/bin/g++ -std=gnu++11

g++ version:

g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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