Skip to content

Support boost libraries >= 1.84#29

Merged
mutability merged 2 commits intodevfrom
boost-asio-deprecation
Mar 31, 2026
Merged

Support boost libraries >= 1.84#29
mutability merged 2 commits intodevfrom
boost-asio-deprecation

Conversation

@mutability
Copy link
Copy Markdown
Collaborator

@mutability mutability commented Mar 31, 2026

dump978 fails to build against newer Boost versions for a couple of reasons:

boost::asio starting from Boost 1.84 begins to remove support for older deprecated APIs that were used in dump978. Replace the deprecated APIs with the newer versions, and build with BOOST_ASIO_NO_DEPRECATED defined to provoke errors on older boost versions if any deprecated APIs were missed.

Boost >= 1.89 removes libboost_system entirely. The release notes say that Boost.System has been header-only since 1.69, which predates the oldest Debian version we try to build for (bullseye), so just assume that we have >=1.69 and don't try to link against libboost_system at all.

Newer boost versions entirely remove the deprecated APIs, so let's fix
them now:

 io_service -> io_context
 expires_from_now -> expires_after
 post/dispatch method become free functions
 strand wrap() -> bind_executor
 resolver changes that don't fit in this margin

Building with BOOST_ASIO_NO_DEPRECATED makes the deprecated API
unavailable even in older Boost versions, so set that to provoke errors
if the old API is used at all.
Boost.System "has been header-only since 1.69", and the stub library was
removed in 1.89 which breaks trying to link to the (now nonexistent)
libboost_system.

Rather than trying to detect the boost version, just assume that we have
at least 1.69 and remove the link dependency entirely. The oldest Debian
version we expect to compile against (bullseye) has 1.74 so should be
okay.
@mutability mutability merged commit 86060a0 into dev Mar 31, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant