openmonero
openmonero copied to clipboard
fatal error: src/MicroCore.h: No such file or directory
I have tried absolutely everything to make this build on Ubuntu 16.04 and I cannot get it to work.
I have tried:
- Building the master branch... got pretty far but failed.
- Checking out the
devel
branch and updatingcmake
to 3.14.2. - I made sure that the monero library was on branch
release-v0.13
.
This was the first effor on the master branch:
[ 62%] Building CXX object src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:33:0,
from /usr/include/c++/5/bits/allocator.h:46,
from /usr/include/c++/5/memory:63,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
from /usr/include/boost/shared_ptr.hpp:17,
from /home/moises/monero/contrib/epee/include/net/http_client.h:31,
from /home/moises/openmonero/src/xmregcore/src/monero_headers.h:22,
from /home/moises/openmonero/src/xmregcore/src/MicroCore.h:8,
from /home/moises/openmonero/src/CurrentBlockchainStatus.h:6,
from /home/moises/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/5/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >; _Args = {const std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, xmreg::ThreadRAII2<xmreg::TxSearch> >&}; _Tp = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >]’:
/usr/include/c++/5/bits/alloc_traits.h:530:4: required from ‘static void std::allocator_traits<std::allocator<_Tp1> >::construct(std::allocator_traits<std::allocator<_Tp1> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >; _Args = {const std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, xmreg::ThreadRAII2<xmreg::TxSearch> >&}; _Tp = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; std::allocator_traits<std::allocator<_Tp1> >::allocator_type = std::allocator<std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > > >]’
/usr/include/c++/5/bits/stl_tree.h:529:32: required from ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_construct_node(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type, _Args&& ...) [with _Args = {const std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, xmreg::ThreadRAII2<xmreg::TxSearch> >&}; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >*]’
/usr/include/c++/5/bits/stl_tree.h:546:21: required from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, xmreg::ThreadRAII2<xmreg::TxSearch> >&}; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >*]’
/usr/include/c++/5/bits/stl_tree.h:459:62: required from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Alloc_node::operator()(_Arg&&) const [with _Arg = const std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >&; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >*]’
/usr/include/c++/5/bits/stl_tree.h:1509:29: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, _Arg&&, _NodeGen&) [with _Arg = const std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >&; _NodeGen = std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > > >::_Alloc_node; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr = std::_Rb_tree_node_base*]’
/usr/include/c++/5/bits/stl_tree.h:1868:26: required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = const std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >&; _Key = std::__cxx11::basic_string<char>; _Val = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >]’
/usr/include/c++/5/bits/stl_map.h:613:41: required from ‘std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = xmreg::ThreadRAII2<xmreg::TxSearch>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> > >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const std::__cxx11::basic_string<char>, xmreg::ThreadRAII2<xmreg::TxSearch> >]’
/home/moises/openmonero/src/CurrentBlockchainStatus.cpp:804:71: required from here
/usr/include/c++/5/ext/new_allocator.h:120:4: error: use of deleted function ‘constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = xmreg::ThreadRAII2<xmreg::TxSearch>]’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
from /usr/include/c++/5/memory:62,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
from /usr/include/boost/shared_ptr.hpp:17,
from /home/moises/monero/contrib/epee/include/net/http_client.h:31,
from /home/moises/openmonero/src/xmregcore/src/monero_headers.h:22,
from /home/moises/openmonero/src/xmregcore/src/MicroCore.h:8,
from /home/moises/openmonero/src/CurrentBlockchainStatus.h:6,
from /home/moises/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/5/bits/stl_pair.h:127:17: note: ‘constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const std::__cxx11::basic_string<char>; _T2 = xmreg::ThreadRAII2<xmreg::TxSearch>]’ is implicitly deleted because the default definition would be ill-formed:
constexpr pair(const pair&) = default;
^
/usr/include/c++/5/bits/stl_pair.h:127:17: error: use of deleted function ‘xmreg::ThreadRAII2<xmreg::TxSearch>::ThreadRAII2(const xmreg::ThreadRAII2<xmreg::TxSearch>&)’
In file included from /home/moises/openmonero/src/CurrentBlockchainStatus.h:12:0,
from /home/moises/openmonero/src/CurrentBlockchainStatus.cpp:5:
/home/moises/openmonero/src/ThreadRAII.h:35:7: note: ‘xmreg::ThreadRAII2<xmreg::TxSearch>::ThreadRAII2(const xmreg::ThreadRAII2<xmreg::TxSearch>&)’ is implicitly deleted because the default definition would be ill-formed:
class ThreadRAII2 : public ThreadRAII
^
/home/moises/openmonero/src/ThreadRAII.h:35:7: error: use of deleted function ‘xmreg::ThreadRAII::ThreadRAII(const xmreg::ThreadRAII&)’
/home/moises/openmonero/src/ThreadRAII.h:15:7: note: ‘xmreg::ThreadRAII::ThreadRAII(const xmreg::ThreadRAII&)’ is implicitly declared as deleted because ‘xmreg::ThreadRAII’ declares a move constructor or move assignment operator
class ThreadRAII
^
/home/moises/openmonero/src/ThreadRAII.h:35:7: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = xmreg::TxSearch; _Dp = std::default_delete<xmreg::TxSearch>]’
class ThreadRAII2 : public ThreadRAII
^
In file included from /usr/include/c++/5/memory:81:0,
from /usr/include/boost/config/no_tr1/memory.hpp:21,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
from /usr/include/boost/shared_ptr.hpp:17,
from /home/moises/monero/contrib/epee/include/net/http_client.h:31,
from /home/moises/openmonero/src/xmregcore/src/monero_headers.h:22,
from /home/moises/openmonero/src/xmregcore/src/MicroCore.h:8,
from /home/moises/openmonero/src/CurrentBlockchainStatus.h:6,
from /home/moises/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/5/bits/unique_ptr.h:356:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^
src/CMakeFiles/myxrm.dir/build.make:75: recipe for target 'src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o' failed
make[2]: *** [src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o] Error 1
CMakeFiles/Makefile2:241: recipe for target 'src/CMakeFiles/myxrm.dir/all' failed
make[1]: *** [src/CMakeFiles/myxrm.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
After quite a bit of effort, the devel
branch gives even worse results...
$ make
Scanning dependencies of target myxmr
[ 3%] Building CXX object src/CMakeFiles/myxmr.dir/CurrentBlockchainStatus.cpp.o
In file included from /home/moises/openmonero/src/CurrentBlockchainStatus.cpp:5:0:
/home/moises/openmonero/src/CurrentBlockchainStatus.h:6:27: fatal error: src/MicroCore.h: No such file or directory
compilation terminated.
src/CMakeFiles/myxmr.dir/build.make:75: recipe for target 'src/CMakeFiles/myxmr.dir/CurrentBlockchainStatus.cpp.o' failed
make[2]: *** [src/CMakeFiles/myxmr.dir/CurrentBlockchainStatus.cpp.o] Error 1
CMakeFiles/Makefile2:276: recipe for target 'src/CMakeFiles/myxmr.dir/all' failed
make[1]: *** [src/CMakeFiles/myxmr.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
It will not build on 16.04 with its default compilers gcc and clang. They are too old as OpenMonero is C++14. You can try installing ubuntu-toolchain
with newer compiles as shown here, for example: https://github.com/moneroexamples/openmonero/issues/89#issuecomment-410409361
Thank you very much for your quick response. Much appreciated.
Which branch of openmonero is the correct one to use?
On master branch I made it to 93% of make
. Now I am getting:
Scanning dependencies of target openmonero
[ 93%] Building CXX object CMakeFiles/openmonero.dir/main.cpp.o
make[2]: *** No rule to make target 'Xmr_CRYPTONOTE_CORE_LIBRARY-NOTFOUND', needed by 'openmonero'. Stop.
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/openmonero.dir/all' failed
make[1]: *** [CMakeFiles/openmonero.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
On devel
branch:
[ 31%] Building CXX object src/CMakeFiles/myxmr.dir/CurrentBlockchainStatus.cpp.o
In file included from /home/moises/openmonero/src/CurrentBlockchainStatus.cpp:5:
/home/moises/openmonero/src/CurrentBlockchainStatus.h:6:10: fatal error: src/MicroCore.h: No such file or directory
#include "src/MicroCore.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
src/CMakeFiles/myxmr.dir/build.make:75: recipe for target 'src/CMakeFiles/myxmr.dir/CurrentBlockchainStatus.cpp.o' failed
make[2]: *** [src/CMakeFiles/myxmr.dir/CurrentBlockchainStatus.cpp.o] Error 1
CMakeFiles/Makefile2:276: recipe for target 'src/CMakeFiles/myxmr.dir/all' failed
make[1]: *** [src/CMakeFiles/myxmr.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
What to do? Thank you in advance.
Did you build monero using USE_SINGLE_BUILDDIR=1 make
as shown for example here: https://github.com/moneroexamples/monero-compilation/blob/master/README.md
The branches can be confusing, as monero changed branch names for its 0.14.0.2 release. So monero branch 0.14.0.2 is actually called release-v0.13
(i know confusing name). For that branch of monero, master
branch of OpenMonero should work.
For development version of monero (i.e. master
branch of monero repo), openmonero's devel
branch should be used.
I really appreciate this help. Unfortunately, I tried to make monero again at the release-v0.13
branch and I can't seem to build it, even though I was able to do it before. It may be cause of manually installing cmake
or some of the other things I tried to upgrade.
I have already tried setting the BOOST_ROOT and BOOST_INCLUDEDIR to the /usr/lib/x86_64-linux-gnu
, which is where the liboost files are, but no luck...
I think this is what I'm missing to successfully install OpenMonero.
Make Error at /usr/local/share/cmake-3.14/Modules/FindBoost.cmake:2132 (message):
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
CMakeLists.txt:873 (find_package)
CMake Error at CMakeLists.txt:59 (message):
Could not find Boost libraries, please make sure you have installed
Boost or libboost-all-dev (1.58) or the equivalent
Call Stack (most recent call first):
CMakeLists.txt:877 (die)
-- Configuring incomplete, errors occurred!
See also "/home/moises/monero/build/release/CMakeFiles/CMakeOutput.log".
See also "/home/moises/monero/build/release/CMakeFiles/CMakeError.log".
Makefile:90: recipe for target 'release-all' failed
make: *** [release-all] Error 1
Actually I got beyond this, realized some dependencies were missing. I now have another error... will consult at the monero repo.
Here is where I am now, when trying to build monero itself. I am sure that you are busy, but just in case, if you have seen this issue before:
CMakeFiles/wallet_rpc_server.dir/wallet_rpc_server.cpp.o: In function `__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > boost::re_detail::re_is_set_member<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)':
wallet_rpc_server.cpp:(.text._ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x1db): undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
wallet_rpc_server.cpp:(.text._ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x5b3): undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
collect2: error: ld returned 1 exit status
src/wallet/CMakeFiles/wallet_rpc_server.dir/build.make:127: recipe for target 'bin/monero-wallet-rpc' failed
make[2]: *** [bin/monero-wallet-rpc] Error 1
CMakeFiles/Makefile2:2252: recipe for target 'src/wallet/CMakeFiles/wallet_rpc_server.dir/all' failed
make[1]: *** [src/wallet/CMakeFiles/wallet_rpc_server.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
You missing boost:regex and/or linker can't find it. I will spin up 16.04 and see if I can reproduce the issue.
it works for me on 16.04. I followed these instructions: https://github.com/moneroexamples/monero-compilation/blob/master/README.md#example-compilation-on-ubuntu-1804 Although they are written for 18.04, the same applies to 16.04.
No need to use custom boost. The one provided by ubuntu is sufficient to compile monero release-v0.13
.