Reputation: 3
When I was compiling the magi wallet (Using this guide) I came across these errors when compiling it. After searching around on Bing and Google I seem to have found no solution for this and the only mention of this at all is in the makefile of the actual project. I have found nothing on how to solve this problem and the GitHub repo hasn't been updated in about 3 years and no one is answering the questions there. Can anyone help me? (All the errors are listed below and they are ordered in the time they appeared)
magirpc.cpp: At global scope:
magirpc.cpp:668:102: error: wrong number of template arguments (2, should be 1)
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
magirpc.cpp:668:104: error: template argument 1 is invalid
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
magirpc.cpp:678:95: error: wrong number of template arguments (2, should be 1)
static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
magirpc.cpp:678:97: error: template argument 1 is invalid
static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
magirpc.cpp:683:91: error: base operand of ‘->’ is not a pointer
AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
magirpc.cpp:685:13: error: base operand of ‘->’ is not a pointer
acceptor->async_accept(
magirpc.cpp:700:102: error: wrong number of template arguments (2, should be 1)
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
magirpc.cpp:700:104: error: template argument 1 is invalid
static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
magirpc.cpp:710:17: error: base operand of ‘->’ is not a pointer
&& acceptor->is_open())
magirpc.cpp:711:45: error: no matching function for call to ‘RPCListen(int&, boost::asio::ssl::context&, const bool&)’
RPCListen(acceptor, context, fUseSSL);
magirpc.cpp:775:58: error: no matching function for call to ‘boost::asio::ssl::context::context(boost::asio::io_service&, boost::asio::ssl::context_base::method)’
ssl::context context(io_service, ssl::context::sslv23);
magirpc.cpp:791:41: error: ‘class boost::asio::ssl::context’ has no member named ‘impl’
SSL_CTX_set_cipher_list(context.impl(), strCiphers.c_str());
magirpc.cpp:816:45: error: no matching function for call to ‘RPCListen(boost::shared_ptr<boost::asio::basic_socket_acceptor<boost::asio::ip::tcp> >&, boost::asio::ssl::context&, const bool&)’
RPCListen(acceptor, context, fUseSSL);
magirpc.cpp:842:49: error: no matching function for call to ‘RPCListen(boost::shared_ptr<boost::asio::basic_socket_acceptor<boost::asio::ip::tcp> >&, boost::asio::ssl::context&, const bool&)’
RPCListen(acceptor, context, fUseSSL);
magirpc.cpp:1085:58: error: no matching function for call to ‘boost::asio::ssl::context::context(boost::asio::io_service&, boost::asio::ssl::context_base::method)’
ssl::context context(io_service, ssl::context::sslv23);
make: *** [makefile.unix:188: obj/magirpc.o] Error 1
Note: For the full log of the build please click here.
Thanks,
swanserquack
Upvotes: 0
Views: 730
Reputation: 100986
As above it looks to me like this code wants a different version of Boost than the one you're using. The version of boost you're using wants one argument to the template for basic_socket_acceptor
and this code is trying to pass two arguments.
Looking at the Boost documentation I can see that the current latest version does want two arguments; see https://www.boost.org/doc/libs/1_76_0/doc/html/boost_asio/reference/basic_socket_acceptor.html And I can see that up to version 1.69 wanted one argument one-argument version; see https://www.boost.org/doc/libs/1_69_0/doc/html/boost_asio/reference/basic_socket_acceptor.html
It appears that this signature was changed in Boost 1.70.
So it seems the version of Boost you're trying to compile with is too old and this set of code wants you to use a newer version, so you'll need to upgrade your Boost.
Upvotes: 0