Re: build status with boost-1.70

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 4/16/19 8:24 PM, Patrick McLean wrote:
In the #ceph-devel IRC channel, it was suggested that this list might be interested in this. I tried to build ceph-14.2.0 against boost-1.70.

It builds fine without radosgw, but with it, it fails with this:
In file included from /var/tmp/portage/sys-cluster/ceph-14.2.0-r5/work/ceph-14.2.0/src/rgw/rgw_dmclock_async_scheduler.cc:3:
/var/tmp/portage/sys-cluster/ceph-14.2.0-r5/work/ceph-14.2.0/src/rgw/rgw_dmclock_async_scheduler.h: In member function 'rgw::dmclock::AsyncScheduler::executor_type rgw::dmclock::AsyncScheduler::get_executor()':
/var/tmp/portage/sys-cluster/ceph-14.2.0-r5/work/ceph-14.2.0/src/rgw/rgw_dmclock_async_scheduler.h:45:30: error: could not convert 'boost::asio::basic_waitable_timer<Clock, WaitTraits, Executor>::get_executor() [with Clock = ceph::time_detail::coarse_real_clock; WaitTraits = boost::asio::wait_traits<ceph::time_detail::coarse_real_clock>; Executor = boost::asio::executor; boost::asio::basic_waitable_timer<Clock, WaitTraits, Executor>::executor_type = boost::asio::executor]()' from 'boost::asio::basic_waitable_timer<ceph::time_detail::coarse_real_clock>::executor_type' {aka 'boost::asio::executor'} to 'rgw::dmclock::AsyncScheduler::executor_type' {aka 'boost::asio::io_context::executor_type'}
      return timer.get_executor();
             ~~~~~~~~~~~~~~~~~~^~
make[2]: *** [src/rgw/CMakeFiles/rgw_common.dir/build.make:418: src/rgw/CMakeFiles/rgw_common.dir/rgw_dmclock_async_scheduler.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:7686: src/rgw/CMakeFiles/rgw_common.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
I am happy to try patches etc to get it building.

That's good to know, thanks for testing! This one is documented as a breaking change in https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/history.html:

> Note: One potential source of breakage in existing user code is when reusing an I/O object's |io_context| for constructing another I/O object, as in...

When we fix this, we'll also want to update cmake to require boost 1.70 so that we don't need a bunch of #ifdefs to support previous versions.


If you're keen to get it building, you can try this patch:

diff --git a/src/rgw/rgw_dmclock_async_scheduler.h b/src/rgw/rgw_dmclock_async_scheduler.h
index 70487a52537..47de6523915 100644
--- a/src/rgw/rgw_dmclock_async_scheduler.h
+++ b/src/rgw/rgw_dmclock_async_scheduler.h
@@ -82,7 +82,7 @@ class AsyncScheduler : public md_config_obs_t, public Scheduler {
   using Completion = async::Completion<Signature, async::AsBase<Request>>;

   using Clock = ceph::coarse_real_clock;
-  using Timer = boost::asio::basic_waitable_timer<Clock>;
+  using Timer = boost::asio::basic_waitable_timer<Clock, boost::asio::wait_traits<Clock>, executor_type>;
   Timer timer; //< timer for the next scheduled request

   CephContext *const cct;
diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h
index d99a6ff68d5..d9b98d3f851 100644
--- a/src/rgw/rgw_reshard.h
+++ b/src/rgw/rgw_reshard.h
@@ -183,7 +183,9 @@ class RGWReshardWait {
   ceph::condition_variable cond;

   struct Waiter : boost::intrusive::list_base_hook<> {
-    boost::asio::basic_waitable_timer<Clock> timer;
+    using Executor = boost::asio::io_context::executor_type;
+    using Timer = boost::asio::basic_waitable_timer<Clock, boost::asio::wait_traits<Clock>, Executor>;
+    Timer timer;
     explicit Waiter(boost::asio::io_context& ioc) : timer(ioc) {}
   };
   boost::intrusive::list<Waiter> waiters;




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux