Package Details: gr-timing_utils-git 3.10-1

Git Clone URL: https://aur.archlinux.org/gr-timing_utils-git.git (read-only, click to copy)
Package Base: gr-timing_utils-git
Description: GNU Radio gr-timing_utils smart meters modules (RECESSIM)
Upstream URL: https://github.com/sandialabs/gr-timing_utils/
Licenses: GPL
Provides: gr-timing_utils
Submitter: nicolasfarmer
Maintainer: nicolasfarmer
Last Packager: nicolasfarmer
Votes: 0
Popularity: 0.000000
First Submitted: 2024-11-09 09:24 (UTC)
Last Updated: 2024-11-09 09:24 (UTC)

Dependencies (6)

Required by (2)

Sources (1)

Latest Comments

nicolasfarmer commented on 2025-08-19 07:31 (UTC) (edited on 2025-08-19 07:32 (UTC) by nicolasfarmer)

I investigated. Some number of versions ago boost deprecated and removed the io_service API and replaced it with io_context. I tried updating the offending file with the patch below:

diff --git a/lib/reference_timer.h b/lib/reference_timer.h
index e5c583e..cb5cc69 100644
--- a/lib/reference_timer.h
+++ b/lib/reference_timer.h
@@ -23,10 +23,10 @@ public:
     {
         boost::posix_time::ptime epoch2(boost::gregorian::date(1970, 1, 1));
         epoch = epoch2;
-        io.reset();
+        io.restart();
         timer = new boost::asio::deadline_timer(io);
-        work = boost::shared_ptr<boost::asio::io_service::work>(
-            new boost::asio::io_service::work(io));
+        work = boost::shared_ptr<boost::asio::io_context::executor_type>(
+            new boost::asio::io_context::executor_type(io));
         debug = false;
     }

@@ -123,6 +123,6 @@ protected:

     virtual void process_interrupt() = 0;

-    boost::asio::io_service io;
-    boost::shared_ptr<boost::asio::io_service::work> work;
+    boost::asio::io_context io;
+    boost::shared_ptr<boost::asio::io_context::executor_type> work;
 };

This reduces the initial build errors to:

/home/nicolas/Downloads/gr-smart_meters/gr-timing_utils-git/src/gr-timing_utils/lib/reference_timer.h: In constructor ‘reference_timer::reference_timer()’:
/home/nicolas/Downloads/gr-smart_meters/gr-timing_utils-git/src/gr-timing_utils/lib/reference_timer.h:29:58: error: ‘boost::asio::io_context::basic_executor_type<Allocator, Bits>::basic_executor_type(boost::asio::io_context&) [with Allocator = std::allocator<void>; long unsigned int Bits = 0]’ is private within this context
   29 |             new boost::asio::io_context::executor_type(io));
      |                                                          ^
In file included from /usr/include/boost/asio/detail/io_object_impl.hpp:23,
                 from /usr/include/boost/asio/basic_socket.hpp:23,
                 from /usr/include/boost/asio/basic_datagram_socket.hpp:20,
                 from /usr/include/boost/asio.hpp:32:
/usr/include/boost/asio/io_context.hpp:915:12: note: declared private here
  915 |   explicit basic_executor_type(io_context& i) noexcept
      |            ^~~~~~~~~~~~~~~~~~~

But I haven't been able to get past this. Even though the patched code uses the boost public type boost::asio::io_context::executor_type the error mentions the private basic_executor_type which appears in a maze of public and private contexts in boost's io_context.hpp. I might need executor_work_guard in the templates instead, but I don't have the C++ knowledge to tackle this, and upstream hasn't been updated in years, so any ideas are welcome.

greyltc commented on 2025-08-18 07:28 (UTC)

This fails to build with a bunch of boost errors