Skip to content

Uplift code for Boost 1.87.0+ (ignoring etcd backend or with patched cpprestsdk) #2041

@cho-m

Description

@cho-m

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.

self->server_ptr_->GetIOContext().post(
[self, root]() { self->doPersist(root); });


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

backoff_timer_->cancel(ec);

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions