Openssl 3.2 compatibility with python 3.12 (original) (raw)

Hi ,
I have built Python 3.12 on Openssl 3.2 but I ended up in errors which were caused due to deprecated functions. May I know how to resolve this?

error: implicit declaration of function ‘ERR_func_error_string’; did you mean ‘ERR_lib_error_string’? [-Werror=implicit-function-declaration]
275 | func = ERR_func_error_string(errcode);
| ^~~~~~~~~~~~~~~~~~~~~
| ERR_lib_error_string
error: implicit declaration of function ‘HMAC_CTX_new’; did you mean ‘EVP_MAC_CTX_new’? [-Werror=implicit-function-declaration]
1528 | ctx = HMAC_CTX_new();
| ^~~~~~~~~~~~
| EVP_MAC_CTX_new
error: assignment to ‘HMAC_CTX *’ {aka ‘struct hmac_ctx_st *’} from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
1528 | ctx = HMAC_CTX_new();
| ^
error: implicit declaration of function ‘HMAC_Init_ex’ [-Werror=implicit-function-declaration]
1534 | r = HMAC_Init_ex(
| ^~~~~~~~~~~~
error: implicit declaration of function ‘HMAC_CTX_free’; did you mean ‘EVP_MAC_CTX_free’? [-Werror=implicit-function-declaration]
1562 | if (ctx) HMAC_CTX_free(ctx);
| ^~~~~~~~~~~~~
| EVP_MAC_CTX_free
error: implicit declaration of function ‘HMAC_CTX_copy’ [-Werror=implicit-function-declaration]
1573 | result = HMAC_CTX_copy(new_ctx_p, self->ctx);
| ^~~~~~~~~~~~~

barry-scott (Barry Scott) May 5, 2025, 3:40pm 2

Missing header file maybe?

Fedora’s Python 3.12 is built against OpenSSL 3.2.

You could look at how Fedora did the build.

The sources for the source RPM at here Tree - rpms/python3.12 - src.fedoraproject.org

tiran (Christian Heimes) May 5, 2025, 4:24pm 3

Your OpenSSL build has been compiled with an option like no-deprecated and is therefore incompatible with Python.