-DCOMPILE_SERVER is broken with OpenSSL >= 3
XapaJIaMnu opened this issue · 1 comments
XapaJIaMnu commented
Bug description
When trying to compile marian server, on ubuntu 22.04 one runs into tons of:
In file included from marian-dev/src/3rd_party/simple-websocket-server/server_ws.hpp:5,
from marian-dev/src/command/marian_server.cpp:7:
marian-dev/src/3rd_party/simple-websocket-server/crypto.hpp: In static member function ‘static std::string SimpleWeb::Crypto::md5(std::istream&, std::size_t)’:
marian-dev/src/3rd_party/simple-websocket-server/crypto.hpp:118:15: error: ‘int MD5_Init(MD5_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
118 | MD5_Init(&context);
| ~~~~~~~~^~~~~~~~~~
In file included from marian-dev/src/3rd_party/simple-websocket-server/crypto.hpp:13,
from marian-dev/src/3rd_party/simple-websocket-server/server_ws.hpp:5,
from marian-dev/src/command/marian_server.cpp:7:
/usr/include/openssl/md5.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
| ^~~~~~~~
In file included from marian-dev/src/3rd_party/simple-websocket-server/server_ws.hpp:5,
from marian-dev/src/command/marian_server.cpp:7:
marian-dev/src/3rd_party/simple-websocket-server/crypto.hpp:122:19: error: ‘int MD5_Update(MD5_CTX*, const void*, size_t)’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
122 | MD5_Update(&context, buffer.data(), static_cast<std::size_t>(read_length));
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from marian-dev/src/3rd_party/simple-websocket-server/crypto.hpp:13,
from marian-dev/src/3rd_party/simple-websocket-server/server_ws.hpp:5,
from marian-dev/src/command/marian_server.cpp:7:
/usr/include/openssl/md5.h:50:27: note: declared here
50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
| ^~~~~~~~~~
In file included from marian-dev/src/3rd_party/simple-websocket-server/server_ws.hpp:5,
from marian-dev/src/command/marian_server.cpp:7:
marian-dev/src/3rd_party/simple-websocket-server/crypto.hpp:125:16: error: ‘int MD5_Final(unsigned char*, MD5_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
125 | MD5_Final(reinterpret_cast<unsigned char *>(&hash[0]), &context);
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from marian-dev/src/3rd_party/simple-websocket-server/crypto.hpp:13,
from marian-dev/src/3rd_party/simple-websocket-server/server_ws.hpp:5,
from marian-dev/src/command/marian_server.cpp:7:
/usr/include/openssl/md5.h:51:27: note: declared here
51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
It seems the simple-websocket-server has been updated and fixed, but it has been moved to gitlab so fetching upstream is not as trivial: https://gitlab.com/eidheim/Simple-WebSocket-Server @snukky maybe a simple update of the submodule will fix this.
How to reproduce
Try compiling with: cmake .. -DCOMPILE_SERVER=ON
Context
- Marian version: marian-dev master
- CMake command:
cmake .. -DCOMPILE_SERVER=ON
- Log file: Attach your training/decoding logs