Skip to content

Library does not work anymore with boost 1.87 #1157

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

Open
jcelerier opened this issue Dec 16, 2024 · 8 comments
Open

Library does not work anymore with boost 1.87 #1157

jcelerier opened this issue Dec 16, 2024 · 8 comments

Comments

@jcelerier
Copy link

jcelerier commented Dec 16, 2024

/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/config/asio_no_tls_client.hpp:32:
In file included from /home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/endpoint.hpp:32:
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:89:24: error: no type named 'io_service' in namespace 'websocketpp::lib::asio'
   89 |     typedef lib::asio::io_service * io_service_ptr;
      |             ~~~~~~~~~~~^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:91:40: error: no member named 'io_service' in namespace 'websocketpp::lib::asio'
   91 |     typedef lib::shared_ptr<lib::asio::io_service::strand> strand_ptr;
      |                             ~~~~~~~~~~~^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:321:17: error: no matching constructor for initialization of 'lib::asio::steady_timer' (aka 'basic_waitable_timer<chrono::steady_clock>')
  321 |             new lib::asio::steady_timer(
      |                 ^
  322 |                 *m_io_service,
      |                 ~~~~~~~~~~~~~~
  323 |                 lib::asio::milliseconds(duration))
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:327:45: error: member reference type 'strand_ptr' (aka 'int') is not a pointer
  327 |             new_timer->async_wait(m_strand->wrap(lib::bind(
      |                                   ~~~~~~~~  ^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:471:21: error: member reference base type 'strand_ptr' (aka 'int') is not a structure or union
  471 |             m_strand.reset(new lib::asio::io_service::strand(*io_service));
      |             ~~~~~~~~^~~~~~
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:471:43: error: 'io_service' is not a class, namespace, or enumeration
  471 |             m_strand.reset(new lib::asio::io_service::strand(*io_service));
      |                                           ^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:467:47: note: 'io_service' declared here
  467 |     lib::error_code init_asio (io_service_ptr io_service) {
      |                                               ^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:582:58: error: no member named 'expires_from_now' in 'boost::asio::basic_waitable_timer<std::chrono::steady_clock>'
  582 |             (post_timer && lib::asio::is_neg(post_timer->expires_from_now())))
      |                                              ~~~~~~~~~~~~^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:638:27: error: member reference type 'strand_ptr' (aka 'int') is not a pointer
  638 |                 m_strand->wrap(lib::bind(
      |                 ~~~~~~~~  ^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:721:27: error: member reference type 'strand_ptr' (aka 'int') is not a pointer
  721 |                 m_strand->wrap(lib::bind(
      |                 ~~~~~~~~  ^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:859:27: error: member reference type 'strand_ptr' (aka 'int') is not a pointer
  859 |                 m_strand->wrap(make_custom_alloc_handler(
      |                 ~~~~~~~~  ^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:928:27: error: member reference type 'strand_ptr' (aka 'int') is not a pointer
  928 |                 m_strand->wrap(make_custom_alloc_handler(
      |                 ~~~~~~~~  ^
/home/jcelerier/ossia/score/3rdparty/libossia/3rdparty/websocketpp/websocketpp/transport/asio/connection.hpp:968:27: error: member reference type 'strand_ptr' (aka 'int') is not a pointer
  968 |                 m_strand->wrap(make_custom_alloc_handler(
      |                 ~~~~~~~~  ^
@jcelerier
Copy link
Author

this branch has fixes if anyone's interested : https://github.com/jcelerier/websocketpp/tree/ossia/2024-12-18

@fwxnn
Copy link

fwxnn commented Jan 20, 2025

@jcelerier Good jods. But I have some bugs to report:

  1. Bug one: when I use cmake -DBUILD_EXAMPLES=ON .., it seems some old boost functions still exist. Therefore, it failed to compile;
  2. Bug two: there is some bug with void listen(std::string const & host, std::string const & service, lib::error_code & ec). When I use it, when I call start_accept, it leads to failure. However, other functions like void listen(uint16_t port) works well.

@jcelerier
Copy link
Author

what is your failure with start_accept ? do you have a repro ?

@toonetown
Copy link

I put up a PR that addresses this. Please see #1164 and provide feedback on if it works for you or not (I've not tested it in EVERY scenario possible...just the ones that I'm actually using in my product).

@amini-allight
Copy link

@toonetown That is actually my pull request, we created almost identical fixes for the issue within minutes of one another (you beat me by about 20 minutes 😄), yours is #1163

@toonetown
Copy link

@amini-allight - so funny! They were so similar I didn’t even realize that I linked the wrong PR in my message above! I like how we both were even pretty similar (and a little bit snarky) in our PR details… 😂

This project seems to be completely unmaintained (no activity at all on the develop branch in over 3 years and I haven’t come across any recent messages at all from the maintainer on the issue board), so it would probably be useful to have a single “reference” patch that can be used.

I will try to find time this weekend to review your PR and maybe we can reconcile any differences (I doubt there are many, if any) and if we can do so, I can close mine so there aren’t multiple PRs for the same issue. I also track a pretty “bleeding edge” code base (where “bleeding edge” really just means “doesn’t rely on APIs deprecated 8 years ago” 😂)…so from a personal perspective, it would be nice to also have a single patch that could potentially be updated in the case of future breakage as well.

@amini-allight
Copy link

amini-allight commented Feb 14, 2025

@toonetown Sounds great, I'll be happy to make any changes you advise!

@Dwokfur
Copy link

Dwokfur commented Mar 20, 2025

this branch has fixes if anyone's interested : https://github.com/jcelerier/websocketpp/tree/ossia/2024-12-18

Thank you so much! It's surprising this hasn't surfaced earlier. Relevant fixes must be ported IMHO.

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

5 participants