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

Compile error with boost 1.71 #843

Closed
jochenjagers opened this issue Oct 8, 2019 · 4 comments
Closed

Compile error with boost 1.71 #843

jochenjagers opened this issue Oct 8, 2019 · 4 comments

Comments

@jochenjagers
Copy link

Hello,

since Arch Linux updated boost to version 1.71, I'm not longer able to compile my application using websocketpp (Version 0.8.1). With boost 1.69 everything is working.

In file included from /usr/include/boost/asio/executor.hpp:338,
                 from /usr/include/boost/asio/basic_waitable_timer.hpp:27,
                 from /usr/include/boost/asio/steady_timer.hpp:22,
                 from /usr/include/websocketpp/common/asio.hpp:61,
                 from /usr/include/websocketpp/transport/asio/base.hpp:31,
                 from /usr/include/websocketpp/transport/asio/connection.hpp:31,
                 from /usr/include/websocketpp/transport/asio/endpoint.hpp:32,
                 from /usr/include/websocketpp/config/asio_no_tls.hpp:32,
                 from ...,

/usr/include/boost/asio/impl/executor.hpp: In instantiation of 'boost::asio::execution_context& boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::context() [with Executor = std::reference_wrapper<boost::asio::io_context>; Allocator = std::allocator<void>]':
/usr/include/boost/asio/impl/executor.hpp:177:22:   required from here
/usr/include/boost/asio/impl/executor.hpp:179:22: error: 'class std::reference_wrapper<boost::asio::io_context>' has no member named 'context'
  179 |     return executor_.context();
      |            ~~~~~~~~~~^~~~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of 'void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::on_work_started() [with Executor = std::reference_wrapper<boost::asio::io_context>; Allocator = std::allocator<void>]':
/usr/include/boost/asio/impl/executor.hpp:167:8:   required from here
/usr/include/boost/asio/impl/executor.hpp:169:15: error: 'class std::reference_wrapper<boost::asio::io_context>' has no member named 'on_work_started'
  169 |     executor_.on_work_started();
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of 'void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::on_work_finished() [with Executor = std::reference_wrapper<boost::asio::io_context>; Allocator = std::allocator<void>]':
/usr/include/boost/asio/impl/executor.hpp:172:8:   required from here
/usr/include/boost/asio/impl/executor.hpp:174:15: error: 'class std::reference_wrapper<boost::asio::io_context>' has no member named 'on_work_finished'
  174 |     executor_.on_work_finished();
      |     ~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of 'void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::dispatch(boost::asio::executor::function&&) [with Executor = std::reference_wrapper<boost::asio::io_context>; Allocator = std::allocator<void>]':
/usr/include/boost/asio/impl/executor.hpp:182:8:   required from here
/usr/include/boost/asio/impl/executor.hpp:184:15: error: 'class std::reference_wrapper<boost::asio::io_context>' has no member named 'dispatch'
  184 |     executor_.dispatch(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
      |     ~~~~~~~~~~^~~~~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of 'void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::post(boost::asio::executor::function&&) [with Executor = std::reference_wrapper<boost::asio::io_context>; Allocator = std::allocator<void>]':
/usr/include/boost/asio/impl/executor.hpp:187:8:   required from here
/usr/include/boost/asio/impl/executor.hpp:189:15: error: 'class std::reference_wrapper<boost::asio::io_context>' has no member named 'post'
  189 |     executor_.post(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
      |     ~~~~~~~~~~^~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of 'void boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::defer(boost::asio::executor::function&&) [with Executor = std::reference_wrapper<boost::asio::io_context>; Allocator = std::allocator<void>]':
/usr/include/boost/asio/impl/executor.hpp:192:8:   required from here
/usr/include/boost/asio/impl/executor.hpp:194:15: error: 'class std::reference_wrapper<boost::asio::io_context>' has no member named 'defer'
  194 |     executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
      |     ~~~~~~~~~~^~~~~
/usr/include/boost/asio/impl/executor.hpp: In instantiation of 'bool boost::asio::executor::impl< <template-parameter-1-1>, <template-parameter-1-2> >::equals(const boost::asio::executor::impl_base*) const [with Executor = std::reference_wrapper<boost::asio::io_context>; Allocator = std::allocator<void>]':
/usr/include/boost/asio/impl/executor.hpp:212:8:   required from here
/usr/include/boost/asio/impl/executor.hpp:218:22: error: no match for 'operator==' (operand types are 'const std::reference_wrapper<boost::asio::io_context>' and 'const std::reference_wrapper<boost::asio::io_context>')
  218 |     return executor_ == *static_cast<const Executor*>(e->target());
      |            ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Greetings,
Jochen

@AlastairGrowcott
Copy link

AlastairGrowcott commented Oct 11, 2019

This is a duplicate. See also #794. This has links to the same issue in many dependent projects,

That issue was 8 months ago. Maybe it was fixed in the development branch which I see is still active. There are pull requests going back years that have apparently had no attention, so who knows.

@ahmadov
Copy link

ahmadov commented Oct 12, 2019

I also had the same problem on Arch Linux. Seems the only way to fix the issue is downgrading the boost-libs and boost. I downgraded the packages and it worked.

First, you have to downgrade boost-libs then boost package. Downgrading the packages can be done with these commands:
boost-libs: pacman -U https://archive.archlinux.org/packages/b/boost-libs/boost-libs-1.69.0-2-x86_64.pkg.tar.xz

boost: pacman -U https://archive.archlinux.org/packages/b/boost/boost-1.69.0-2-x86_64.pkg.tar.xz

@jochenjagers
Copy link
Author

Thanks for the hints. But downgrading boost brings many other proglems.
I took over the aur package websockerpp-git-dev which installs the current development version of websocketpp. It works fine with the actual boost version.

https://aur.archlinux.org/packages/websocketpp-git-dev/

@zaphoyd
Copy link
Owner

zaphoyd commented Apr 19, 2020

The fix for this issue has been available on the develop branch for some time and has now been published in release 0.8.2

@zaphoyd zaphoyd closed this as completed Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants