Hello,
asio started failing to build with gcc-14 [1]. The error is:
make[2]: Entering directory
'/builddir/build/BUILD/asio-1.28.1/src/examples/cpp14'
g++ -DPACKAGE_NAME=\"asio\" -DPACKAGE_TARNAME=\"asio\"
-DPACKAGE_VERSION=\"1.28.1\" -DPACKAGE_STRING=\"asio\ 1.28.1\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"asio\"
-DVERSION=\"1.28.1\" -D_REENTRANT=1 -I. -DASIO_STANDALONE
-I./../../../include -O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -pthread
-ftemplate-depth-256 -c -o operations/composed_5.o operations/composed_5.cpp
operations/composed_5.cpp: In instantiation of ‘struct
async_write_message<int, test_callback()::<lambda(const
std::error_code&)> >(asio::ip::tcp::socket&, const int&,
test_callback()::<lambda(const std::error_code&)>&&)::<lambda(auto:2&&,
asio::ip::tcp::socket&, std::unique_ptr<std::__cxx11::basic_string<char>
>)>::intermediate_completion_handler’:
operations/composed_5.cpp:149:5: required from ‘auto
async_write_message(asio::ip::tcp::socket&, const T&, CompletionToken&&)
[with T = int; CompletionToken = test_callback()::<lambda(const
std::error_code&)>; asio::ip::tcp::socket =
asio::basic_stream_socket<asio::ip::tcp>]’
149 | };
| ^
operations/composed_5.cpp:196:22: required from here
196 | async_write_message(socket, 123456,
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
197 | [](const std::error_code& error)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
198 | {
| ~
199 | if (!error)
| ~~~~~~~~~~~
200 | {
| ~
201 | std::cout << "Message sent\n";
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202 | }
| ~
203 | else
| ~~~~
204 | {
| ~
205 | std::cout << "Error: " << error.message() << "\n";
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206 | }
| ~
207 | });
| ~~
operations/composed_5.cpp:101:63: error:
‘async_write_message(asio::ip::tcp::socket&, const T&,
CompletionToken&&)::<lambda(auto:2&&, asio::ip::tcp::socket&,
std::unique_ptr<std::__cxx11::basic_string<char>
>)>::intermediate_completion_handler::handler_’ has incomplete type
101 | typename std::decay<decltype(completion_handler)>::type
handler_;
| ^~~~~~~~
operations/composed_5.cpp:101:63: error: invalid use of dependent type
‘typename std::decay<decltype (completion_handler)>::type’
operations/composed_5.cpp: In instantiation of ‘struct
async_write_message<std::__cxx11::basic_string<char>, const
asio::deferred_t&>(asio::ip::tcp::socket&, const
std::__cxx11::basic_string<char>&, const
asio::deferred_t&)::<lambda(auto:2&&, asio::ip::tcp::socket&,
std::unique_ptr<std::__cxx11::basic_string<char>
>)>::intermediate_completion_handler’:
operations/composed_5.cpp:149:5: required from ‘auto
async_write_message(asio::ip::tcp::socket&, const T&, CompletionToken&&)
[with T = std::__cxx11::basic_string<char>; CompletionToken = const
asio::deferred_t&; asio::ip::tcp::socket =
asio::basic_stream_socket<asio::ip::tcp>]’
operations/composed_5.cpp:101:63: error: 149 | };
operations/composed_5.cpp:101:63: error: | ^
operations/composed_5.cpp:225:32: required from here
operations/composed_5.cpp:101:63: error: 225 | auto op =
async_write_message(socket,
operations/composed_5.cpp:101:63: error: | ~~~~~~~~~~~~~~~~~~~^~~~~~~~
226 | std::string("abcdef"), asio::deferred);
operations/composed_5.cpp:101:63: error: |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
operations/composed_5.cpp:101:63: error:
‘async_write_message(asio::ip::tcp::socket&, const T&,
CompletionToken&&)::<lambda(auto:2&&, asio::ip::tcp::socket&,
std::unique_ptr<std::__cxx11::basic_string<char>
>)>::intermediate_completion_handler::handler_’ has incomplete type
101 | typename std::decay<decltype(completion_handler)>::type
handler_;
| ^~~~~~~~
operations/composed_5.cpp:101:63: error: invalid use of dependent type
‘typename std::decay<decltype (completion_handler)>::type’
operations/composed_5.cpp: In instantiation of ‘struct
async_write_message<double, const
asio::use_future_t<>&>(asio::ip::tcp::socket&, const double&, const
asio::use_future_t<>&)::<lambda(auto:2&&, asio::ip::tcp::socket&,
std::unique_ptr<std::__cxx11::basic_string<char>
>)>::intermediate_completion_handler’:
operations/composed_5.cpp:149:5: required from ‘auto
async_write_message(asio::ip::tcp::socket&, const T&, CompletionToken&&)
[with T = double; CompletionToken = const asio::use_future_t<>&;
asio::ip::tcp::socket = asio::basic_stream_socket<asio::ip::tcp>]’
operations/composed_5.cpp:101:63: error: 149 | };
operations/composed_5.cpp:101:63: error: | ^
operations/composed_5.cpp:257:44: required from here
operations/composed_5.cpp:101:63: error: 257 | std::future<void> f =
async_write_message(
operations/composed_5.cpp:101:63: error: | ~~~~~~~~~~~~~~~~~~~^
258 | socket, 654.321, asio::use_future);
operations/composed_5.cpp:101:63: error: |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
operations/composed_5.cpp:101:63: error:
‘async_write_message(asio::ip::tcp::socket&, const T&,
CompletionToken&&)::<lambda(auto:2&&, asio::ip::tcp::socket&,
std::unique_ptr<std::__cxx11::basic_string<char>
>)>::intermediate_completion_handler::handler_’ has incomplete type
101 | typename std::decay<decltype(completion_handler)>::type
handler_;
| ^~~~~~~~
operations/composed_5.cpp:101:63: error: invalid use of dependent type
‘typename std::decay<decltype (completion_handler)>::type’
make[2]: *** [Makefile:1066: operations/composed_5.o] Error 1
make[2]: Leaving directory
'/builddir/build/BUILD/asio-1.28.1/src/examples/cpp14'
make[2]: *** Waiting for unfinished jobs....
I tried including <algorithm> but it did not help. Not sure what else to
try.
Best regards,
Julian
[1] https://koschei.fedoraproject.org/build/17078532
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue