Hi
System Info:
Code:
$ cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
$ openssl version
OpenSSL 1.0.2k-fips 26 Jan 2017
I am attempting to build python 3.11 on a centos 7 system.
When I try to configure using this command:
Code:
$ ./configure --prefix=/local/usr/local/python3 --enable-shared --with-ensurepip=install --enable-optimizations
and then try to make I get the following error:
Code:
Python runtime state: initialized
Traceback (most recent call last):
File "/local/usr/local/src/python/Python-3.11.0/Lib/site.py", line 73, in <module>
import os
File "/local/usr/local/src/python/Python-3.11.0/Lib/os.py", line 29, in <module>
from _collections_abc import _check_methods
SystemError: <built-in function compile> returned NULL without setting an exception
make[1]: *** [Python/frozen_modules/abc.h] Error 1
make[1]: Leaving directory `/local/usr/local/src/python/Python-3.11.0'
make: *** [profile-opt] Error 2
I think I am hitting the issue described here:
https://github.com/python/cpython/issues/94825
Which suggests I need a more up to date gcc version.
Does anyone know which gcc version works for building this with optimization ? Or know where I can find out ?
When it does build successfully (as mentioned in the link if I repeat it enough it eventually goes through and also if I turn off optimizations) I get the following message at the end:
Quote:
The necessary bits to build these optional modules were not found:
_hashlib _ssl _tkinter
|
I do need the _ssl module - does anyone know how I can find out what I need to allow it to build ? Possibly I need a newer openssl version ?
Ooops sorry I missed this message at the end:
Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer
That explains the ssl issue. Anyone know if it is possible to install openssl 1.1.1 on centos 7 from a repository ? Or do I have to build a local version ?