scryptachain / scrypta

Scrypta Blockchain main code, Daemon/CLI and Qt desktop wallet.
MIT License
10 stars 14 forks source link

Fails to build with boost 1.67 #4

Closed palace22 closed 5 years ago

palace22 commented 5 years ago

After sudo make command, I encoutered this error:

Making all in src
make[1]: Entering directory '/home/pi/scrypta/src'
make[2]: Entering directory '/home/pi/scrypta/src'
  CXX      libbitcoin_server_a-rpcserver.o
rpcserver.cpp:475:101: error: wrong number of template arguments (2, should be 1)
 st::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                     ^

In file included from /usr/include/boost/asio.hpp:30,
                 from rpcprotocol.h:10,
                 from rpcserver.h:11,
                 from rpcserver.cpp:9:
/usr/include/boost/asio/basic_socket_acceptor.hpp:73:7: note: provided for ‘template<class Protocol> class boost::asio::basic_socket_acceptor’
 class basic_socket_acceptor
       ^~~~~~~~~~~~~~~~~~~~~
rpcserver.cpp:475:103: error: template argument 1 is invalid
 ::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                     ^

rpcserver.cpp:485:94: error: wrong number of template arguments (2, should be 1)
 st::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                     ^

In file included from /usr/include/boost/asio.hpp:30,
                 from rpcprotocol.h:10,
                 from rpcserver.h:11,
                 from rpcserver.cpp:9:
/usr/include/boost/asio/basic_socket_acceptor.hpp:73:7: note: provided for ‘template<class Protocol> class boost::asio::basic_socket_acceptor’
 class basic_socket_acceptor
       ^~~~~~~~~~~~~~~~~~~~~
rpcserver.cpp:485:96: error: template argument 1 is invalid
 ::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                     ^

rpcserver.cpp: In function ‘void RPCListen(int, boost::asio::ssl::context&, bool)’:
rpcserver.cpp:490:108: error: base operand of ‘->’ is not a pointer
 nImpl<Protocol> > conn(new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL));
                                                                     ^~

rpcserver.cpp:492:13: error: base operand of ‘->’ is not a pointer
     acceptor->async_accept(
             ^~
rpcserver.cpp: At global scope:
rpcserver.cpp:508:101: error: wrong number of template arguments (2, should be 1)
 st::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                     ^

In file included from /usr/include/boost/asio.hpp:30,
                 from rpcprotocol.h:10,
                 from rpcserver.h:11,
                 from rpcserver.cpp:9:
/usr/include/boost/asio/basic_socket_acceptor.hpp:73:7: note: provided for ‘template<class Protocol> class boost::asio::basic_socket_acceptor’
 class basic_socket_acceptor
       ^~~~~~~~~~~~~~~~~~~~~
rpcserver.cpp:508:103: error: template argument 1 is invalid
 ::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                                                                     ^

rpcserver.cpp: In function ‘void RPCAcceptHandler(int, boost::asio::ssl::context&, bool, boost::shared_ptr<AcceptedConnection>, const boost::system::error_code&)’:
rpcserver.cpp:515:60: error: base operand of ‘->’ is not a pointer
     if (error != asio::error::operation_aborted && acceptor->is_open())
                                                            ^~
rpcserver.cpp:516:45: error: no matching function for call to ‘RPCListen(int&, boost::asio::ssl::context&, const bool&)’
         RPCListen(acceptor, context, fUseSSL);
                                             ^
rpcserver.cpp:485:13: note: candidate: ‘template<class Protocol, class SocketAcceptorService> void RPCListen(int, boost::asio::ssl::context&, bool)’
 static void RPCListen(boost::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
             ^~~~~~~~~
rpcserver.cpp:485:13: note:   template argument deduction/substitution failed:
rpcserver.cpp:516:45: note:   couldn't deduce template parameter ‘Protocol’
         RPCListen(acceptor, context, fUseSSL);
                                             ^
rpcserver.cpp: In function ‘void StartRPCThreads()’:
rpcserver.cpp:596:77: error: no matching function for call to ‘boost::asio::ssl::context::context(boost::asio::io_service&, boost::asio::ssl::context_base::method)’
     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:11,
                 from rpcserver.h:11,
                 from rpcserver.cpp:9:
/usr/include/boost/asio/ssl/impl/context.ipp:326:1: note: candidate: ‘boost::asio::ssl::context::context(boost::asio::ssl::context&&)’
 context::context(context&& other)
 ^~~~~~~
/usr/include/boost/asio/ssl/impl/context.ipp:326: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)’
 context::context(context::method m)
 ^~~~~~~
/usr/include/boost/asio/ssl/impl/context.ipp:63:1: note:   candidate expects 1 argument, 2 provided
rpcserver.cpp:618:50: error: ‘class boost::asio::ssl::context’ has no member named ‘impl’
         SSL_CTX_set_cipher_list(rpc_ssl_context->impl(), strCiphers.c_str());
                                                  ^~~~
rpcserver.cpp:674:58: 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, *rpc_ssl_context, fUseSSL);
                                                          ^
rpcserver.cpp:485:13: note: candidate: ‘template<class Protocol, class SocketAcceptorService> void RPCListen(int, boost::asio::ssl::context&, bool)’
 static void RPCListen(boost::shared_ptr<basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
             ^~~~~~~~~
rpcserver.cpp:485:13: note:   template argument deduction/substitution failed:
rpcserver.cpp:674:58: note:   couldn't deduce template parameter ‘Protocol’
             RPCListen(acceptor, *rpc_ssl_context, fUseSSL);
                                                          ^
In file included from chain.h:12,
                 from main.h:17,
                 from rpcserver.cpp:13:
tinyformat.h: In static member function ‘static const char* tinyformat::detail::FormatIterator::streamStateFromFormat(std::ostream&, unsigned int&, const char*, int, int)’:
tinyformat.h:781:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
         out.setf(std::ios::uppercase);
         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:782:5: note: here
     case 'x':
     ^~~~
tinyformat.h:788:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
         out.setf(std::ios::uppercase);
         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:789:5: note: here
     case 'e':
     ^~~~
tinyformat.h:794:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
         out.setf(std::ios::uppercase);
         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:795:5: note: here
     case 'f':
     ^~~~
tinyformat.h:799:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
         out.setf(std::ios::uppercase);
         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
tinyformat.h:800:5: note: here
     case 'g':
     ^~~~
make[2]: *** [Makefile:4377: libbitcoin_server_a-rpcserver.o] Error 1
make[2]: Leaving directory '/home/pi/scrypta/src'
make[1]: *** [Makefile:7320: all-recursive] Error 1
make[1]: Leaving directory '/home/pi/scrypta/src'
make: *** [Makefile:595: all-recursive] Error 1
turinglabsorg commented 5 years ago

What's your platform? Raspberry pi?

palace22 commented 5 years ago

Yes, I'm using raspberry

turinglabsorg commented 5 years ago

Ok, this pull request solves the issue? https://github.com/scryptachain/scrypta/pull/5/commits/9dab7af0eac3dcbf6dd5b7d22fe7bb0b41a4adf6

palace22 commented 5 years ago

Yes

turinglabsorg commented 5 years ago

Can you join our Discord channel and write me a PM? This is the invite: https://discord.gg/W2EZYS

turinglabsorg commented 5 years ago

Closing because the issue have been solved, we'll include the pull request in the next release.