Skip to content
This repository was archived by the owner on Apr 11, 2020. It is now read-only.
This repository was archived by the owner on Apr 11, 2020. It is now read-only.

problem with compilation #1

@cryptomaxsun

Description

@cryptomaxsun

Hello!
I'm doing a daemon compilation for the pool, an error, how do I fix it?

[ 43%] Building CXX object src/CMakeFiles/P2P.dir/P2p/P2pContextOwner.cpp.o
Linking CXX static library libP2P.a
make[3]: Leaving directory `/home/max/Newton/build/release'
[ 43%] Built target P2P
make[3]: Entering directory `/home/max/Newton/build/release'
Scanning dependencies of target Rpc
make[3]: Leaving directory `/home/max/Newton/build/release'
make[3]: Entering directory `/home/max/Newton/build/release'
[ 43%] Building CXX object src/CMakeFiles/Rpc.dir/Rpc/RpcServer.cpp.o
In file included from /home/max/Newton/src/Rpc/RpcServer.cpp:18:0:
/home/max/Newton/src/Rpc/RpcServer.h:41:15: error: ‘__cxx11’ is not a member of ‘std’
   std::vector<std::__cxx11::string> getCorsDomains();
               ^
/home/max/Newton/src/Rpc/RpcServer.h:41:15: error: ‘__cxx11’ is not a member of ‘std’
/home/max/Newton/src/Rpc/RpcServer.h:41:35: error: template argument 1 is invalid
   std::vector<std::__cxx11::string> getCorsDomains();
                                   ^
/home/max/Newton/src/Rpc/RpcServer.h:41:35: error: template argument 2 is invalid
/home/max/Newton/src/Rpc/RpcServer.cpp: In lambda function:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53: error: no matching function for call to ‘begin(int&)’
  for (const auto& cors_domain : obj->getCorsDomains()) {
                 from /home/max/Newton/src/Rpc/RpcServer.h:18,
                 from /home/max/Newton/src/Rpc/RpcServer.cpp:18:
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
     begin(const _Container& __cont) -> decltype(__cont.begin())
     ^
/usr/include/c++/4.8/bits/range_access.h:58:5: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = int]’:/home/max/Newton/src/Rpc/RpcServer.cpp:100:53:   required from here
/usr/include/c++/4.8/bits/range_access.h:58:5: error: request for member ‘begin’ in ‘__cont’, which is of non-class type ‘const int’
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
     begin(_Container& __cont) -> decltype(__cont.begin())     ^
/usr/include/c++/4.8/bits/range_access.h:48:5: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = int]’: 
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53:   required from here
/usr/include/c++/4.8/bits/range_access.h:48:5: error: request for member ‘begin’ in ‘__cont’, which is of non-class type ‘int’
In file included from /usr/include/c++/4.8/utility:74:0,
                 from /usr/include/c++/4.8/unordered_set:38,
                 from /home/max/Newton/src/Rpc/HttpServer.h:20,
                 from /home/max/Newton/src/Rpc/RpcServer.h:18,
                 from /home/max/Newton/src/Rpc/RpcServer.cpp:18:
/usr/include/c++/4.8/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
     begin(initializer_list<_Tp> __ils) noexcept
     ^
/usr/include/c++/4.8/initializer_list:89:5: note:   template argument deduction/substitution failed:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
  for (const auto& cors_domain : obj->getCorsDomains()) {
                                                     ^
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53: error: no matching function for call to ‘end(int&)’
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53: note: candidates are:
In file included from /usr/include/c++/4.8/string:51:0,
                 from /usr/include/c++/4.8/stdexcept:39,
                 from /usr/include/c++/4.8/array:38,
                 from /usr/include/c++/4.8/tuple:39,
                 from /usr/include/c++/4.8/unordered_set:41,
                 from /home/max/Newton/src/Rpc/HttpServer.h:20,
                 from /home/max/Newton/src/Rpc/RpcServer.h:18,
                 from /home/max/Newton/src/Rpc/RpcServer.cpp:18:
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^
/usr/include/c++/4.8/bits/range_access.h:97:5: note:   template argument deduction/substitution failed:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53: note:   mismatched types ‘_Tp [_Nm]’ and ‘int’
  for (const auto& cors_domain : obj->getCorsDomains()) {
                                                     ^
In file included from /usr/include/c++/4.8/string:51:0,
                 from /usr/include/c++/4.8/stdexcept:39,
                 from /usr/include/c++/4.8/array:38,
                 from /usr/include/c++/4.8/tuple:39,
                 from /usr/include/c++/4.8/unordered_set:41,
                 from /home/max/Newton/src/Rpc/HttpServer.h:20,
                 from /home/max/Newton/src/Rpc/RpcServer.h:18,
                 from /home/max/Newton/src/Rpc/RpcServer.cpp:18:
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^
/usr/include/c++/4.8/bits/range_access.h:78:5: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = int]’:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53:   required from here
/usr/include/c++/4.8/bits/range_access.h:78:5: error: request for member ‘end’ in ‘__cont’, which is of non-class type ‘const int’
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^
/usr/include/c++/4.8/bits/range_access.h:68:5: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = int]’:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53:   required from here
/usr/include/c++/4.8/bits/range_access.h:68:5: error: request for member ‘end’ in ‘__cont’, which is of non-class type ‘int’
In file included from /usr/include/c++/4.8/utility:74:0,
                 from /usr/include/c++/4.8/unordered_set:38,
                 from /home/max/Newton/src/Rpc/HttpServer.h:20,
                 from /home/max/Newton/src/Rpc/RpcServer.h:18,
                 from /home/max/Newton/src/Rpc/RpcServer.cpp:18:
