ucbrise / clipper

A low-latency prediction-serving system
http://clipper.ai
Apache License 2.0
1.4k stars 280 forks source link

Failed to build with boost 1.70.0 #730

Open withsmilo opened 5 years ago

withsmilo commented 5 years ago

We can install boost 1.70.0 through brew on Mac now, but got failed to build Clipper on Mac with boost 1.70.0. Error message is here, I think this is from SimpleWebServer.

In file included from /Users/user/Workplace/github/sungjunkim/clipper/src/frontends/src/query_frontend.hpp:22:
/Users/user/Workplace/github/sungjunkim/clipper/src/libs/httpserver/server_http.hpp:302:84: error: no member named 'get_io_service' in 'boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>'
        timer = std::unique_ptr<asio::steady_timer>(new asio::steady_timer(socket->get_io_service()));
                                                                           ~~~~~~  ^
/Users/user/Workplace/github/sungjunkim/clipper/src/libs/httpserver/server_http.hpp:638:28: note: in instantiation of member function 'SimpleWeb::ServerBase<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::Connection::set_timeout' requested here
      session->connection->set_timeout(config.timeout_request);
                           ^
/Users/user/Workplace/github/sungjunkim/clipper/src/libs/httpserver/server_http.hpp:933:17: note: in instantiation of member function 'SimpleWeb::ServerBase<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >::read' requested here
          this->read(session);
                ^
/Users/user/Workplace/github/sungjunkim/clipper/src/libs/httpserver/server_http.hpp:72:207: error: no member named 'get_io_service' in 'boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>'
      Response(std::shared_ptr<Session> session_, long timeout_content) noexcept : std::ostream(nullptr), session(std::move(session_)), timeout_content(timeout_content), strand(session->connection->socket->get_io_service()) {
                                                                                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
/Users/user/Workplace/github/sungjunkim/clipper/src/libs/httpserver/server_http.hpp:646:57: note: in instantiation of member function 'SimpleWeb::ServerBase<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >::Response::Response'
      requested here
          auto response = std::shared_ptr<Response>(new Response(session, this->config.timeout_content));
                                                        ^
/Users/user/Workplace/github/sungjunkim/clipper/src/libs/httpserver/server_http.hpp:933:17: note: in instantiation of member function 'SimpleWeb::ServerBase<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor> >::read' requested here
          this->read(session);

Clipper is safe because all images use boost 1.65.1.

withsmilo commented 5 years ago

This issue was raised already on SimpleWebServer. Here.

rkooo567 commented 5 years ago

I faced this error as well. https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/history.html

Based on this, get_io_service is deprecated and removed. I will try to replace the function and see if it can compile the program.

rkooo567 commented 5 years ago

Confirmed the latest simpleWebServer (https://gitlab.com/eidheim/Simple-Web-Server/blob/master/server_http.hpp) does not use deprecated and removed get_io_service. I think we can keep using the version >= 1.65.1 for now, and later when we update the simpleWebServer, it will be fixed.

withsmilo commented 5 years ago

Good news! but we always have to run integration tests on Docker, the local tests on Mac will be impossible before fixing this error.

simon-mo commented 5 years ago

Hi all, few things:

rkooo567 commented 5 years ago

@withsmilo @simon-mo Will ask SimpleWebServer if their current master is compatible to boost 1.65. After that, let's change the SimpleWebserver

https://gitlab.com/eidheim/Simple-Web-Server/issues/266 Verifed from the maintainer that the master is compatible with 1.65 boost without asio apis

asauray commented 5 years ago

Any update on this issue ?