Visitar URL original
Does not compile with Boost 1.70 and newer · Issue #875 · cpp-netlib/cpp-netlib · GitHub
Skip to content

Does not compile with Boost 1.70 and newer #875

Description

@vitakot

https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/history.html

Removed the deprecated member functions named io_service(). The get_io_service() member functions should be used instead.

Activity

  1. mihikjw commented on Jul 18, 2019

    @mihikjw

    Hi, is anyone able to provide feedback on this issue, or at least provide the correct version of Boost?

    I'm also unable to get the latest pull from github to compile with Boost 1_70_0, quoting not being able to find asio/tcp.hpp from boost/network/protocol/http/client/connection/normal_delegate.ipp:12:10.

    I couldn't see a specific supported Boost version in the docs, only that it was a requirement.

  2. enricodetoma commented on Aug 8, 2019

    @enricodetoma

    I made pull request #878 to address this problem

  3. oddvardm commented on Oct 10, 2019

    @oddvardm

    This library is seriously broken. I have now tried to use it with windows 10 and it is so screwed up it will not compile at all. Have spent 4 days going through CMake & diffrent versions of Boost & finaly gave up. I know that this is volunteer work, but it was reported almost 4 mounth ago. Please fix it or update document page with a installation procedure that works with Visual Studio & CMake.

  4. enricodetoma commented on Oct 10, 2019

    @enricodetoma

    I use branch 0.13-release with Boost 1.70, Visual Studio 2017, cmake 3.15.1 and it's not broken at all.

  5. oddvardm commented on Oct 10, 2019

    @oddvardm
  6. enricodetoma commented on Oct 10, 2019

    @enricodetoma

    cxxopts is a dependancy.
    Did you tell git to pull the dependancies too?

    Also, did you try with branch 0.13-release instead of master?
    In the past I had problems with master (don't remember exactly, it was quite some time ago), so I used originally branch 0.12-release and now 0.13-release

  7. oddvardm commented on Oct 10, 2019

    @oddvardm
  8. enricodetoma commented on Oct 10, 2019

    @enricodetoma

    I see that I'm not building examples nor tests.
    Probably some months ago I had problems with them, so I disabled them in CMake-gui.
    The library itself works correctly with http(s) (I only need http(s) in my project).

  9. oddvardm commented on Oct 10, 2019

    @oddvardm
  10. oddvardm commented on Oct 11, 2019

    @oddvardm
  11. oddvardm commented on Oct 11, 2019

    @oddvardm
  12. enricodetoma commented on Oct 11, 2019

    @enricodetoma

    About OpenSSL: using CMake-gui I put both OPEN_SSL_INCLUDE_DIR, SSL_EAY_RELEASE (full path to libssl.lib) and LIB_EAY_RELEASE (full path to libcrypto.lib) and it finds it correctly.

    About boost 1.71: please pull latest branch 0.13-release, not master. I submitted a patch to make it work with boost >= 1.70 (where get_io_service was removed). I see that the patch has not been merged in master yet.

  13. oddvardm commented on Oct 11, 2019

    @oddvardm
  14. oddvardm commented on Oct 11, 2019

    @oddvardm
  15. oddvardm commented on Oct 11, 2019

    @oddvardm
  16. enricodetoma commented on Oct 11, 2019

    @enricodetoma

    Clone from standard link, then switch locally to 0.13-release branch. Don't download the zip, or you won't have the dependancies.

  17. enricodetoma commented on Oct 11, 2019

    @enricodetoma

    Source directory is where you cloned the project. For build directory I usually put {source dir}/build but it's your choice.

  18. oddvardm commented on Oct 11, 2019

    @oddvardm
  19. oddvardm commented on Oct 11, 2019

    @oddvardm
  20. vitakot commented on Oct 11, 2019

    @vitakot
    Author

    I switched to Boost Beast library. It is better designed, much more powerful (WebSockets support) and just works. Of course I had to rewrite my request handlers, but it wasn't a big deal.

    Cpp-netlib is a great library and was indispensable before the Boot Beast release which made it obsolete.

  21. oddvardm commented on Oct 11, 2019

    @oddvardm
  22. vitakot commented on Oct 11, 2019

    @vitakot
    Author

    Europe, Czech Republic, Brno city.

  23. oddvardm commented on Oct 11, 2019

    @oddvardm
  24. oddvardm commented on Oct 12, 2019

    @oddvardm
  25. Plaristote commented on Jan 30, 2020

    @Plaristote

    Let's get back on topic: cpp-netlib still does not compile with Boost 1.72.
    The header boost/asio/stream_socket_service.hpp has been moved or removed, resulting in compilation errors in boost/network/protocol/stream_handler.hpp.

    Removing line 22 in stream_handler.hpp is enough to fix the issue for me.

  26. Plaristote commented on Apr 8, 2020

    @Plaristote

    Back on this issue, it turns out these modifications weren't enough. It was enough for my http server, but not for my clients.
    Seems like uses of io_service should sometimes be replaced by io_context. There's at least one instance of that issue happening in stream_handler.hpp at line 54 (after removal of line 22). I unfortunately can't probe this issue any longer for today. I'll do my best to try and fix this in the following weeks, but I'm no asio expert, so don't take my work for it.

    Note to self (or others who might be interested in fixing this), the following might be relevant:
    https://stackoverflow.com/questions/56225374/alternative-to-missing-method-in-last-version-of-boost-asio-library

  27. TeaObvious commented on May 1, 2020

    @TeaObvious

    For those that want to run cpp-netlib 0.13.0 with Boost >= 1.70 i have created a quick and maybe dirty patch to get the clients working that is only tested for my use case, so be aware it might not solve your problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions