I'm trying to compile Bitcoin Core v0.10.0 on Ubuntu 20.04, but then I get the following error:
rpcserver.cpp: In function ‘void StartRPCThreads()’: rpcserver.cpp:594:77: error: no matching function for call to ‘boost::asio::ssl::context::context(boost::asio::io_service&, boost::asio::ssl::context_base::method)’ 594 | rpc_ssl_context = new ssl::context(*rpc_io_service, ssl::context::sslv23); | ^ In file included from /usr/include/boost/asio/ssl/context.hpp:757, from /usr/include/boost/asio/ssl.hpp:18, from rpcprotocol.h:16, from rpcserver.h:10, from rpcserver.cpp:6: /usr/include/boost/asio/ssl/impl/context.ipp:371:1: note: candidate: ‘boost::asio::ssl::context::context(boost::asio::ssl::context&&)’ 371 | context::context(context&& other) | ^~~~~~~ /usr/include/boost/asio/ssl/impl/context.ipp:371:1: note: candidate expects 1 argument, 2 provided /usr/include/boost/asio/ssl/impl/context.ipp:63:1: note: candidate: ‘boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)’ 63 | context::context(context::method m) | ^~~~~~~ /usr/include/boost/asio/ssl/impl/context.ipp:63:1: note: candidate expects 1 argument, 2 provided rpcserver.cpp:613:50: error: ‘class boost::asio::ssl::context’ has no member named ‘impl’ 613 | SSL_CTX_set_cipher_list(rpc_ssl_context->impl(), strCiphers.c_str()); | ^~~~ rpcserver.cpp: In instantiation of ‘void RPCListen(boost::shared_ptr >, boost::asio::ssl::context&, bool) [with Protocol = boost::asio::ip::tcp; SocketAcceptorService = boost::asio::executor]’: rpcserver.cpp:673:58: required from here rpcserver.cpp:482:111: error: ‘class boost::asio::basic_socket_acceptor’ has no member named ‘get_io_service’ 482 | boost::shared_ptr > conn(new AcceptedConnectionImpl(acceptor->get_io_service(), context, fUseSSL)); | ~~~~~~~~~~^~~~~~~~~~~~~~ In file included from primitives/block.h:9, from chainparams.h:11, from base58.h:17, from rpcserver.cpp:8: ./primitives/transaction.h: In instantiation of ‘static _OI std::__copy_move::__copy_m(_II, _II, _OI) [with _II = const CTxOut*; _OI = CTxOut*]’: /usr/include/c++/9/bits/stl_algobase.h:404:30: required from ‘_OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = const CTxOut*; _OI = CTxOut*]’ /usr/include/c++/9/bits/stl_algobase.h:441:30: required from ‘_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator >; _OI = __gnu_cxx::__normal_iterator >]’ /usr/include/c++/9/bits/stl_algobase.h:474:7: required from ‘_OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator >; _OI = __gnu_cxx::__normal_iterator >]’ /usr/include/c++/9/bits/vector.tcc:238:31: required from ‘std::vector& std::vector::operator=(const std::vector&) [with _Tp = CTxOut; _Alloc = std::allocator]’ coins.h:90:19: required from here ./primitives/transaction.h:103:7: warning: implicitly-declared ‘CScript& CScript::operator=(const CScript&)’ is deprecated [-Wdeprecated-copy] 103 | class CTxOut | ^~~~~~ In file included from ./primitives/transaction.h:10, from primitives/block.h:9, from chainparams.h:11, from base58.h:17, from rpcserver.cpp:8: ./script/script.h:365:5: note: because ‘CScript’ has user-provided ‘CScript::CScript(const CScript&)’ 365 | CScript(const CScript& b) : std::vector(b.begin(), b.end()) { } | ^~~~~~~ In file included from /usr/include/c++/9/algorithm:61, from serialize.h:9, from amount.h:9, from rpcserver.h:9, from rpcserver.cpp:6: /usr/include/c++/9/bits/stl_algobase.h:342:18: note: synthesized method ‘CTxOut& CTxOut::operator=(const CTxOut&)’ first required here 342 | *__result = *__first; | ~~~~~~~~~~^~~~~~~~~~ In file included from chain.h:11, from main.h:14, from rpcserver.cpp:10: tinyformat.h: In static member function ‘static const char* tinyformat::detail::FormatIterator::streamStateFromFormat(std::ostream&, unsigned int&, const char*, int, int)’: tinyformat.h:785:21: warning: this statement may fall through [-Wimplicit-fallthrough=] 785 | out.setf(std::ios::uppercase); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ tinyformat.h:786:9: note: here 786 | case 'x': case 'p': | ^~~~ tinyformat.h:791:21: warning: this statement may fall through [-Wimplicit-fallthrough=] 791 | out.setf(std::ios::uppercase); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ tinyformat.h:792:9: note: here 792 | case 'e': | ^~~~ tinyformat.h:797:21: warning: this statement may fall through [-Wimplicit-fallthrough=] 797 | out.setf(std::ios::uppercase); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ tinyformat.h:798:9: note: here 798 | case 'f': | ^~~~ tinyformat.h:802:21: warning: this statement may fall through [-Wimplicit-fallthrough=] 802 | out.setf(std::ios::uppercase); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ tinyformat.h:803:9: note: here 803 | case 'g': | ^~~~ make[2]: *** [Makefile:3910: libbitcoin_server_a-rpcserver.o] Error 1 make[2]: Leaving directory '/usr/local/src/bitcoin-0.10.0/src' make[1]: *** [Makefile:6475: all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/bitcoin-0.10.0/src' make: *** [Makefile:569: all-recursive] Error 1
I followed the instructions on the build-unix.md file, and I believe the problem is related to the required dependencies, especially the libboost-all-dev package. Interestingly, I was able to compile every released version from v0.20.1 to 0.16.0, but nothing older than that, using the same instructions on build-unix.md. If the problem really is libboost-all-dev , how can I solve it?
Update:
I've installed boost version 1.57 as Pieter suggested with:
tar --bzip2 -xf /path/to/boost_1_57_0.tar.bz2 cd boost_1_57_0/ ./bootstrap.sh --prefix=/usr/ ./b2 sudo ./b2 install
And then, on the bitcoin root, used:
./configure --with-boost-liddir=LIB_DIR
But as result I got:
configure: error: Could not find a version of the boost_system library!
And I've tried different paths but always got the same result. Is this just path problem or is there something else?
Update 2:
Apparently I fixed the path with:
./configure --with-boost-libdir=/usr/lib/
But when I run make I got this error.
What is the problem?
-std=c++98
).