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

Boost 1.87.0 breaks the build #5766

Open
4 tasks done
brian6932 opened this issue Dec 12, 2024 · 6 comments
Open
4 tasks done

Boost 1.87.0 breaks the build #5766

brian6932 opened this issue Dec 12, 2024 · 6 comments
Labels
issue-report An issue reported by a user.

Comments

@brian6932
Copy link
Contributor

brian6932 commented Dec 12, 2024

Checklist

  • I'm reporting a problem with Chatterino
  • I've verified that I'm running the most recent nightly build or stable release
  • I've looked for my problem on the wiki
  • I've searched the issues and pull requests for similar looking reports

Describe your issue

1.86.0 and below have no such issues.

websocketpp
src/providers/twitch/PubSubManager.hpp(8): fatal error C1083: Cannot open include file: 'boost/asio/io_service.hpp': No such file or directory
lib/websocketpp/websocketpp/transport/asio/connection.hpp(89): error C2039: 'io_service': is not a member of 'websocketpp::lib::asio'
lib/websocketpp/websocketpp/common/asio.hpp(94): note: see declaration of 'websocketpp::lib::asio'
lib/websocketpp/websocketpp/transport/asio/endpoint.hpp(1109): error C2039: 'expires_from_now': is not a member of 'boost::asio::basic_waitable_timer<std::chrono::steady_clock,boost::asio::wait_traits<Clock>,boost::asio::any_io_executor>'
boost/1.87.0/boost/asio/basic_waitable_timer.hpp(140): note: see declaration of 'boost::asio::basic_waitable_timer<std::chrono::steady_clock,boost::asio::wait_traits<Clock>,boost::asio::any_io_executor>'
lib/websocketpp/websocketpp/transport/asio/endpoint.hpp(89): error C2039: 'work': is not a member of 'boost::asio::io_context'
lib/websocketpp/websocketpp/transport/asio/endpoint.hpp(998): error C2039: 'iterator': is not a member of 'boost::asio::ip::basic_resolver<boost::asio::ip::tcp,boost::asio::any_io_executor>'
miniaudio
src/controllers/sound/MiniaudioBackend.cpp(276): error C2039: 'expires_from_now': is not a member of 'boost::asio::basic_waitable_timer<std::chrono::steady_clock,boost::asio::wait_traits<Clock>,boost::asio::any_io_executor>'
boost/1.87.0/boost/asio/basic_waitable_timer.hpp(140): note: see declaration of 'boost::asio::basic_waitable_timer<std::chrono::steady_clock,boost::asio::wait_traits<Clock>,boost::asio::any_io_executor>'

https://www.boost.org/doc/libs/1_86_0/boost/asio/io_service.hpp -> https://www.boost.org/doc/libs/1_87_0/boost/asio/io_service.hpp

https://live.boost.org/doc/libs/1_86_0/doc/html/boost_asio/reference/io_context__work.html -> https://live.boost.org/doc/libs/1_87_0/doc/html/boost_asio/reference/executor_work_guard.html

https://www.boost.org/doc/libs/1_86_0/doc/html/boost_asio/reference/ip__basic_resolver/iterator.html

https://www.boost.org/doc/libs/1_86_0/doc/html/boost_asio/reference/ip__basic_resolver/query.html

https://www.boost.org/doc/libs/1_86_0/doc/html/boost_asio/reference/basic_waitable_timer/expires_from_now.html -> https://www.boost.org/doc/libs/1_87_0/doc/html/boost_asio/reference/basic_waitable_timer/expires_after.html & https://www.boost.org/doc/libs/1_87_0/doc/html/boost_asio/reference/basic_waitable_timer/expiry.html

I have attempted to fix some of these issues on https://github.com/brian6932/chatterino2/tree/fix/boost-1.87.0 & https://github.com/brian6932/websocketpp/tree/fix/boost-1.87.0, but the deprecation of boost::ip::basic_resolver::iterator seems like a bit more than I can handle, so if anyone wants write access to either of the repos, or wants ownership of the latter one transferred to them, let me know.

Screenshots

No response

OS and Chatterino Version

Not relevant

@brian6932 brian6932 added the issue-report An issue reported by a user. label Dec 12, 2024
@brian6932 brian6932 changed the title Boost 1.87.0 breaks the build (boost/asio/io_service.hpp missing) Boost 1.87.0 breaks the build Dec 13, 2024
@Nerixyz
Copy link
Contributor

Nerixyz commented Dec 13, 2024

I don't think it's likely that websocketpp will be updated in the near future (maybe a breaking boost version gets them to do so). We should probably move to Boost.Beast.

@Nerixyz
Copy link
Contributor

Nerixyz commented Dec 13, 2024

I made it compile and it passes our tests:

@Mm2PL
Copy link
Collaborator

Mm2PL commented Dec 17, 2024

Ideally I would love for us to stop depending on a library that just breaks our dependencies. There is QWebSocket we could use instead of this mess.

@Nerixyz
Copy link
Contributor

Nerixyz commented Dec 17, 2024

Ideally I would love for us to stop depending on a library that just breaks our dependencies. There is QWebSocket we could use instead of this mess.

I think the general plan is to move to Boost.Beast. The EventSub implementation uses that already. To avoid code duplication, I'd love to have some higher-level wrapper around Boost.Beast. A kind-of websocket pool, since that's what we want in most cases (ideally, plugins could use that as well).

Qt Websockets have one, in my opinion major, drawback: they force you to use UTF16 for text. But we never actually want UTF16, because we're always sending JSON in UTF8. So by using Qt's websockets, we'd have to transcode UTF8 -> UTF16 -> UTF8 both for sending and receiving messages. Especially with EventSub this is suboptimal. A nice feature of them is that we get HTTP and SOCKS proxying for "free".

@brian6932
Copy link
Contributor Author

If dependence on Boost is unwanted, and UTF8 writing is, there's also https://github.com/machinezone/IXWebSocket.

@Nerixyz
Copy link
Contributor

Nerixyz commented Dec 18, 2024

If dependence on Boost is unwanted, and UTF8 writing is, there's also machinezone/IXWebSocket.

We don't want to drop Boost, and IXWebSocket does not have proxy support at all (https://redirect.github.com/machinezone/IXWebSocket/issues/253).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue-report An issue reported by a user.
Projects
None yet
Development

No branches or pull requests

3 participants