Fix Boost 1.90 compatibility and expand CircleCI distro support (including Dockerfile consolidation)#389
Fix Boost 1.90 compatibility and expand CircleCI distro support (including Dockerfile consolidation)#389
Conversation
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/df7b7090-6ae9-4fc5-bf6e-da0740be6aba Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/df7b7090-6ae9-4fc5-bf6e-da0740be6aba Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
tsaubergine
left a comment
There was a problem hiding this comment.
Please also fix:
[ 0%] Generating LibLink
[ 0%] Generating BinLink
[ 0%] Generating IncludeLink
[ 0%] Generating ShareLink
[ 1%] Generating WtResourcesLink
[ 1%] Built target inc_link
[ 1%] Built target bin_link
[ 1%] Built target lib_link
[ 1%] Built target wt_link
[ 1%] Built target share_link
[ 1%] Building CXX object src/CMakeFiles/goby.dir/util/linebasedcomms/tcp_client.cpp.o
In file included from /home/toby/goby3/build/include/goby/middleware/io/line_based/tcp_client.h:36,
from /home/toby/goby3/src/util/linebasedcomms/tcp_client.h:33,
from /home/toby/goby3/src/util/linebasedcomms/tcp_client.cpp:32:
/home/toby/goby3/build/include/goby/middleware/io/detail/tcp_client_interface.h: In instantiation of ‘goby::middleware::io::detail::TCPClientThread<line_in_group, line_out_group, publish_layer, subscribe_layer, Config, ThreadType, use_indexed_groups>::TCPClientThread(const Config&, int) [with const goby::middleware::Group& line_in_group = goby::util::groups::linebasedcomms_in; const goby::middleware::Group& line_out_group = goby::util::groups::linebasedcomms_out; goby::middleware::io::PubSubLayer publish_layer = goby::middleware::io::PubSubLayer::INTERTHREAD; goby::middleware::io::PubSubLayer subscribe_layer = goby::middleware::io::PubSubLayer::INTERTHREAD; Config = goby::middleware::protobuf::TCPClientConfig; ThreadType = goby::util::LineBasedCommsThreadStub; bool use_indexed_groups = true]’:
/home/toby/goby3/build/include/goby/middleware/io/line_based/tcp_client.h:87:70: required from ‘goby::middleware::io::TCPClientThreadLineBased<line_in_group, line_out_group, publish_layer, subscribe_layer, Config, ThreadType, use_indexed_groups>::TCPClientThreadLineBased(const goby::middleware::protobuf::TCPClientConfig&, int) [with const goby::middleware::Group& line_in_group = goby::util::groups::linebasedcomms_in; const goby::middleware::Group& line_out_group = goby::util::groups::linebasedcomms_out; goby::middleware::io::PubSubLayer publish_layer = goby::middleware::io::PubSubLayer::INTERTHREAD; goby::middleware::io::PubSubLayer subscribe_layer = goby::middleware::io::PubSubLayer::INTERTHREAD; Config = goby::middleware::protobuf::TCPClientConfig; ThreadType = goby::util::LineBasedCommsThreadStub; bool use_indexed_groups = true]’
87 | : Base(config, index), eol_matcher_(this->cfg().end_of_line())
| ^
/home/toby/goby3/src/util/linebasedcomms/tcp_client.cpp:70:42: required from here
70 | Thread tcp(cfg, this->index());
| ^
/home/toby/goby3/build/include/goby/middleware/io/detail/tcp_client_interface.h:73:45: error: no matching function for call to ‘boost::asio::ip::basic_resolver<boost::asio::ip::tcp>::resolve(<brace-enclosed initializer list>)’
73 | remote_endpoint_ = *resolver.resolve(
| ~~~~~~~~~~~~~~~~^
74 | {this->cfg().remote_address(), std::to_string(this->cfg().remote_port()),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75 | boost::asio::ip::resolver_query_base::numeric_service});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/865ec0e4-2b7b-47f6-a818-b4169a5e014d Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Fixed in commit |
| namespace goby | ||
| { | ||
| namespace util | ||
| { | ||
| namespace asio_compat | ||
| { | ||
| template <typename IoContext> inline void restart(IoContext& io) { io.restart(); } | ||
|
|
||
| template <typename IoContext, typename CompletionToken> | ||
| inline auto post(IoContext& io, CompletionToken&& token) | ||
| { | ||
| return boost::asio::post(io, std::forward<CompletionToken>(token)); | ||
| } | ||
|
|
||
| inline boost::asio::ip::address make_address(const std::string& addr) | ||
| { | ||
| return boost::asio::ip::make_address(addr); | ||
| } | ||
| } // namespace asio_compat | ||
| } // namespace util | ||
| } // namespace goby | ||
|
|
There was a problem hiding this comment.
Please explain why these need to be in asio_compat.h, especially "make_address"? What are the expected values for IoContext template parameters?
There was a problem hiding this comment.
If there's no macro we're avoiding by having these here, please remove and put the functions directly in the calling code without using goby::util::asio_compat
There was a problem hiding this comment.
Addressed in df59001: I removed the goby::util::asio_compat wrapper functions and switched call sites to direct Boost.Asio calls (boost::asio::post, io_context::restart, boost::asio::ip::make_address). src/util/asio_compat.h now only keeps the io_context/io_service compatibility aliasing. No UI changes (screenshot: N/A).
There was a problem hiding this comment.
Done in df59001: removed the wrapper helper usage and put the functions directly in calling code, while keeping asio_compat.h only for versioned io_context compatibility. No UI changes (screenshot: N/A).
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/e1a9fc92-a55b-4312-a100-dd98f3a1111d Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/e1a9fc92-a55b-4312-a100-dd98f3a1111d Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
…Change namespace for mavlink HEARTBEAT message.
tsaubergine
left a comment
There was a problem hiding this comment.
Please fix this error from Boost 1.90 while maintaining backwards compatibility to Boost 1.74:
In file included from /home/toby/goby3/build/include/goby/middleware/io/mavlink/udp.h:35,
from /home/toby/goby3/src/apps/zeromq/mavlink_gateway/mavlink_gateway.cpp:42:
/home/toby/goby3/build/include/goby/middleware/io/udp_point_to_point.h: In instantiation of ‘goby::middleware::io::UDPPointToPointThread<line_in_group, line_out_group, publish_layer, subscribe_layer, ThreadType, use_indexed_groups>::UDPPointToPointThread(const goby::middleware::protobuf::UDPPointToPointConfig&, int) [with const goby::middleware::Group& line_in_group = goby::middleware::io::groups::mavlink_raw_in; const goby::middleware::Group& line_out_group = goby::middleware::io::groups::mavlink_raw_out; goby::middleware::io::PubSubLayer publish_layer = goby::middleware::io::PubSubLayer::INTERPROCESS; goby::middleware::io::PubSubLayer subscribe_layer = goby::middleware::io::PubSubLayer::INTERPROCESS; ThreadType = goby::zeromq::SimpleThread; bool use_indexed_groups = false]’:
/home/toby/goby3/build/include/goby/middleware/io/mavlink/common.h:62:66: required from ‘goby::middleware::io::IOThreadMAVLink<line_in_group, line_out_group, publish_layer, subscribe_layer, IOThreadBase, IOConfig>::IOThreadMAVLink(const IOConfig&) [with const goby::middleware::Group& line_in_group = goby::middleware::io::groups::mavlink_raw_in; const goby::middleware::Group& line_out_group = goby::middleware::io::groups::mavlink_raw_out; goby::middleware::io::PubSubLayer publish_layer = goby::middleware::io::PubSubLayer::INTERPROCESS; goby::middleware::io::PubSubLayer subscribe_layer = goby::middleware::io::PubSubLayer::INTERPROCESS; IOThreadBase = goby::middleware::io::UDPPointToPointThread<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::zeromq::SimpleThread, false>; IOConfig = goby::middleware::protobuf::UDPPointToPointConfig]’
62 | IOThreadMAVLink(const IOConfig& config) : IOThreadBase(config)
| ^
/home/toby/goby3/build/include/goby/middleware/io/mavlink/udp.h:85:50: required from ‘goby::middleware::io::UDPThreadMAVLink<line_in_group, line_out_group, publish_layer, subscribe_layer, ThreadType>::UDPThreadMAVLink(const goby::middleware::protobuf::UDPPointToPointConfig&) [with const goby::middleware::Group& line_in_group = goby::middleware::io::groups::mavlink_raw_in; const goby::middleware::Group& line_out_group = goby::middleware::io::groups::mavlink_raw_out; goby::middleware::io::PubSubLayer publish_layer = goby::middleware::io::PubSubLayer::INTERPROCESS; goby::middleware::io::PubSubLayer subscribe_layer = goby::middleware::io::PubSubLayer::INTERPROCESS; ThreadType = goby::zeromq::SimpleThread]’
85 | ThreadType>(config)
| ^
/usr/include/c++/15/bits/stl_construct.h:133:7: required from ‘void std::_Construct(_Tp*, _Args&& ...) [with _Tp = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>; _Args = {const goby::middleware::protobuf::UDPPointToPointConfig&}]’
133 | ::new(static_cast<void*>(__p)) _Tp(std::forward<_Args>(__args)...);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/15/bits/alloc_traits.h:805:19: required from ‘static void std::allocator_traits<std::allocator<void> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>; _Args = {const goby::middleware::protobuf::UDPPointToPointConfig&}; allocator_type = std::allocator<void>]’
805 | { std::_Construct(__p, std::forward<_Args>(__args)...); }
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/15/bits/shared_ptr_base.h:606:39: required from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {const goby::middleware::protobuf::UDPPointToPointConfig&}; _Tp = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>; _Alloc = std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’
606 | allocator_traits<_Alloc>::construct(__a, _M_ptr(),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
607 | std::forward<_Args>(__args)...); // might throw
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/15/bits/shared_ptr_base.h:969:16: [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/include/c++/15/bits/shared_ptr.h:463:59: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<void>; _Args = {const goby::middleware::protobuf::UDPPointToPointConfig&}; _Tp = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>]’
463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...)
| ^
/usr/include/c++/15/bits/shared_ptr.h:1007:14: required from ‘std::shared_ptr<typename std::enable_if<(! std::is_array<_Tp>::value), _Tp>::type> std::make_shared(_Args&& ...) [with _Tp = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>; _Args = {const goby::middleware::protobuf::UDPPointToPointConfig&}; typename enable_if<(! is_array<_Tp>::value), _Tp>::type = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>]’
1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a},
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1008 | std::forward<_Args>(__args)...);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/toby/goby3/build/include/goby/middleware/application/detail/thread_type_selector.h:47:44: required from ‘static std::shared_ptr<_Tp> goby::middleware::detail::ThreadTypeSelector<ThreadType, ThreadConfig, false, true>::thread(const ThreadConfig&, int) [with ThreadType = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>; ThreadConfig = goby::middleware::protobuf::UDPPointToPointConfig]’
47 | return std::make_shared<ThreadType>(cfg);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/toby/goby3/build/include/goby/middleware/application/multi_thread.h:472:100: required from ‘void goby::middleware::MultiThreadApplicationBase<Config, Transporter>::_launch_thread(int, const ThreadConfig&) [with ThreadType = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>; ThreadConfig = goby::middleware::protobuf::UDPPointToPointConfig; bool has_index = false; bool has_config = true; Config = goby::apps::zeromq::protobuf::MAVLinkGatewayConfig; Transporter = goby::middleware::InterVehicleForwarder<goby::zeromq::InterProcessPortalImplementation<goby::middleware::InterThreadTransporter, goby::middleware::InterProcessPortalBase, goby::zeromq::detail::InterProcessTag> >]’
472 | detail::ThreadTypeSelector<ThreadType, ThreadConfig, has_index, has_config>::thread(
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
473 | cfg, index));
| ~~~~~~~~~~~
/home/toby/goby3/build/include/goby/middleware/application/multi_thread.h:142:62: required from ‘void goby::middleware::MultiThreadApplicationBase<Config, Transporter>::launch_thread(const ThreadConfig&) [with ThreadType = goby::middleware::io::UDPThreadMAVLink<goby::middleware::io::groups::mavlink_raw_in, goby::middleware::io::groups::mavlink_raw_out, goby::middleware::io::PubSubLayer::INTERPROCESS, goby::middleware::io::PubSubLayer::INTERPROCESS>; ThreadConfig = goby::middleware::protobuf::UDPPointToPointConfig; Config = goby::apps::zeromq::protobuf::MAVLinkGatewayConfig; Transporter = goby::middleware::InterVehicleForwarder<goby::zeromq::InterProcessPortalImplementation<goby::middleware::InterThreadTransporter, goby::middleware::InterProcessPortalBase, goby::zeromq::detail::InterProcessTag> >]’
142 | _launch_thread<ThreadType, ThreadConfig, false, true>(-1, cfg);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/home/toby/goby3/src/apps/zeromq/mavlink_gateway/mavlink_gateway.cpp:101:41: required from here
101 | launch_thread<UDPThread>(cfg().udp());
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/toby/goby3/build/include/goby/middleware/io/udp_point_to_point.h:90:45: error: no matching function for call to ‘boost::asio::ip::basic_resolver<boost::asio::ip::udp>::resolve(<brace-enclosed initializer list>)’
90 | remote_endpoint_ = *resolver.resolve(
| ~~~~~~~~~~~~~~~~^
91 | {this->cfg().remote_address(), std::to_string(this->cfg().remote_port()),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92 | boost::asio::ip::resolver_query_base::numeric_service});
|
@copilot Please also fix this error from Boost 1.90 while maintaining backwards compatibility to Boost 1.74: |
Fixed in |
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/fd331cf1-8b48-49de-9d2e-48c533782afe Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/fd331cf1-8b48-49de-9d2e-48c533782afe Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
... Fixed in |
…cess library (not header-only after 1.86)
tsaubergine
left a comment
There was a problem hiding this comment.
In .circleci/config.yml add "trixie" (Debian 13) and "resolute" (Ubuntu 26.04). Update get-orig-source, etc. that currently use noble to use resolute.
|
@copilot Consolidate .circleci/docker/trixie/*/Dockerfile into a single parameterized Dockerfile in docker/trixie/Dockerfile. Provide a comment at the top how to build the three targets (base [amd64], arm64, armhf). Do the same for the resolute Dockerfiles. |
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/7a06f6a5-901c-4e8d-96a0-4bc76c72c58c Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Implemented in |
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/467d7307-b2ab-46d8-88e8-6568c3415fa5 Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Agent-Logs-Url: https://github.com/GobySoft/goby3/sessions/467d7307-b2ab-46d8-88e8-6568c3415fa5 Co-authored-by: tsaubergine <732276+tsaubergine@users.noreply.github.com>
Implemented in |
This PR updates Goby’s Boost-related compatibility for Boost 1.90+ while preserving backward compatibility with Boost 1.74, and also expands CircleCI distro coverage.
What was fixed
resolve(host, service, flags)APIs in affected call sites.goby_toolunified log conversion code to handle Boost.Process namespace differences by selectingboost::process::v1when available and falling back toboost::processfor older Boost versions..circleci/config.ymlto add:get-orig-sourceand related default noble-based CircleCI contexts to use resolute..circleci/docker/trixie/*/Dockerfile→.circleci/docker/trixie/Dockerfile.circleci/docker/resolute/*/Dockerfile→.circleci/docker/resolute/DockerfileTARGET_ARCHand added explicit validation for supported values (amd64,arm64,armhf).Validation
goby_mavlink_gatewaygoby_tool.circleci/config.ymlas YAML.