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

Failed at building - Use of deleted functions #106

Closed
serhack opened this issue Nov 3, 2018 · 8 comments
Closed

Failed at building - Use of deleted functions #106

serhack opened this issue Nov 3, 2018 · 8 comments

Comments

@serhack
Copy link

serhack commented Nov 3, 2018

Hi moneroexamples,
Thanks for your hard work on openmonero.

I have tried to install the latest version (branch master) and latest version for Monero (0.13.0.4).
It fails at building Openmonero

/root/openmonero/src/CurrentBlockchainStatus.cpp:698:71: required from here
/usr/include/c++/6/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; _T2 = xmreg::ThreadRAII2xmreg::TxSearch]’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /root/openmonero/src/MicroCore.h:8,
from /root/openmonero/src/CurrentBlockchainStatus.h:6,
from /root/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/6/bits/stl_pair.h:288:17: note: ‘constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const std::__cxx11::basic_string; _T2 = xmreg::ThreadRAII2xmreg::TxSearch]’ is implicitly deleted because the default definition would be ill-formed:
constexpr pair(const pair&) = default;
^~~~
/usr/include/c++/6/bits/stl_pair.h:288:17: error: use of deleted function ‘xmreg::ThreadRAII2xmreg::TxSearch::ThreadRAII2(const xmreg::ThreadRAII2xmreg::TxSearch&)’
In file included from /root/openmonero/src/CurrentBlockchainStatus.h:12:0,
from /root/openmonero/src/CurrentBlockchainStatus.cpp:5:
/root/openmonero/src/ThreadRAII.h:35:7: note: ‘xmreg::ThreadRAII2xmreg::TxSearch::ThreadRAII2(const xmreg::ThreadRAII2xmreg::TxSearch&)’ is implicitly deleted because the default definition would be ill-formed:
class ThreadRAII2 : public ThreadRAII
^~~~~~~~~~~
/root/openmonero/src/ThreadRAII.h:35:7: error: use of deleted function ‘xmreg::ThreadRAII::ThreadRAII(const xmreg::ThreadRAII&)’
/root/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
^~~~~~~~~~
/root/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_deletexmreg::TxSearch]’
class ThreadRAII2 : public ThreadRAII
^~~~~~~~~~~
In file included from /usr/include/c++/6/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 /root/monero/contrib/epee/include/net/http_client.h:31,
from /root/openmonero/src/monero_headers.h:22,
from /root/openmonero/src/MicroCore.h:11,
from /root/openmonero/src/CurrentBlockchainStatus.h:6,
from /root/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/6/bits/unique_ptr.h:359:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^~~~~~~~~~
src/CMakeFiles/myxrm.dir/build.make:134: recipe for target 'src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o' failed
make[2]: *** [src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o] Error 1
CMakeFiles/Makefile2:124: recipe for target 'src/CMakeFiles/myxrm.dir/all' failed

@moneroexamples
Copy link
Owner

check this branch:

https://github.com/moneroexamples/openmonero/tree/mymonero_v9

This is current development one. master isn't been up to date with monero 0.13.

@serhack
Copy link
Author

serhack commented Nov 4, 2018