/usr/include/c++/4.8/initializer_list:99:5: note: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^
/usr/include/c++/4.8/initializer_list:99:5: note:   template argument deduction/s/home/max/Newton/src/Rpc/RpcServer.cpp:100:53: note:   mismatched types ‘_Tp [_Nm]’ and ‘int’
  for (const auto& cors_domain : obj->getCorsDomains()) {                                                     ^
In file included from /usr/include/c++/4.8/string:51:0,
                 from /usr/include/c++/4.8/stdexcept:39,
                 from /usr/include/c++/4.8/array:38,
                 from /usr/include/c++/4.8/tuple:39,                 from /usr/include/c++/4.8/unordered_set:41,                 from /home/max/Newton/src/Rpc/HttpServer.h:20,
                 from /home/max/Newton/src/Rpc/RpcServer.h:18,
                 from /home/max/Newton/src/Rpc/RpcServer.cpp:18:
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())     ^
/usr/include/c++/4.8/bits/range_access.h:78:5: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = int]’:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53:   required from here
/usr/include/c++/4.8/bits/range_access.h:78:5: error: request for member ‘end’ in ‘__cont’, which is of non-class type ‘const int’
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^
/usr/include/c++/4.8/bits/range_access.h:68:5: note:   template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of ‘template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = int]’:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53:   required from here/usr/include/c++/4.8/bits/range_access.h:68:5: error: request for member ‘end’ in ‘__cont’, which is of non-class type ‘int’
In file included from /usr/include/c++/4.8/utility:74:0,
                 from /usr/include/c++/4.8/unordered_set:38,
                 from /home/max/Newton/src/Rpc/HttpServer.h:20,
                 from /home/max/Newton/src/Rpc/RpcServer.h:18,
                 from /home/max/Newton/src/Rpc/RpcServer.cpp:18:
/usr/include/c++/4.8/initializer_list:99:5: note: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^
/usr/include/c++/4.8/initializer_list:99:5: note:   template argument deduction/substitution failed:
/home/max/Newton/src/Rpc/RpcServer.cpp:100:53: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘int’
  for (const auto& cors_domain : obj->getCorsDomains()) {
                                                     ^
/home/max/Newton/src/Rpc/RpcServer.cpp: At global scope:
/home/max/Newton/src/Rpc/RpcServer.cpp:227:26: error: prototype for ‘std::vector<std::basic_string<char> > CryptoNote::RpcServer::getCorsDomains()’ does not match any in class ‘CryptoNote::RpcServer’
 std::vector<std::string> RpcServer::getCorsDomains() {
                          ^
In file included from /home/max/Newton/src/Rpc/RpcServer.cpp:18:0:
/home/max/Newton/src/Rpc/RpcServer.h:41:37: error: candidate is: int CryptoNote::RpcServer::getCorsDomains()
   std::vector<std::__cxx11::string> getCorsDomains();
                                     ^
make[3]: *** [src/CMakeFiles/Rpc.dir/Rpc/RpcServer.cpp.o] Error 1
make[3]: Leaving directory `/home/max/Newton/build/release'
make[2]: *** [src/CMakeFiles/Rpc.dir/all] Error 2
make[2]: Leaving directory `/home/max/Newton/build/release'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/max/Newton/build/release'
make: *** [build-release] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions