cygnusxi / CurecoinSource

Curecoin 2.0+ Source Code
https://curecoin.net
MIT License
146 stars 57 forks source link

Fails to build with boost 1.71.0 #45

Closed dark-saber closed 4 years ago

dark-saber commented 4 years ago

When trying to build with boost 1.71.0 on Arch Linux, the build fails with the following output:

In file included from src/curecoinrpc.h:16,
                 from src/curecoinrpc.cpp:11:
src/json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
src/json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
   31 |         typedef typename String_type::value_type Char_type;
      |                                                  ^~~~~~~~~
src/curecoinrpc.cpp: In instantiation of ‘void RPCListen(boost::shared_ptr<boost::asio::basic_socket_acceptor<Protocol, SocketAcceptorService> >, boost::asio::ssl::context&, bool) [with Protocol = boost::asio::ip::tcp; SocketAcceptorService = boost::asio::executor]’:
src/curecoinrpc.cpp:801:45:   required from here
src/curecoinrpc.cpp:668:93: error: ‘class boost::asio::basic_socket_acceptor<boost::asio::ip::tcp>’ has no member named ‘get_io_service’
  668 |     AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
      |                                                                                   ~~~~~~~~~~^~~~~~~~~~~~~~
src/curecoinrpc.cpp: In instantiation of ‘bool SSLIOStreamDevice<Protocol>::connect(const string&, const string&) [with Protocol = boost::asio::ip::tcp; std::string = std::__cxx11::basic_string<char>]’:
src/curecoinrpc.cpp:1075:103:   required from here
src/curecoinrpc.cpp:562:43: error: ‘class boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >’ has no member named ‘get_io_service’
  562 |         ip::tcp::resolver resolver(stream.get_io_service());
      |                                    ~~~~~~~^~~~~~~~~~~~~~
make: *** [Makefile:2655: build/curecoinrpc.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting.
cygnusxi commented 4 years ago

Try this on your system again with the recent merged update

dark-saber commented 4 years ago

This helps with an older issue with miniupnpc that had to be patched out, now we can use the upstream version without patches, thank you! But I guess the problem with boost 1.70+ still persists:

src/curecoinrpc.cpp: In instantiation of ‘void RPCListen(boost::shared_ptr<boost::asio::basic_socket_acceptor<Protocol, SocketAcceptorService> >, boost::asio::ssl::context&, bool) [with Protocol = boost::asio::ip::tcp; SocketAcceptorService = boost::asio::executor]’:
src/curecoinrpc.cpp:801:45:   required from here
src/curecoinrpc.cpp:668:93: error: ‘class boost::asio::basic_socket_acceptor<boost::asio::ip::tcp>’ has no member named ‘get_io_service’
  668 |     AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
      |                                                                                   ~~~~~~~~~~^~~~~~~~~~~~~~
src/curecoinrpc.cpp: In instantiation of ‘bool SSLIOStreamDevice<Protocol>::connect(const string&, const string&) [with Protocol = boost::asio::ip::tcp; std::string = std::__cxx11::basic_string<char>]’:
src/curecoinrpc.cpp:1075:103:   required from here
src/curecoinrpc.cpp:562:43: error: ‘class boost::asio::ssl::stream<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >’ has no member named ‘get_io_service’
  562 |         ip::tcp::resolver resolver(stream.get_io_service());
      |                                    ~~~~~~~^~~~~~~~~~~~~~
make: *** [Makefile:2673: build/curecoinrpc.o] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
DerVerruckteFuchs commented 4 years ago

get_io_service() was removed from 1.70. get_executor() seems to have replaced get_io_service(), so simply changing it may work. I tried to initially test the change myself with the Arch PKGBUILD. Using vim with syntastic quieted the error about a missing function in the edited area, but makepkg reset the local makepkg git branch. Hopefully there are not a whole lot of deprecated/removed functions to deal with.

davemint commented 4 years ago

get_io_service() was removed from 1.70. get_executor() seems to have replaced get_io_service(), so simply changing it may work. I tried to initially test the change myself with the Arch PKGBUILD. Using vim with syntastic quieted the error about a missing function in the edited area, but makepkg reset the local makepkg git branch. Hopefully there are not a whole lot of deprecated/removed functions to deal with.

I used your suggestion and some other code to make it build #47

cygnusxi commented 4 years ago

48 has been merged and should fix boost for all 1.7+ versions, please report if there are any issues.