beast icon indicating copy to clipboard operation
beast copied to clipboard

Compilation issues with gnu compiler version 11.1

Open daverio opened this issue 3 years ago • 3 comments

First: Thanks for Beast!

So we just move to the gnu compiler 11.1. And beast does not compile. (everything is fine up to 10.3)

The errors i get are:

/usr/include/boost/beast/websocket/impl/stream_impl.hpp: In instantiation of ‘boost::beast::websocket::stream< , >::impl_type::impl_type(Args&& ...) [with Args = {boost::asio::io_context&, boost::asio::ssl::context&}; NextLayer = boost::asio::ssl::stream<boost::asio::basic_stream_socketboost::asio::ip::tcp >; bool deflateSupported = true]’: /usr/include/boost/smart_ptr/make_shared_object.hpp:256:5: required from ‘typename boost::detail::sp_if_not_array<T>::type boost::make_shared(Args&& ...) [with T = boost::beast::websocket::stream<boost::asio::ssl::stream<boost::asio::basic_stream_socketboost::asio::ip::tcp > >::impl_type; Args = {boost::asio::io_context&, boost::asio::ssl::context&}; typename boost::detail::sp_if_not_array<T>::type = boost::shared_ptr<boost::beast::websocket::stream<boost::asio::ssl::stream<boost::asio::basic_stream_socketboost::asio::ip::tcp > >::impl_type>]’ /usr/include/boost/beast/websocket/impl/stream.hpp:54:42: required from ‘boost::beast::websocket::stream< , >::stream(Args&& ...) [with Args = {boost::asio::io_context&, boost::asio::ssl::context&}; NextLayer = boost::asio::ssl::stream<boost::asio::basic_stream_socketboost::asio::ip::tcp >; bool deflateSupported = true]’ /home/daverio/Documents/silverboy/code/src/forwardsdata/book_keeper.cpp:40:81: required from here /usr/include/boost/beast/websocket/impl/stream_impl.hpp:135:45: error: ‘static boost::beast::websocket::stream_base::duration boost::beast::websocket::stream_base::none()’ is inaccessible within this context 135 | timeout_opt.handshake_timeout = none(); | ~~~~^~ In file included from /usr/include/boost/beast/websocket/stream.hpp:17, from /usr/include/boost/beast/websocket.hpp:18, from /home/daverio/Documents/silverboy/code/src/forwardsdata/book_keeper.hpp:9, from /home/daverio/Documents/silverboy/code/src/forwardsdata/book_keeper.cpp:1: /usr/include/boost/beast/websocket/stream_base.hpp:46:5: note: declared here 46 | none() noexcept

Basically I got similar error (inaccessibility of none() define in /usr/include/boost/beast/websocket/stream_base.hpp:46) everywhere its used.

Then also: /usr/include/boost/beast/core/impl/basic_stream.hpp:138:9: error: ‘static boost::beast::detail::stream_base::time_point boost::beast::detail::stream_base::never()’ is inaccessible within this context

If someone have a clue how to solve it.. would be great!

daverio avatar Jun 11 '21 09:06 daverio

Please kindly share the entire command line that is being used to compile this code.

Is there any way you can provide me with a minimal example on godbolt.org to demonstrate the issue?

madmongo1 avatar Jun 11 '21 09:06 madmongo1

For example: https://godbolt.org/z/z8jT5zPdj

madmongo1 avatar Jun 11 '21 09:06 madmongo1

This issue has been open for a while with no activity, has it been resolved?

stale[bot] avatar Jan 09 '22 04:01 stale[bot]

@daverio feel free to reopen with the compiler invocation.

klemens-morgenstern avatar Sep 24 '22 05:09 klemens-morgenstern