Same issue :- (

[ 52%] Building CXX object src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/6/bits/c++allocator.h:33:0,
from /usr/include/c++/6/bits/allocator.h:46,
from /usr/include/c++/6/string:41,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /root/openmonero/src/MicroCore.h:8,
from /root/openmonero/src/CurrentBlockchainStatus.h:6,
from /root/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/6/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, xmreg::ThreadRAII2xmreg::TxSearch >; _Args = {const std::pair<const std::__cxx11::basic_string<char, std::char_traits, std::allocator >, xmreg::ThreadRAII2xmreg::TxSearch >&}; _Tp = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >]’:
/usr/include/c++/6/bits/alloc_traits.h:475:4: required from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >; _Args = {const std::pair<const std::__cxx11::basic_string<char, std::char_traits, std::allocator >, xmreg::ThreadRAII2xmreg::TxSearch >&}; _Tp = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > > >]’
/usr/include/c++/6/bits/stl_tree.h:543: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, std::allocator >, xmreg::ThreadRAII2xmreg::TxSearch >&}; _Key = std::__cxx11::basic_string; _Val = std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; _Compare = std::less<std::__cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >]’
/usr/include/c++/6/bits/stl_tree.h:560:4: 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, std::allocator >, xmreg::ThreadRAII2xmreg::TxSearch >&}; _Key = std::__cxx11::basic_string; _Val = std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; _Compare = std::less<std::__cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >]’
/usr/include/c++/6/bits/stl_tree.h:473: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, xmreg::ThreadRAII2xmreg::TxSearch >&; _Key = std::__cxx11::basic_string; _Val = std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; _Compare = std::less<std::__cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >]’
/usr/include/c++/6/bits/stl_tree.h:1535: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, xmreg::ThreadRAII2xmreg::TxSearch >&; _NodeGen = std::_Rb_tree<std::__cxx11::basic_string, std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >, std::_Select1st<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >, std::less<std::__cxx11::basic_string >, std::allocator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > > >::_Alloc_node; _Key = std::__cxx11::basic_string; _Val = std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; _Compare = std::less<std::__cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr = std::_Rb_tree_node_base
]’
/usr/include/c++/6/bits/stl_tree.h:1894:11: 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, xmreg::ThreadRAII2xmreg::TxSearch >&; _Key = std::__cxx11::basic_string; _Val = std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >; _KeyOfValue = std::_Select1st<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >; _Compare = std::less<std::__cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch > >]’
/usr/include/c++/6/bits/stl_map.h:732: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; _Tp = xmreg::ThreadRAII2xmreg::TxSearch; _Compare = std::less<std::__cxx11::basic_string >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::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, xmreg::ThreadRAII2xmreg::TxSearch > >; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const std::__cxx11::basic_string, xmreg::ThreadRAII2xmreg::TxSearch >]’
/root/openmonero/src/CurrentBlockchainStatus.cpp:705:71: required from here
/usr/include/c++/6/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; _T2 = xmreg::ThreadRAII2xmreg::TxSearch]’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:64:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /root/openmonero/src/MicroCore.h:8,
from /root/openmonero/src/CurrentBlockchainStatus.h:6,
from /root/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/6/bits/stl_pair.h:288:17: note: ‘constexpr std::pair<_T1, _T2>::pair(const std::pair<_T1, _T2>&) [with _T1 = const std::__cxx11::basic_string; _T2 = xmreg::ThreadRAII2xmreg::TxSearch]’ is implicitly deleted because the default definition would be ill-formed:
constexpr pair(const pair&) = default;
^~~~
/usr/include/c++/6/bits/stl_pair.h:288:17: error: use of deleted function ‘xmreg::ThreadRAII2xmreg::TxSearch::ThreadRAII2(const xmreg::ThreadRAII2xmreg::TxSearch&)’
In file included from /root/openmonero/src/CurrentBlockchainStatus.h:12:0,
from /root/openmonero/src/CurrentBlockchainStatus.cpp:5:
/root/openmonero/src/ThreadRAII.h:35:7: note: ‘xmreg::ThreadRAII2xmreg::TxSearch::ThreadRAII2(const xmreg::ThreadRAII2xmreg::TxSearch&)’ is implicitly deleted because the default definition would be ill-formed:
class ThreadRAII2 : public ThreadRAII
^~~~~~~~~~~
/root/openmonero/src/ThreadRAII.h:35:7: error: use of deleted function ‘xmreg::ThreadRAII::ThreadRAII(const xmreg::ThreadRAII&)’
/root/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
^~~~~~~~~~
/root/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_deletexmreg::TxSearch]’
class ThreadRAII2 : public ThreadRAII
^~~~~~~~~~~
In file included from /usr/include/c++/6/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 /root/monero/contrib/epee/include/net/http_client.h:31,
from /root/openmonero/src/monero_headers.h:22,
from /root/openmonero/src/MicroCore.h:11,
from /root/openmonero/src/CurrentBlockchainStatus.h:6,
from /root/openmonero/src/CurrentBlockchainStatus.cpp:5:
/usr/include/c++/6/bits/unique_ptr.h:359:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^~~~~~~~~~
src/CMakeFiles/myxrm.dir/build.make:134: recipe for target 'src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o' failed
make[2]: *** [src/CMakeFiles/myxrm.dir/CurrentBlockchainStatus.cpp.o] Error 1
CMakeFiles/Makefile2:124: recipe for target 'src/CMakeFiles/myxrm.dir/all' failed
make[1]: *** [src/CMakeFiles/myxrm.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

And..

Your branch is up-to-date with 'origin/mymonero_v9'.

@moneroexamples
Copy link
Owner

Which linux distro? I will try recompile on it.

It could be possible that this branch is using C++14. If you have distro with gcc/clang that are a little old, C++14 might be lacking. But, I can check on your distro, anyway.

@moneroexamples
Copy link
Owner

Checked on U16.04. Same error. Its due to old gcc, which was not fully C++14 capable. A possible solution is to install newer gcc. Instructions for this for ubuntu can be found here: #89 (comment)

And this should compile, as I just checked on u16.04.

@serhack
Copy link
Author

serhack commented Nov 5, 2018

Fixed, however I'm using the latest version of Debian.

@serhack serhack closed this as completed Nov 5, 2018
@eyalfishler
Copy link
Contributor

is the v9 branch compatible with monero 12 or 13? @moneroexamples ?

@eyalfishler
Copy link
Contributor

@moneroexamples when i tried to compile with monero v13 i got an error
/home/ubuntu/openmonerov9/openmonero/src/tools.cpp:832:18: error: ‘RCTTypeSimpleBulletproof’ is not a member of ‘rct’
case rct::RCTTypeSimpleBulletproof:
^
/home/ubuntu/openmonerov9/openmonero/src/tools.cpp:840:18: error: ‘RCTTypeFullBulletproof’ is not a member of ‘rct’
case rct::RCTTypeFullBulletproof:
^

@moneroexamples
Copy link
Owner

moneroexamples commented Nov 6, 2018

its for v0.13.
Are you sure you are using mymonero_v9 branch? you have to check it out after git clone the repo.

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

3 participants