The io_service class is deprecated and has been a typedef to io_context for a long time, and has been removed in the latest version of asio/boost. Changing all instances of io_service to io_context should be a drop-in fix.
There are also some changes to how the resolving works:
// Old
boost::asio::ip::tcp::resolver::query query(_<host>_, _<port>_);
boost::asio::ip::tcp::resolver::iterator iter = resolver.resolve(query, ec);
// New
boost::asio::ip::tcp::resolver::results_type endpoints = resolver.resolve(_<host>_, _<port>_, ec);
I haven't looked or tried to compile the ROS1 code, so there might be other issues as well.