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

problem with compilation #1

Open
cryptomaxsun opened this issue Apr 8, 2018 · 9 comments
Open

problem with compilation #1

cryptomaxsun opened this issue Apr 8, 2018 · 9 comments

Comments

@cryptomaxsun
Copy link

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
@livenet123
Copy link
Owner

fixed now

@livenet123 livenet123 reopened this Apr 9, 2018
@cryptomaxsun
Copy link
Author

anyway an error

er options.
 #error This file requires compiler and library support for the \
  ^
In file included from /usr/include/c++/4.8/unordered_map:35:0,
                 from ./include/rocksdb/options.h:18,
ntly experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^In file included from /usr/include/c++/4.8/unordered_map:35:0,                 from ./db/filename.h:14,                 from ./db/auto_roll_logger.h:13,
                 from db/auto_roll_logger.cc:6:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^make[4]: *** No rule to make target `make_config.mk'.  Stop.make[4]: Leaving directory `/home/max/Newton/external/rocksdb'make[3]: *** [external/CMakeFiles/rocksdb] Error 2
make[3]: Leaving directory `/home/max/Newton/build/release'
make[2]: *** [external/CMakeFiles/rocksdb.dir/all] Error 2

@livenet123
Copy link
Owner

livenet123 commented Apr 9, 2018

type this before make
export CXXFLAGS="-std=gnu++11"

@cryptomaxsun
Copy link
Author

did. still an error.

Scanning dependencies of target ConnectivityTool
make[3]: Leaving directory `/home/max/Newton/build/release'
make[3]: Entering directory `/home/max/Newton/build/release'
[ 45%] Building CXX object src/CMakeFiles/ConnectivityTool.dir/ConnectivityTool/ConnectivityTool.cpp.oLinking CXX executable connectivity_tool
make[3]: Leaving directory `/home/max/Newton/build/release'
[ 45%] Built target ConnectivityTool
make[3]: Entering directory `/home/max/Newton/build/release'
Scanning dependencies of target rocksdb
make[3]: Leaving directory `/home/max/Newton/build/release'
make[3]: Entering directory `/home/max/Newton/build/release'
/bin/sh: 1: /home/max/Newton/external/rocksdb/build_tools/build_detect_platform: Permission denied
make[4]: Entering directory `/home/max/Newton/external/rocksdb'
Makefile:142: make_config.mk: No such file or directory
grep: /home/max/Newton/external/rocksdb/make_config.mk: No such file or directory
  GEN      util/build_version.cc
make[4]: *** No rule to make target `make_config.mk'.  Stop.
make[4]: Leaving directory `/home/max/Newton/external/rocksdb'
make[3]: *** [external/CMakeFiles/rocksdb] Error 2
make[3]: Leaving directory `/home/max/Newton/build/release'
make[2]: *** [external/CMakeFiles/rocksdb.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

@livenet123
Copy link
Owner

try this

export CXXFLAGS="-std=gnu++11"
cd Newton
chmod +x external/rocksdb/build_tools/build_detect_platform
chmod +x external/rocksdb/build_tools/version.sh
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DSTATIC=true .. && make

@cryptomaxsun
Copy link
Author

Thank you! Compilation is successful.

@cryptomaxsun
Copy link
Author

[ 78%] Building CXX object tests/CMakeFiles/CoreTests.dir/CoreTests/ChaingenMain.cpp.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
tests/CMakeFiles/CoreTests.dir/build.make:254: recipe for target 'tests/CMakeFiles/CoreTests.dir/CoreTests/ChaingenMain.cpp.o' failed
make[2]: *** [tests/CMakeFiles/CoreTests.dir/CoreTests/ChaingenMain.cpp.o] Error 4
CMakeFiles/Makefile2:1401: recipe for target 'tests/CMakeFiles/CoreTests.dir/all' failed
make[1]: *** [tests/CMakeFiles/CoreTests.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Binary daemon no start:
illegal instruction

@livenet123
Copy link
Owner

it seems you are out of memory while building you need to increase the vps ram. the source built successfully on gcc 5. the binary show illegal instruction because the vps cpu is old you can use the binary available here http://newtoncoin.cf

@cryptomaxsun
Copy link
Author

Thanks, the daemon started.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants