I tried building without configuring python3.13.1 explicitly with openssl. OpenSSL is also not installed on the system. I have applied all the ports/lang/python/3 patches. The configure tests pass but compile fails Modules/_ssl.c:
cc -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -g -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include -fPIC -fPIC -c ./Modules/_ssl.c -o Modules/_ssl.o ./Modules/_ssl.c:4751:18: error: call to undeclared function 'X509_OBJECT_set1_X509'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ok = X509_OBJECT_set1_X509(ret, X509_OBJECT_get0_X509(obj)); ^ ./Modules/_ssl.c:4751:18: note: did you mean 'X509_OBJECT_get0_X509'? /usr/include/openssl/x509_vfy.h:285:7: note: 'X509_OBJECT_get0_X509' declared here X509 *X509_OBJECT_get0_X509(const X509_OBJECT *xo); ^ ./Modules/_ssl.c:4755: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] ok = X509_OBJECT_set1_X509_CRL( ^ ./Modules/_ssl.c:4755:18: note: did you mean 'X509_OBJECT_get0_X509_CRL'? /usr/include/openssl/x509_vfy.h:286:11: note: 'X509_OBJECT_get0_X509_CRL' declared here X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *xo); ^ ./Modules/_ssl.c:4772:1: error: static declaration of 'X509_STORE_get1_objects' follows non-static declaration X509_STORE_get1_objects(X509_STORE *store) ^ /usr/include/openssl/x509_vfy.h:296:24: note: previous declaration is here STACK_OF(X509_OBJECT) *X509_STORE_get1_objects(X509_STORE *xs); ^ ./Modules/_ssl.c:4775:10: error: call to undeclared function 'X509_STORE_lock'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] if (!X509_STORE_lock(store)) { ^ ./Modules/_ssl.c:4778: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] ret = sk_X509_OBJECT_deep_copy(X509_STORE_get0_objects(store), ^ ./Modules/_ssl.c:4778:9: warning: incompatible integer to pointer conversion assigning to 'struct stack_st_X509_OBJECT *' from 'int' [-Wint-conversion] ret = sk_X509_OBJECT_deep_copy(X509_STORE_get0_objects(store), ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./Modules/_ssl.c:4780:5: error: call to undeclared function 'X509_STORE_unlock'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] X509_STORE_unlock(store); ^ 1 warning and 6 errors generated. I can share config output if needed. On Tue, Feb 4, 2025 at 5:57 PM Stuart Henderson <stu.li...@spacehopper.org> wrote: > On 2025-02-04, Sandeep Gupta <gupta.sand...@gmail.com> wrote: > > --000000000000558763062d4b3fc8 > > Content-Type: text/plain; charset="UTF-8" > > > > Hello, > > > > I compiled and build python 3.13.1 using openSSL. Running it fails with > > segfault: > > You have most likely built against a mixture of openssl and libressl > headers/library. You can check this by temporarily adding a #error > to some common header e.g. /usr/include/openssl/ssl.h and see if it > triggers. > > > doas egdb /var/run/www/run_unit_0/venv/bin/python3 python3.13.core > > btw, I wouldn't really recommend running gdb as root unless you really > need to... > > > Reading symbols from /var/run/www/run_unit_0/venv/bin/python3... > > [New process 101020] > > Core was generated by `python3.13'. > > Program terminated with signal SIGSEGV, Segmentation fault. > > #0 _bsaes_key_convert () at crypto/aes/bsaes-armv8.S:926 > > > > warning: 926 crypto/aes/bsaes-armv8.S: No such file or directory > > > > For now I would revert to system packaged python3.12 but was wondering if > > something obvious stand out maybe about what version of openSSL to use > > If you want to combine this with any library from packages that uses > libssl/libcrypto (for example, for a compiled extension), you really need > to build against libressl not openssl. You may need some of the patches > from ports/lang/python/3 to get it to build with crypto support. > > > -- > Please keep replies on the mailing list. > >