cpython
cpython copied to clipboard
AIX build is broken because of _bootsubprocess removal.
Building the main branch in AIX is broken with the below error.
./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Traceback (most recent call last):
File "/home/buildusr/cpython_master/cpython/Lib/_aix_support.py", line 7, in <module>
import subprocess
File "/home/buildusr/cpython_master/cpython/Lib/subprocess.py", line 104, in <module>
from _posixsubprocess import fork_exec as _fork_exec
ModuleNotFoundError: No module named '_posixsubprocess'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/buildusr/cpython_master/cpython/Lib/sysconfig.py", line 851, in <module>
_main()
File "/home/buildusr/cpython_master/cpython/Lib/sysconfig.py", line 839, in _main
_generate_posix_vars()
File "/home/buildusr/cpython_master/cpython/Lib/sysconfig.py", line 511, in _generate_posix_vars
pybuilddir = f'build/lib.{get_platform()}-{_PY_VERSION_SHORT}'
^^^^^^^^^^^^^^
File "/home/buildusr/cpython_master/cpython/Lib/sysconfig.py", line 781, in get_platform
from _aix_support import aix_platform
File "/home/buildusr/cpython_master/cpython/Lib/_aix_support.py", line 11, in <module>
import _bootsubprocess as subprocess
ModuleNotFoundError: No module named '_bootsubprocess'
generate-posix-vars failed
gmake: *** [Makefile:871: pybuilddir.txt] Error 1
gmake: *** Waiting for unfinished jobs....
Earlier the _bootsubprocess was supporting _aix_support during the building stage. With it being gone via #94474 and unable to find _posixsubprocess module, it fails. But I see _posixsubprocess is already build as part of the shared modules target inside the Modules directory.
_bootsubprocess was removed because it was a hack which is no longer needed for any supported platforms. I didn't realize that it is used by AIX because that platform is no longer supported by us.
I recommend that you replace the _aix_support code with autoconf -- either the entire module or at least the part that depends on subprocess.
I see there is a _read_output function in _osx_support that can be used here when subprocess is not available.
I did some testing and it seems to be working.
Thanks @gpshead