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.70 issues #1141

Open
Naville opened this issue May 15, 2019 · 5 comments
Open

Boost 1.70 issues #1141

Naville opened this issue May 15, 2019 · 5 comments

Comments

@Naville
Copy link

Naville commented May 15, 2019

Just a follow-up on #1054
This is seems to be an issue on boost side (interface changes it seems), however, it doesn't look like they plan to revert/fix it anytime soon.

In the comment section they prompted a few potential solutions: boostorg/asio@59066d80b26e

Can we merge them into cpprestsdk?

[23/159] Building CXX object Release/tests/functional/webso...kettest_utilities.dir/utilities/test_websocket_server.cpp.
FAILED: Release/tests/functional/websockets/CMakeFiles/websockettest_utilities.dir/utilities/test_websocket_server.cpp.o 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DCPPREST_FORCE_HTTP_CLIENT_ASIO -DCPPREST_FORCE_HTTP_LISTENER_ASIO -DWEBSOCKETTESTUTILITY_EXPORTS -DWEBSOCKET_UTILITY_API="__attribute__ ((visibility (\"default\")))" -Dwebsockettest_utilities_EXPORTS -I../Release/tests/common/UnitTestpp -I../Release/tests/common/utilities/include -I../Release/tests/functional/websockets/utilities -I../Release/include -I../Release/tests/common/UnitTestpp/. -I../Release/libs/websocketpp -isystem /usr/local/Cellar/openssl/1.0.2r/include -stdlib=libc++ -Wno-return-type-c-linkage -Wno-unneeded-internal-declaration -std=c++11 -fno-strict-aliasing -O3 -DNDEBUG -fPIC -MD -MT Release/tests/functional/websockets/CMakeFiles/websockettest_utilities.dir/utilities/test_websocket_server.cpp.o -MF Release/tests/functional/websockets/CMakeFiles/websockettest_utilities.dir/utilities/test_websocket_server.cpp.o.d -o Release/tests/functional/websockets/CMakeFiles/websockettest_utilities.dir/utilities/test_websocket_server.cpp.o -c ../Release/tests/functional/websockets/utilities/test_websocket_server.cpp
In file included from ../Release/tests/functional/websockets/utilities/test_websocket_server.cpp:35:
In file included from ../Release/libs/websocketpp/websocketpp/config/asio_no_tls.hpp:32:
In file included from ../Release/libs/websocketpp/websocketpp/transport/asio/endpoint.hpp:32:
In file included from ../Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp:31:
In file included from ../Release/libs/websocketpp/websocketpp/transport/asio/base.hpp:31:
In file included from ../Release/libs/websocketpp/websocketpp/common/asio.hpp:61:
In file included from /usr/local/include/boost/asio/steady_timer.hpp:22:
In file included from /usr/local/include/boost/asio/basic_waitable_timer.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:179:22: error: no member named 'context' in 'std::__1::reference_wrapper<boost::asio::io_context>'
    return executor_.context();
           ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function 'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void> >::context' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function 'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void> >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function 'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void> >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2103:18: note: in instantiation of function template specialization 'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:447:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2205:9: note: in instantiation of function template specialization 'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>, 1, false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:3618:16: note: in instantiation of function template specialization 'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4277:26: note: in instantiation of function template specialization 'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:4656:29: note: in instantiation of function template specialization 'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
../Release/libs/websocketpp/websocketpp/transport/asio/security/none.hpp:171:25: note: in instantiation of function template specialization 'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>, std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(
                        ^
In file included from ../Release/tests/functional/websockets/utilities/test_websocket_server.cpp:35:
In file included from ../Release/libs/websocketpp/websocketpp/config/asio_no_tls.hpp:32:
In file included from ../Release/libs/websocketpp/websocketpp/transport/asio/endpoint.hpp:32:
In file included from ../Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp:31:
In file included from ../Release/libs/websocketpp/websocketpp/transport/asio/base.hpp:31:
In file included from ../Release/libs/websocketpp/websocketpp/common/asio.hpp:61:
In file included from /usr/local/include/boost/asio/steady_timer.hpp:22:
In file included from /usr/local/include/boost/asio/basic_waitable_timer.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:169:15: error: no member named 'on_work_started' in 'std::__1::reference_wrapper<boost::asio::io_context>'
    executor_.on_work_started();
    ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function 'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void> >::on_work_started' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function 'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void> >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function 'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void> >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2103:18: note: in instantiation of function template specialization 'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:447:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:2205:9: note: in instantiation of function template specialization 'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>, 1, false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/memory:3618:16: note: in instantiation of function template specialization 'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^

@scpeters
Copy link

scpeters commented Jun 2, 2019

I believe these failures are coming from websocketpp, which is included as a git submodule in the following folder:

There is a potential fix in zaphoyd/websocketpp#814

@BattyBlogger
Copy link

Was this issue ever fixed? I just installed everything according to the instructions on OSX and it does not build because of these issues.

@Naville
Copy link
Author

Naville commented Jul 3, 2019

@BattyBlogger afaik, nope. You have to install Boost1.69 and older from source instead of 70

Croydon referenced this issue in bincrafters/conan-cpprestsdk Jul 25, 2019
@niclar
Copy link

niclar commented Oct 29, 2019

the develop branch of websocketpp works with boost 1.71

@AlexanderPaniutin
Copy link

AlexanderPaniutin commented Jan 27, 2020

Fails for 1.72

In file included from /Users/me/github/socket.io-client-cpp/src/internal/sio_client_impl.h:29:
In file included from /Users/me/github/socket.io-client-cpp/lib/websocketpp/websocketpp/config/asio_no_tls_client.hpp:32:
In file included from /Users/me/github/socket.io-client-cpp/lib/websocketpp/websocketpp/transport/asio/endpoint.hpp:32:
In file included from /Users/me/github/socket.io-client-cpp/lib/websocketpp/websocketpp/transport/asio/connection.hpp:46:
In file included from /Users/me/boost_1_72_0/boost/asio.hpp:24:
In file included from /Users/me/boost_1_72_0/boost/asio/basic_datagram_socket.hpp:20:
In file included from /Users/me/boost_1_72_0/boost/asio/basic_socket.hpp:27:
In file included from /Users/me/boost_1_72_0/boost/asio/executor.hpp:338:
/Users/apaniutin/boost_1_72_0/boost/asio/impl/executor.hpp:194:15: error: no member named 'defer' in 'std::__1::reference_wrapper<boost::asio::io_context>'
    executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
    ~~~~~~~~~ ^```

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