Build fails for OpenSSL v3 due to strict warnings in Azure dependency
When I want to install OpenVDS in a Docker container using Alpine 3.17 the build fails. This seems to be due to the fact that Alpine has updated their default OpenSSL installation to OpenSSL v3. This triggers warnings in the Azure dependencies. The dependencies are, by default, compiled with "Warnings as errors".
I am not sure what the best way would be to fix the problem. In general, it would be nice to be able to preinstall the dependency myself and avoid building it during the OpenVDS build process (this applies to all 3rd party dependencies). In that case one could install dependencies beforehand with suitable options and or from the system's package manager. Moreover, one also could reuse the dependencies when upgrading to new OpenVDS versions making the upgrade process faster more and much lighter.
Further Observations
- On Alpine 3.16 installed OpenSSL v1 so it was no issue back then.
- Setting
DISABLE_STRICT_WARNINGS=OFF
in OpenVDS is not forwarded to the dependency.
Steps to reproduce
Create a Docker container based on alpine 3.17 and install OpenVDS dependencies
apk --no-cache add \
curl \
git \
g++ \
gcc \
make \
cmake \
curl-dev \
boost-dev \
libxml2-dev \
libuv-dev \
util-linux-dev
Afterwards, download, configure, and build OpenVDS with the following options
cmake -S . \
-B build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_JAVA=OFF \
-DBUILD_PYTHON=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_DOCS=OFF \
-DDISABLE_AWS_IOMANAGER=ON \
-DDISABLE_AZURESDKFORCPP_IOMANAGER=OFF \
-DDISABLE_GCP_IOMANAGER=ON \
-DDISABLE_DMS_IOMANAGER=OFF \
-DDISABLE_STRICT_WARNINGS=OFF
cmake --build build --config Release --target install --verbose
Error
#11 21.29 -- stderr output is:
[1433](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1434)
#11 21.29 /open-vds/3rdparty/azure-sdk-for-cpp-12.3.0/sdk/core/azure-core/src/cryptography/md5.cpp: In member function 'virtual void {anonymous}::Md5OpenSSL::OnAppend(const uint8_t*, size_t)':
[1434](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1435)
#11 21.29 /open-vds/3rdparty/azure-sdk-for-cpp-12.3.0/sdk/core/azure-core/src/cryptography/md5.cpp:166:65: error: 'int MD5_Update(MD5_CTX*, const void*, size_t)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
[1435](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1436)
#11 21.29 166 | void OnAppend(const uint8_t* data, size_t length) { MD5_Update(m_context.get(), data, length); }
[1436](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1437)
#11 21.29 | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[1437](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1438)
#11 21.29 In file included from /open-vds/3rdparty/azure-sdk-for-cpp-12.3.0/sdk/core/azure-core/src/cryptography/md5.cpp:13:
[1438](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1439)
#11 21.29 /usr/include/openssl/md5.h:50:27: note: declared here
[1439](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1440)
#11 21.29 50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
[1440](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1441)
#11 21.29 | ^~~~~~~~~~
[1441](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1442)
#11 21.29 /open-vds/3rdparty/azure-sdk-for-cpp-12.3.0/sdk/core/azure-core/src/cryptography/md5.cpp: In member function 'virtual std::vector<unsigned char> {anonymous}::Md5OpenSSL::OnFinal(const uint8_t*, size_t)':
[1442](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1443)
#11 21.29 /open-vds/3rdparty/azure-sdk-for-cpp-12.3.0/sdk/core/azure-core/src/cryptography/md5.cpp:172:14: error: 'int MD5_Final(unsigned char*, MD5_CTX*)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
[1443](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1444)
#11 21.29 172 | MD5_Final(hash, m_context.get());
[1444](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1445)
#11 21.29 | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
[1445](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1446)
#11 21.29 /usr/include/openssl/md5.h:51:27: note: declared here
[1446](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1447)
#11 21.29 51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
[1447](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1448)
#11 21.29 | ^~~~~~~~~
[1448](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1449)
#11 21.29 /open-vds/3rdparty/azure-sdk-for-cpp-12.3.0/sdk/core/azure-core/src/cryptography/md5.cpp: In constructor '{anonymous}::Md5OpenSSL::Md5OpenSSL()':
[1449](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1450)
#11 21.29 /open-vds/3rdparty/azure-sdk-for-cpp-12.3.0/sdk/core/azure-core/src/cryptography/md5.cpp:180:13: error: 'int MD5_Init(MD5_CTX*)' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
[1450](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1451)
#11 21.29 180 | MD5_Init(m_context.get());
[1451](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1452)
#11 21.29 | ~~~~~~~~^~~~~~~~~~~~~~~~~
[1452](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1453)
#11 21.29 /usr/include/openssl/md5.h:49:27: note: declared here
[1453](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1454)
#11 21.29 49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
[1454](https://github.com/equinor/vds-slice/actions/runs/3675967242/jobs/6216036291#step:3:1455)
#11 21.29 |