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

Build error by using aarch64-poky-linux-gcc 12.2.0 2022 on otbr-web #1729

Closed
TE-N-ElvenWang opened this issue Jan 26, 2023 · 1 comment
Closed

Comments

@TE-N-ElvenWang
Copy link
Contributor

The otbr-web using Simple-Web-Server.
With older aarch64 poky gcc there don't have any build error. But when use 2022 aarch64 poky linux gcc, will see below build error:
In file included from /home/haoran/matter/ot-br-posix/src/web/web-service/web_server.cpp:42:
/home/haoran/matter/ot-br-posix/third_party/Simple-web-server/repo/server_http.hpp: In instantiation of ‘SimpleWeb::ServerBase<socket_type>::Request::Request(const s
ocket_type&) [with socket_type = boost::asio::basic_stream_socketboost::asio::ip::tcp]’:
/home/haoran/matter/ot-br-posix/third_party/Simple-web-server/repo/server_http.hpp:460:74: required from here
/home/haoran/matter/ot-br-posix/third_party/Simple-web-server/repo/server_http.hpp:125:36: error: ‘SimpleWeb::ServerBase<boost::asio::basic_stream_socket<boost::asio
::ip::tcp> >::Request::streambuf’ will be initialized after [-Werror=reorder]
125 | boost::asio::streambuf streambuf; | ^~~~~~~~~
compilation terminated due to -Wfatal-errors.

@TE-N-ElvenWang
Copy link
Contributor Author

found a fix:
[web] bump to latest Simple-Web-Server version (#1667)

Bump Simple-Web-Server to the latest git commit. This fixes a compile
issue seen with GCC 12.2.0:

In file included from /home/sag/projects/openthread/ot-br-posix/src/web/web-service/web_server.cpp:42: /home/sag/projects/openthread/ot-br-posix/third_party/Simple-web-server/repo/server_http.hpp: In instantiation of ‘SimpleWeb::ServerBase<socket_type>::Request::Request(const socket_type&) [with socket_type = boost::asio::basic_stream_socket<boost::asio::ip::tcp>]’:
/home/sag/projects/openthread/ot-br-posix/third_party/Simple-web-server/repo/server_http.hpp:460:74:   required from here
/home/sag/projects/openthread/ot-br-posix/third_party/Simple-web-server/repo/server_http.hpp:119:57: error: member ‘SimpleWeb::ServerBase<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >::Request::streambuf’ is used uninitialized [-Werror=uninitialized]
  119 |             Request(const socket_type &socket): content(streambuf) {
      |                                                         ^~~~~~~~~

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

1 participant