Build fails on Ubuntu 22.04 due to calls to deprecated functions
Closed this issue · 1 comments
godlygeek commented
Describe the bug
Building the main
branch on Ubuntu 22.04 currently fails due to -Werror=deprecated-declarations
To Reproduce
Reproduces in python-comdb2's GitHub Actions with this workflow.
Expected behavior
For the build to succeed 😄
Screenshots
Build logs available here
Environment (please complete the following information):
- Operating System and Version: Ubuntu 22.04
Additional context
Compiler output:
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c: In function ‘ch_hash_sha’:
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:38:5: error: ‘SHA256_Init’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
38 | SHA256_Init(&sha256);
| ^~~~~~~~~~~
In file included from /home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:6:
/usr/include/openssl/sha.h:73:27: note: declared here
73 | OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
| ^~~~~~~~~~~
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:39:5: error: ‘SHA256_Update’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
39 | SHA256_Update(&sha256, buf, buf_len);
| ^~~~~~~~~~~~~
In file included from /home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:6:
/usr/include/openssl/sha.h:74:27: note: declared here
74 | OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
| ^~~~~~~~~~~~~
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:40:5: error: ‘SHA256_Final’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
40 | SHA256_Final(sha_hash, &sha256);
| ^~~~~~~~~~~~
In file included from /home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:6:
/usr/include/openssl/sha.h:76:27: note: declared here
76 | OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
| ^~~~~~~~~~~~
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c: In function ‘ch_hash_md5’:
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:51:5: error: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
51 | MD5_Init(&md5);
| ^~~~~~~~
In file included from /home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:7:
/usr/include/openssl/md5.h:49:27: note: declared here
49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
| ^~~~~~~~
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:52:5: error: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
52 | MD5_Update(&md5, buf, buf_len);
| ^~~~~~~~~~
In file included from /home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c: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);
| ^~~~~~~~~~
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c:53:5: error: ‘MD5_Final’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
53 | MD5_Final(md5_hash, &md5);
| ^~~~~~~~~
In file included from /home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c: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);
| ^~~~~~~~~
/home/runner/work/python-comdb2/python-comdb2/bloomberg-comdb2/util/consistent_hash.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-tautological-constant-out-of-range-compare’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-single-bit-bitfield-constant-conversion’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-deprecated-non-prototype’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
make[2]: *** [util/CMakeFiles/util.dir/build.make:216: util/CMakeFiles/util.dir/consistent_hash.c.o] Error 1