Summary
I observed the following build warning compiling PHPC after upgrading to Ubuntu 22.04:
/phpc/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c: In function ‘_mongoc_openssl_init’:
/phpc/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c:79:4: warning: ‘ERR_load_BIO_strings’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
79 | ERR_load_BIO_strings ();
| ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/cryptoerr.h:17,
from /usr/include/openssl/crypto.h:38,
from /usr/include/openssl/bio.h:30,
from /phpc/src/libmongoc/src/libmongoc/src/mongoc/mongoc-openssl.c:23:
/usr/include/openssl/cryptoerr_legacy.h:31:27: note: declared here
31 | OSSL_DEPRECATEDIN_3_0 int ERR_load_BIO_strings(void);
|
Quoting OPENSSL 3.0: Main Changes from OpenSSL 1.1.1:
ERR_load_*(), ERR_func_error_string(), ERR_get_error_line(), ERR_get_error_line_data(), ERR_get_state()
OpenSSL now loads error strings automatically so these functions are not needed.
See rsyslog/rsyslog@e5b6d36 for a related fix.
Environment
- Ubuntu 22.04.02 LTS
- gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)
- OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)