Skip to content

AIX build is broken because of _bootsubprocess removal.  #96305

Description

@ayappanec

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.

Linked PRs

Activity

  1. tiran commented on Aug 26, 2022

    @tiran
    Member

    _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.

  2. ayappanec commented on Aug 29, 2022

    @ayappanec
    ContributorAuthor

    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.

  3. added a commit that references this issue on Feb 2, 2023
  4. ayappanec commented on Feb 3, 2023

    @ayappanec
    ContributorAuthor

    Thanks @gpshead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions