Project

General

Profile

Actions

Bug #4923

closed

Build error with boost 1.70.0

Added by Davide Pesavento over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Build
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

In file included from ../ndn-cxx/transport/tcp-transport.cpp:23:
../ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp: In instantiation of 'void ndn::detail::StreamTransportWithResolverImpl<BaseTransport, Protocol>::connect(const typename Protocol::resolver::query&) [with BaseTransport = ndn::TcpTransport; Protocol = boost::asio::ip::tcp; typename Protocol::resolver::query = boost::asio::ip::basic_resolver_query<boost::asio::ip::tcp>]':
../ndn-cxx/transport/tcp-transport.cpp:93:24:   required from here
../ndn-cxx/transport/detail/stream-transport-with-resolver-impl.hpp:58:81: error: 'boost::asio::ip::tcp::socket' {aka 'class boost::asio::basic_stream_socket<boost::asio::ip::tcp>'} has no member named 'get_io_service'
     auto resolver = make_shared<typename Protocol::resolver>(ref(this->m_socket.get_io_service()));
                                                                  ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

Essentially,

  • get_io_service() -> get_executor()
  • asio::io_service::post() -> asio::post()

On Linux, where we don't use -isystem, we have an additional problem: tons of warnings (errors in --debug builds) from anything that includes <boost/asio/error.hpp>, i.e. almost everything that includes some Asio header. I'm not sure what's the best way to fix this.

In file included from ../../boost_1_70_0/boost/asio/error.hpp:358,
                 from ../../boost_1_70_0/boost/asio/ip/impl/address_v4.ipp:22,
                 from ../../boost_1_70_0/boost/asio/ip/address_v4.hpp:334,
                 from ../../boost_1_70_0/boost/asio/ip/address.hpp:24,
                 from ../ndn-cxx/net/network-address.hpp:29,
                 from ../ndn-cxx/net/network-interface.hpp:28,
                 from ../ndn-cxx/net/network-monitor.hpp:29,
                 from ../ndn-cxx/net/impl/netlink-socket.hpp:27,
                 from ../ndn-cxx/net/impl/netlink-socket.cpp:24:
../../boost_1_70_0/boost/asio/impl/error.ipp:32:7: error: base class 'class boost::system::error_category' has accessible non-virtual destructor [-Werror=non-virtual-dtor]
 class netdb_category : public boost::system::error_category
       ^~~~~~~~~~~~~~
../../boost_1_70_0/boost/asio/impl/error.ipp:32:7: error: 'class boost::asio::error::detail::netdb_category' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
../../boost_1_70_0/boost/asio/impl/error.ipp:64:7: error: base class 'class boost::system::error_category' has accessible non-virtual destructor [-Werror=non-virtual-dtor]
 class addrinfo_category : public boost::system::error_category
       ^~~~~~~~~~~~~~~~~
../../boost_1_70_0/boost/asio/impl/error.ipp:64:7: error: 'class boost::asio::error::detail::addrinfo_category' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
../../boost_1_70_0/boost/asio/impl/error.ipp:94:7: error: base class 'class boost::system::error_category' has accessible non-virtual destructor [-Werror=non-virtual-dtor]
 class misc_category : public boost::system::error_category
       ^~~~~~~~~~~~~
../../boost_1_70_0/boost/asio/impl/error.ipp:94:7: error: 'class boost::asio::error::detail::misc_category' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
cc1plus: all warnings being treated as errors

Related issues 1 (0 open1 closed)

Related to repo-ng - Bug #4967: Build failure with Boost 1.70ClosedDavide Pesavento

Actions
Actions

Also available in: Atom PDF