Skip to content

Fix for Boost 1.87#1

Open
Sirius902 wants to merge 1 commit intoblack-sliver:mainfrom
Sirius902:main
Open

Fix for Boost 1.87#1
Sirius902 wants to merge 1 commit intoblack-sliver:mainfrom
Sirius902:main

Conversation

@Sirius902
Copy link
Copy Markdown

Fixes compilation with Boost after the 1.87 update. Tested with Ship of Harkinian Archipelago Alpha. Would probably make sense to merge this after zaphoyd/websocketpp#1164 if that happens but I'm not sure if it will.

@black-sliver
Copy link
Copy Markdown
Owner

black-sliver commented Dec 13, 2025

Hm, in PopTracker I already use a custom websocketpp to allow mixing it with asio 1.30.2 and C++20-compilers.

I think everything newer than 1.30.2 entails the same problems that you ran into with boost 1.87.

Maybe we should fork websocketpp? How do you handle it for SoH?

Do you happen to know what the minimum version of asio and boost is with the change so we can write it into the README?

@Sirius902
Copy link
Copy Markdown
Author

Sirius902 commented Dec 13, 2025

I believe in SoH AP (still in a secondary branch) there's not anything special done currently and they just expect you to have the correct Boost or asio installed. In my case though it's a bit different because I run NixOS and when I wanted to create a Nix derivation for SoH AP I needed to apply a patch for wswrap. It seems in nixpkgs they have Boost/asio current and have a patch applied for websocketpp so that it works for newer asio. Maybe a fork with this patch applied would be appropriate (or with your custom version you already have).

Here's an excerpt from the PR that updated asio in nixpkgs explaining the change and the version information:

  • asio (standalone version of boost::asio) has been updated from 1.24.0 to 1.36.0. Some breaking changes were introduced between these
    two versions, and the one affected most was the removal of asio::io_service in favor of asio::io_context in 1.33.0. asio_1_32_0 is
    retained for packages that have not completed migration. asio_1_10 has been removed as no packages depend on it anymore.
    asio also no longer propagates boost as it is used independent from boost in most cases.

@black-sliver
Copy link
Copy Markdown
Owner

So I think we need to figure out what the minimum version of asio and boost are to support io_context and expires_after and put that in the README. Ideally as part of this PR.

LMK if you want to take on the task of digging through changelogs or if I should do it.

or with your custom version you already have

That one does not work with latest boost and asio.
So if we fork it for use as a submodule, I think I'd either look at nixos or arch linux and copy what they are doing, but we can't really put that into wswrap itself because the app using it might already depend on (a different version of) websocketpp.

@black-sliver
Copy link
Copy Markdown
Owner

So, it appears that the new code requires
asio 1.11.0 or newer, or
boost 1.66.0 or newer

@Sirius902
Copy link
Copy Markdown
Author

So, it appears that the new code requires asio 1.11.0 or newer, or boost 1.66.0 or newer

Got it, thank you for looking into it!

So I think we need to figure out what the minimum version of asio and boost are to support io_context and expires_after and put that in the README. Ideally as part of this PR.

LMK if you want to take on the task of digging through changelogs or if I should do it.

or with your custom version you already have

That one does not work with latest boost and asio. So if we fork it for use as a submodule, I think I'd either look at nixos or arch linux and copy what they are doing, but we can't really put that into wswrap itself because the app using it might already depend on (a different version of) websocketpp.

Maybe then the best approach would be to use some sort of Boost or asio version macro if that exists to choose whether to use asio::io_service vs asio::io_context and expires_from_now vs async_wait? That way the user could choose to use a patched or unpatched version of websocketpp / old or new Boost. In the case of NixOS this would work out since it has new Boost + a patched websocketpp already in nixpkgs.

@black-sliver
Copy link
Copy Markdown
Owner

I think we just need to document it since the versions are kinda old, but it may be a breaking change for a downstream project.

I can work on this over the next couple of days, I hope.

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.

2 participants