[Python-Dev] python3.10rc2 compilation on android/termux/clang12.0.1 fails
I am trying to compile Python3.10rc2 on rather unusual platform (termux on android). The gcc version is listed below: ~ $ g++ -v clang version 12.0.1 Target: aarch64-unknown-linux-android24 Thread model: posix InstalledDir: /data/data/com.termux/files/usr/bin I get following warnings and errors: Python/pytime.c:398:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conver sion] if (!_Py_InIntegralTypeRange(_PyTime_t, d)) { Python/bootstrap_hash.c:141:17: error: implicit declaration of function 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration] n = getrandom(dest, n, flags); ^ Python/bootstrap_hash.c:145:17: error: implicit declaration of function 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration] n = getrandom(dest, n, flags); Not sure if this is limitation of the platform or Python codebase needs fixes. Thanks -S ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/KEURSMCLUVI7VPKM6M2VUV4JIW6FP66Z/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] python3.10 compilation on OpenBSD: running into ssl issues
Trying to compile python3.10 on openbsd 7.0 on Pi4. It seems to run into several openssl issue. I have installed openssl as I couldn't find libreSSL in the package manager. The configure seems to passthe ssl test. configure:17559: checking whether compiling and linking against OpenSSL works Trying link with OPENSSL_LDFLAGS=; OPENSSL_LIBS= -lssl -lcrypto; OPENSSL_INCLUDES= configure:17581: cc -pthread -o conftest conftest.c -lssl -lcrypto -lpthread -lutil -lm >&5 configure:17581: $? = 0 configure:17583: result: yes I get following errors: >> don't know why this happens ldd: /usr/lib/libreadline.a: not an ELF executable >>Errors when building _ssl module cc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include -I/home/kabira/DrivingRange/project_versa/Builds/Python-3.10.0/include -I. -I/usr/local/include -I/home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Include -I/home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0 -c /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c -o build/temp.openbsd-7.0-arm64-3.10/home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.o In file included from /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:390: /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl/debughelpers.c:180:5: error: implicit declaration of function 'SSL_CTX_set_keylog_callback' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SSL_CTX_set_keylog_callback(self->ctx, NULL); ^ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:1842:29: error: implicit declaration of function 'SSL_get0_verified_chain' is invalid in C99 [-Werror,-Wimplicit-function-declaration] STACK_OF(X509) *chain = SSL_get0_verified_chain(self->ssl); ^ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:1842:21: warning: incompatible integer to pointer conversion initializing 'struct stack_st_X509 *' with an expression of type 'int' [-Wint-conversion] STACK_OF(X509) *chain = SSL_get0_verified_chain(self->ssl); ^ ~~ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:2349:18: error: implicit declaration of function 'SSL_write_ex' is invalid in C99 [-Werror,-Wimplicit-function-declaration] retval = SSL_write_ex(self->ssl, b->buf, (size_t)b->len, &count); /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:2349:18: note: did you mean 'SSL_write'? /usr/include/openssl/ssl.h:1415:6: note: 'SSL_write' declared here int SSL_write(SSL *ssl, const void *buf, int num); ^ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:2501:18: error: implicit declaration of function 'SSL_read_ex' is invalid in C99 [-Werror,-Wimplicit-function-declaration] retval = SSL_read_ex(self->ssl, mem, (size_t)len, &count); ^ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:2501:18: note: did you mean 'SSL_read'? /usr/include/openssl/ssl.h:1413:6: note: 'SSL_read' declared here int SSL_read(SSL *ssl, void *buf, int num); ^ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:3542:30: error: implicit declaration of function 'SSL_CTX_get_num_tickets' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return PyLong_FromSize_t(SSL_CTX_get_num_tickets(self->ctx)); ^ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:3560:9: error: implicit declaration of function 'SSL_CTX_set_num_tickets' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (SSL_CTX_set_num_tickets(self->ctx, num) != 1) { ^ /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_ssl.c:3574:28: error: implicit declaration of function 'SSL_CTX_get_security_level' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return PyLong_FromLong(SSL_CTX_get_security_level(self->ctx)); ^ cc -pthread -shared -fPIC build/temp.openbsd-7.0-arm64-3.10/home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/_testcapimodule.o -L/home/kabira/DrivingRange/project_versa/Builds/Python-3.10.0/lib -L/usr/local/lib -o build/lib.openbsd-7.0-arm64-3.10/_ testcapi.cpython-310.so > and errors building _hashlib module cc -pthread -fPIC -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-fun
[Python-Dev] Re: python3.10 compilation on OpenBSD: running into ssl issues
_word_break_characters = ^ 1 warning generated. *** WARNING: renaming "readline" since importing it failed: dynamic module does not define module export function (PyInit_readline) *** WARNING: renaming "_ssl" since importing it failed: Cannot load specified object *** WARNING: renaming "_hashlib" since importing it failed: Cannot load specified object renaming build/scripts-3.10/pydoc3 to build/scripts-3.10/pydoc3.10 renaming build/scripts-3.10/idle3 to build/scripts-3.10/idle3.10 renaming build/scripts-3.10/2to3 to build/scripts-3.10/2to3-3.10 *** Warning in /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0: '$(LLVM_PROF_MERGER)' expands to '' while building build_all_merge_profile (Makefile:539) Python/pytime.c:160:10: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion] if (!_Py_InIntegralTypeRange(time_t, intpart)) { ^~~~ ./Include/pymath.h:228:82: note: expanded from macro '_Py_InIntegralTypeRange' #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) ~~ ^ ./Include/pymath.h:221:124: note: expanded from macro '_Py_IntegralTypeMax' #define _Py_IntegralTypeMax(type) ((_Py_IntegralTypeSigned(type)) ? (type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0) ~~^~~ Python/pytime.c:213:14: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion] if (!_Py_InIntegralTypeRange(time_t, intpart)) { ^~~~ ./Include/pymath.h:228:82: note: expanded from macro '_Py_InIntegralTypeRange' #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) ~~ ^ ./Include/pymath.h:221:124: note: expanded from macro '_Py_IntegralTypeMax' #define _Py_IntegralTypeMax(type) ((_Py_IntegralTypeSigned(type)) ? (type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0) ~~^~~ Python/pytime.c:398:10: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion] if (!_Py_InIntegralTypeRange(_PyTime_t, d)) { ^ ./Include/pymath.h:228:82: note: expanded from macro '_Py_InIntegralTypeRange' #define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v <= _Py_IntegralTypeMax(type)) ~~ ^ ./Include/pymath.h:221:124: note: expanded from macro '_Py_IntegralTypeMax' #define _Py_IntegralTypeMax(type) ((_Py_IntegralTypeSigned(type)) ? (type)1 << (sizeof(type)*CHAR_BIT - 2)) - 1) << 1) + 1) : ~(type)0) ~~^~~ 3 warnings generated. ./Modules/_threadmodule.c:1644:26: warning: implicit conversion from '_PyTime_t' (aka 'long long') to 'double' changes value from 9223372036854775 to 9223372036854776 [-Wimplicit-const-int-float-conversion] double timeout_max = (_PyTime_t)PY_TIMEOUT_MAX * 1e-6; ^ ~ 1 warning generated. ldd: /usr/lib/libreadline.a: not an ELF executable /home/kabira/DrivingRange/project_versa/downloads/Python-3.10.0/Modules/readline.c:1258:37: warning: assigning to 'char *' from 'const char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] completer_word_break_characters = ^ 1 warning generated. *** WARNING: renaming "readline" since importing it failed: dynamic module does not define module export function (PyInit_readline) *** WARNING: renaming "_ssl" since importing it failed: Cannot load specified object *** WARNING: renaming "_hashlib" since importing it failed: Cannot load specified object renaming build/scripts-3.10/pydoc3 to build/scripts-3.10/pydoc3.10 renaming build/scripts-3.10/idle3 to build/scripts-3.10/idle3.10 renaming build/scripts-3.10/2to3 to build/scripts-3.10/2to3-3.10 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>&
[Python-Dev] Re: python3.10 compilation on OpenBSD: running into ssl issues
Thank you for super quick fix ). Works like charm. Thanks S On Wednesday, October 6, 2021, Christian Heimes wrote: > On 06/10/2021 09.06, Sandeep Gupta wrote: > >> Tried with openssl. Some progress but no success. The configure checks >> went through find. >> >configure:17536: checking for openssl/ssl.h in >> /home/kabira/DrivingRange//project_versa/Build >> >s/openssl-1.1.1l >> >configure:17543: result: yes >> >configure:17559: checking whether compiling and linking against OpenSSL >> works >> >Trying link with OPENSSL_LDFLAGS=-L/home/kabira >> /DrivingRange//project_versa/Builds/openssl-1. >> >1.1l/lib; OPENSSL_LIBS=-lssl -lcrypto; OPENSSL_INCLUDES=-I/home/kabir >> a/DrivingRange//project_ >> >versa/Builds/openssl-1.1.1l/include >> >> But for some reason module could not be imported. I could find any errors >> related to import. >> There were no compilation errors: >> >> >Following modules built successfully but were removed because they >> could not be imported: >> >_hashlib _ssl readline >> > > [...] > > *** WARNING: renaming "_ssl" since importing it failed: Cannot load >> specified object >> *** WARNING: renaming "_hashlib" since importing it failed: Cannot load >> specified object >> > > OpenBSD uses clang C compiler. The new --with-openssl-rpath=auto option > was only tested with GCC. It turned out that Python's distutils package > didn't support rpath with clang. The bugfix https://bugs.python.org/issue4 > 5371 will be available in upcoming release Python 3.10.1. > > In the mean time you either need to apply the patch from the issue > manually or figure out the right environment variables to add correct rpath > yourself. > > I'm sorry for the inconvenience. We don't have any CI for OpenBSD. > Apparently this feature was never tested on OpenBSD during the release > candidate phase either. > > Christian > ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/XFXP4LRY3WWWXHZLKQTZI7LMRBQOQCAF/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] compiled python3.10 is unable to find _ssl
I am having compilation issues again with python3.10 with ssl . The ./configure was invoked with ssl options and ssl modules seems to be build successfully. """ The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc _hashlib _ssl pwd time """ However, when I do import ssl from python, I get the error: Traceback (most recent call last): File "", line 1, in File "/home/shared/Builds/Python-3.10.0/lib/python3.10/ssl.py", line 98, in import _ssl # if we can't import it, let the error propagate ModuleNotFoundError: No module named '_ssl' I can't find _ssl.so in build or install directory. Thanks -S ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/IIFABHN7DOTCXMRQ72SLJSU4VDWRM2HB/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-Dev] python3.110b1 fails during post compile setup on OpenBSD 7.1
I tried to install python3.110b1 on OpenBSD7.1/Rpi4. The compilation goes fine but post compilation setup fails. It is not able to fine module `_sysconfigdata__openbsd7_aarch64-unknown-openbsd7`. The full error: gmake[3]: Entering directory '/home/shared/downloads/Python-3.11.0b1' LD_LIBRARY_PATH=/home/shared/downloads/Python-3.11.0b1 CC='/usr/bin/cc -pthread' LDSHARED='/usr/bin/cc -pthread -shared -fPIC -g ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall'./python -E ./setup.py build Traceback (most recent call last): File "/home/shared/downloads/Python-3.11.0b1/./setup.py", line 49, in from distutils.command.build_ext import build_ext ^ File "/home/shared/downloads/Python-3.11.0b1/Lib/distutils/command/build_ext.py", line 13, in from distutils.sysconfig import customize_compiler, get_python_version ^^ File "/home/shared/downloads/Python-3.11.0b1/Lib/distutils/sysconfig.py", line 53, in _config_vars = get_config_vars() ^ File "/home/shared/downloads/Python-3.11.0b1/Lib/sysconfig.py", line 669, in get_config_vars _init_posix(_CONFIG_VARS) ^ File "/home/shared/downloads/Python-3.11.0b1/Lib/sysconfig.py", line 530, in _init_posix _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) ^ ModuleNotFoundError: No module named '_sysconfigdata__openbsd7_aarch64-unknown-openbsd7' gmake[3]: *** [Makefile:858: sharedmods] Error 1 gmake[3]: Leaving directory '/home/shared/downloads/Python-3.11.0b1' gmake[2]: *** [Makefile:757: build_all_generate_profile] Error 2 gmake[2]: Leaving directory '/home/shared/downloads/Python-3.11.0b1' gmake[1]: *** [Makefile:733: profile-gen-stamp] Error 2 gmake[1]: Leaving directory '/home/shared/downloads/Python-3.11.0b1' gmake: *** [Makefile:745: profile-run-stamp] Error 2 This module is present in ./build/lib.openbsd-7.1-arm64-3.11/ as _ sysconfigdata__openbsd7_aarch64-unknown-openbsd7.1.py. So I made renamed the file dropping the .1 from suffix. Then I get a different error: ModuleNotFoundError: No module named '_sysconfigdata__openbsd7_aarch64-unknown-openbsd7.1'; '_sysconfigdata__openbsd7_aarch64-unknown-openbsd7' is not a package I guess we need some fix in the script itself. Thanks Sandeep ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/GBIWPNXUXBBM55KFEBHTM23OSREU6LSU/ Code of Conduct: http://python.org/psf/codeofconduct/