v6d
v6d copied to clipboard
Uplift code for Boost 1.87.0+ (ignoring etcd backend or with patched cpprestsdk)
In Boost 1.87.0 the old Boost.Asio interfaces at https://www.boost.org/doc/libs/1_87_0/doc/html/boost_asio/net_ts.html were removed.
This leads to build failures due to usage of io_service::post which needs to be updated to boost::asio::post, e.g.
https://github.com/v6d-io/v6d/blob/fa7f6907b4995fb8570a881fdc18e44bd57ef848/src/server/async/socket_server.cc#L1189-L1190
The issue specifically mentions without etcd backend as that feature requires cpprestsdk which hasn't been updated (and may never get support given maintenance mode status).
It is possible to build etcd backend with Boost 1.87.0 if using vcpkg or applying their patch - https://github.com/microsoft/vcpkg/blob/master/ports/cpprestsdk/fix-asio-error.patch
I am able to build by find-replacing post usage and removing argument at https://github.com/v6d-io/v6d/blob/fa7f6907b4995fb8570a881fdc18e44bd57ef848/src/server/services/etcd_meta_service.cc#L142
However, in order to support Boost < 1.66.0, this will probably need additional compatibility code like what is done in https://github.com/v6d-io/v6d/blob/main/src/common/util/asio.h
EDIT: With release of Boost 1.88.0, the Boost.Process code fails to build as the headers are now for v2 API rather than v1. This will need a compatibility header too.