Boost logo

Boost :

From: Thomas Goirand (zigo_at_[hidden])
Date: 2021-01-07 13:51:11


Hi,

I'm the Debian package maintainer for Ceph. Ceph currently fails to
build with latest libbost. Here's the build log:

/root/ceph/src/common/async/completion.h:194:29: error:
'boost::asio::executor_work_guard<boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>,
boost::asio::execution::detail::blocking::never_t<0>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0>
> >, void>::executor_type' {aka 'class
boost::asio::execution::any_executor<boost::asio::execution::context_as_t<boost::asio::execution_context&>,
boost::asio::execution::detail::blocking::never_t<0>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::blocking::possibly_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::tracked_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::outstanding_work::untracked_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::fork_t<0>
>,
boost::asio::execution::prefer_only<boost::asio::execution::detail::relationship::continuation_t<0>
> >'} has no member named 'defer'; did you mean 'prefer'?
  194 | w.second.get_executor().defer(std::move(f), alloc2);

and 3 more like this. The code doing this is in
src/common/async/completion.h:

  void destroy_defer(std::tuple<Args...>&& args) override {
    auto w = std::move(work);
    auto f = bind_and_forward(std::move(handler), std::move(args));
    RebindAlloc2 alloc2 = boost::asio::get_associated_allocator(handler);
    RebindTraits2::destroy(alloc2, this);
    RebindTraits2::deallocate(alloc2, this, 1);
    w.second.get_executor().defer(std::move(f), alloc2);
  }
  void destroy_dispatch(std::tuple<Args...>&& args) override {
    auto w = std::move(work);
    auto f = bind_and_forward(std::move(handler), std::move(args));
    RebindAlloc2 alloc2 = boost::asio::get_associated_allocator(handler);
    RebindTraits2::destroy(alloc2, this);
    RebindTraits2::deallocate(alloc2, this, 1);
    w.second.get_executor().dispatch(std::move(f), alloc2);
  }
  void destroy_post(std::tuple<Args...>&& args) override {
    auto w = std::move(work);
    auto f = bind_and_forward(std::move(handler), std::move(args));
    RebindAlloc2 alloc2 = boost::asio::get_associated_allocator(handler);
    RebindTraits2::destroy(alloc2, this);
    RebindTraits2::deallocate(alloc2, this, 1);
    w.second.get_executor().post(std::move(f), alloc2);
  }

Has the boost API changed? If so, how to fix the above code?

Thanks a lot to anyone helping me fixing this,
Cheers,

Thomas Goirand (zigo)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk