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

Marian server compilation fails - Boost error #340

Closed
MickHardins opened this issue Sep 10, 2020 · 6 comments
Closed

Marian server compilation fails - Boost error #340

MickHardins opened this issue Sep 10, 2020 · 6 comments
Labels

Comments

@MickHardins
Copy link

MickHardins commented Sep 10, 2020

Bug description

Hello, I'm trying to compile marian from source but I get some errors if I try to compile marian server.
Without the flag cmake .. -DCOMPILE_SERVER:BOOL=ONeverything is smooth.
When compiling marian with the flag cmake .. -DCOMPILE_SERVER:BOOL=ON the compilation fails with the following errors:

In file included from /home//marian/src/command/marian_server.cpp:7:
/home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp: In instantiation of ‘SimpleWeb::SocketServerBase<socket_type>::Connection::Connection(std::shared_ptrSimpleWeb::ScopeRunner, long int, Args&& ...) [with Args = {boost::asio::io_context&}; socket_type = boost::asio::basic_stream_socketboost::asio::ip::tcp]’:
/home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp:802:109: required from here
/home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp:155:153: error: ‘class boost::asio::basic_stream_socketboost::asio::ip::tcp’ has no member named ‘get_io_service’
: handler_runner(std::move(handler_runner)), socket(new socket_type(std::forward(args)...)), timeout_idle(timeout_idle), strand(socket->get_io_service()), closed(false) {}
~~~~~~~~^~~~~~~~~~~~~~
/home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp: In instantiation of ‘void SimpleWeb::SocketServerBase<socket_type>::Connection::set_timeout(long int) [with socket_type = boost::asio::basic_stream_socketboost::asio::ip::tcp]’:
/home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp:525:7: required from ‘void SimpleWeb::SocketServerBase<socket_type>::read_handshake(const std::shared_ptr<SimpleWeb::SocketServerBase<socket_type>::Connection>&) [with socket_type = boost::asio::basic_stream_socketboost::asio::ip::tcp]’
/home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp:816:36: required from here
/home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp:190:84: error: ‘class boost::asio::basic_stream_socketboost::asio::ip::tcp’ has no member named ‘get_io_service’
timer = std::unique_ptrasio::steady_timer(new asio::steady_timer(socket->get_io_service()));
~~~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/boost/asio/steady_timer.hpp:22,
from /usr/include/boost/asio/basic_socket_streambuf.hpp:36,
from /usr/include/boost/asio/basic_socket_iostream.hpp:24,
from /usr/include/boost/asio.hpp:33,
from /home//marian/src/3rd_party/simple-websocket-server/server_ws.hpp:50,
from /home//marian/src/command/marian_server.cpp:7:
/usr/include/boost/asio/basic_waitable_timer.hpp:698:3: error: ‘typename boost::asio::async_result<typename std::decay<_U1>::type, void(boost::system::error_code)>::return_type boost::asio::basic_waitable_timer<Clock, WaitTraits, Executor>::async_wait(WaitHandler&&) [with WaitHandler = SimpleWeb::SocketServerBase<socket_type>::Connection::set_timeout(long int) [with socket_type = boost::asio::basic_stream_socketboost::asio::ip::tcp]::<lambda(const error_code&)>; Clock = std::chrono::_V2::steady_clock; WaitTraits = boost::asio::wait_traitsstd::chrono::_V2::steady_clock; Executor = boost::asio::executor; typename boost::asio::async_result<typename std::decay<_U1>::type, void(boost::system::error_code)>::return_type = void]’, declared using local type ‘SimpleWeb::SocketServerBase<socket_type>::Connection::set_timeout(long int) [with socket_type = boost::asio::basic_stream_socketboost::asio::ip::tcp]::<lambda(const error_code&)>’, is used but never defined [-fpermissive]
async_wait(BOOST_ASIO_MOVE_ARG(WaitHandler) handler)
^~~~~~~~~~
cc1plus: error: unrecognized command line option ‘-Wno-unknown-warning-option’ [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/marian_server.dir/build.make:63: src/CMakeFiles/marian_server.dir/command/marian_server.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:215: src/CMakeFiles/marian_server.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

How to reproduce

Context

  • Marian version: Project version: v1.9.0+ba94c5b9
  • CMake command: cmake .. -DCOMPILE_SERVER:BOOL=ON

Other information about the problem here:
OS: Ubuntu 20.04
GCC version: 8 (tried with suggested version but build fails with gcc 9.3)

I Installed the suggested libraries from documentation website:

sudo apt-get install git cmake build-essential libboost-all-dev libprotobuf17 protobuf-compiler libprotobuf-dev openssl libssl-dev libgoogle-perftools-dev

@snukky
Copy link
Member

snukky commented Sep 10, 2020

What version of Boost do you have? I think for this version of Marian it needs to be <=1.69.

@MickHardins
Copy link
Author

My Boost version is 1.71, where can I see the required Boost versions?

@MickHardins
Copy link
Author

MickHardins commented Sep 11, 2020

What version of Boost do you have? I think for this version of Marian it needs to be <=1.69.

This solved the issue, I successfully compiled also the server.

To summarize, in order to compile latest Marian with marian server on ubuntu 20.04:

  • gcc 8 (9 won't work)
  • Boost 1.67
  • Cuda 10.1

@snukky
Copy link
Member

snukky commented Sep 11, 2020

Thanks for confirming this! The recent version from marian-dev should also work with GCC 9.3, CUDA 10.2 and Boost 1.72. CUDA <10.2 requires GCC 8 or lower (the GCC/CUDA compatibility table).

@dbuijs
Copy link

dbuijs commented Nov 9, 2020

Any update on when this will be merged into main? CMakeLists.txt forces the system version of Boost to be used, so it's not straightforward to override with a flag.

@snukky
Copy link
Member

snukky commented Nov 9, 2020

It is in marian-dev already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants