===> Installing for python311-3.11.9 ===> Checking if python311 is already installed ===> Registering installation for python311-3.11.9 as automatic pkg-static: Unable to access file /usr/obj/usr/ports/lang/python311/work/stage/usr/local/lib/python3.11/lib-dynload/_ssl.cpython-311.so:No such file or directory
I thji
The error is related to libressl, and stands here: /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4554:18: error: call to undeclared function 'X509_OBJECT_set1_X509'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 4554 | ok = X509_OBJECT_set1_X509(ret, X509_OBJECT_get0_X509(obj)); | ^ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4554:18: note: did you mean 'X509_OBJECT_get0_X509'? /usr/local/include/openssl/x509_vfy.h:285:7: note: 'X509_OBJECT_get0_X509' declared here 285 | X509 *X509_OBJECT_get0_X509(const X509_OBJECT *xo); | ^ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4558:18: error: call to undeclared function 'X509_OBJECT_set1_X509_CRL'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 4558 | ok = X509_OBJECT_set1_X509_CRL( | ^ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4558:18: note: did you mean 'X509_OBJECT_get0_X509_CRL'? /usr/local/include/openssl/x509_vfy.h:286:11: note: 'X509_OBJECT_get0_X509_CRL' declared here 286 | X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *xo); | ^ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4575:1: error: static declaration of 'X509_STORE_get1_objects' follows non-static declaration 4575 | X509_STORE_get1_objects(X509_STORE *store) | ^ /usr/local/include/openssl/x509_vfy.h:296:24: note: previous declaration is here 296 | STACK_OF(X509_OBJECT) *X509_STORE_get1_objects(X509_STORE *xs); | ^ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4578:10: error: call to undeclared function 'X509_STORE_lock'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 4578 | if (!X509_STORE_lock(store)) { | ^ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4581:11: error: call to undeclared function 'sk_X509_OBJECT_deep_copy'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 4581 | ret = sk_X509_OBJECT_deep_copy(X509_STORE_get0_objects(store), | ^ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4581:9: error: incompatible integer to pointer conversion assigning to 'struct stack_st_X509_OBJECT *' from 'int' [-Wint-conversion] 4581 | ret = sk_X509_OBJECT_deep_copy(X509_STORE_get0_objects(store), | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4582 | x509_object_dup, X509_OBJECT_free); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /wrkdirs/usr/ports/lang/python311/work/Python-3.11.9/Modules/_ssl.c:4583:5: error: call to undeclared function 'X509_STORE_unlock'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] 4583 | X509_STORE_unlock(store); | ^
Created attachment 251625 [details] disable x509_object_dup with libressm cherry-picked from openbsd.
(In reply to David Marec from comment #3) Thanks, works for me!
The LibreSSL fixes are a bit more involved, specifically resurrecting some code removed after PEP-644. I've been dogfooding this for ages but kept forgetting to offer it up. They live in EXTRA_PATCHES.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3f76bb7c6fbff9496a1bfeea991635a6f71ef1ac commit 3f76bb7c6fbff9496a1bfeea991635a6f71ef1ac Author: Charlie Li <vishwin@FreeBSD.org> AuthorDate: 2024-06-24 17:50:17 +0000 Commit: Charlie Li <vishwin@FreeBSD.org> CommitDate: 2024-06-24 17:56:55 +0000 lang/python311: refresh LibreSSL patches LibreSSL 3.9 introduced X509_STORE_get1_objects(3) so modify the preprocessor guard to account. Prior to LibreSSL < 3.9 becoming EOL, an additional conditional was needed to copy LibreSSL 3.9's X509_STORE_get1_objects(3) as the included implementation for OpenSSL < 3.3 clashed with LibreSSL. Event: ARRL/RAC Field Day 2024 PR: 279390 lang/python311/files/libressl/patch-Modules___hashopenssl.c | 4 ++-- lang/python311/files/libressl/patch-Modules___ssl.c (new) | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-)