Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesnt build with boost 1.87, asio::io_service removed #2126

Closed
landryb opened this issue Nov 21, 2024 · 9 comments
Closed

doesnt build with boost 1.87, asio::io_service removed #2126

landryb opened this issue Nov 21, 2024 · 9 comments

Comments

@landryb
Copy link

landryb commented Nov 21, 2024

/tmp/pobj/i2pd-2.54.0/i2pd-2.54.0/build/../libi2pd/Timestamp.h:55:17: error: no type \
named 'io_service' in namespace 'boost::asio'  boost::asio::io_service m_Service;
                        ~~~~~~~~~~~~~^

the io_service API was deprecated a while ago, and io_context should be used instead. cf boostorg/asio#110

@orignal
Copy link
Contributor

orignal commented Nov 25, 2024

1.87 is still beta. If it's removed completely without a workaround it will break too many projects. However I will try to replace io_service by io_context anyway.

@lgv5
Copy link

lgv5 commented Nov 25, 2024

@orignal the amount of work required is quite a lot actually. The upside is that I'm taking care of it, at least in the context of patching 2.54.0 for OpenBSD (we currently have Boost 1.84.0 there, so the current patches aim to make it work for both 1.84.0 and 1.87.0). For a sneak peek, check https://gist.github.com/lgv5/1831ac7c10d6a7de5d8e7e9d825ad69f . That's missing at least changes for the resolver (doing that now).

Once it's ready, I can submit a PR.

@orignal
Copy link
Contributor

orignal commented Nov 25, 2024

Fixed in 3474538
Will check how "post" later.

@lgv5
Copy link

lgv5 commented Nov 25, 2024

@orignal the gist https://gist.github.com/lgv5/1831ac7c10d6a7de5d8e7e9d825ad69f includes all the work. I'm able to run i2pd 2.54.0 against Boost 1.84.0 and 1.87.0-beta1. The somewhat complete list of changes are:

  • boost::asio::io_service became boost::asio::io_context
  • boost::asio::io_service::work was removed
  • boost::asio::const_buffers_1 was removed
  • resolvers required a lot work (query was removed, some iterator was removed)
  • async_resolver required changes
  • io_service::post() is no more

I'll prepare a PR tomorrow.

@orignal
Copy link
Contributor

orignal commented Nov 25, 2024

Fixed with and tested with boost 1.87.
ffd18ba

@orignal orignal closed this as completed Nov 25, 2024
@orignal
Copy link
Contributor

orignal commented Nov 25, 2024

The somewhat complete list of changes are:

And few more.

@khumarahn
Copy link
Contributor

Hi! Are there any plans for a release where this is fixed, even if it is just 2.54.0 with a couple of extra commits?
I'm asking because I'm selfish: I want an easy way to close gentoo bug https://bugs.gentoo.org/946514

@orignal
Copy link
Contributor

orignal commented Dec 23, 2024

It's not "couple of extra commits". We will discuss.

@khumarahn
Copy link
Contributor

Thanks :-)

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

No branches or pull requests

4 participants