Skip to content

AIX build failing because of python.exp not being created before building shared modules. ย #96269

Closed

Description

@ayappanec

https://buildbot.python.org/all/#/builders/438/builds/3408

AIX build is failing with the main branch. The error thrown is "Modules/python.exp" file not found while building the shared modules. In AIX, the export file is required for the creation of shared modules.
So the "sharedmods" target needs "EXPORTSYMS" target to be built before so that the export file is created before building the shared modules.

Activity

  1. added 2 commits that reference this issue on Aug 26, 2022
  2. tiran commented on Aug 26, 2022

    @tiran
    Member

    Problem is fixed in main branch.

  3. ayappanec commented on Aug 26, 2022

    @ayappanec
    ContributorAuthor

    The fix didn't work actually. It introduced a circular dependency and the creation of libpython3.12.a didn't happen, so it ended up creating a empty python.exp file.

    https://buildbot.python.org/all/#/builders/438/builds/3413/steps/3/logs/stdio

    gmake: Circular Modules/python.exp <- libpython3.12.a dependency dropped.
    ./Modules/makexp_aix Modules/python.exp "."

    I already have working fix for the original issue. Planning to create a PR.
    @tiran Can you revert the changes ?

  4. added a commit that references this issue on Aug 26, 2022
  5. tiran commented on Aug 26, 2022

    @tiran
    Member

    Does #96316 work for you?

  6. ayappanec commented on Aug 27, 2022

    @ayappanec
    ContributorAuthor

    The above works.
    But I have created a fix like this

    diff --git a/Modules/makesetup b/Modules/makesetup
    index 08303814c8..85bdf03187 100755
    --- a/Modules/makesetup
    +++ b/Modules/makesetup
    @@ -99,6 +99,12 @@ CYGWIN*) if test $libdir = .
             ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
     esac
     
    +# AIX needs export file to build shared modules
    +# So needs EXPORTSYMS target before building shared modules
    +case `uname -s` in
    +AIX*)    ExpFileTarget="\$(EXPORTSYMS)";;
    +esac
    +
     # Main loop
     for i in ${*-Setup}
     do
    @@ -282,7 +288,7 @@ sed -e 's/[         ]*#.*//' -e '/^[        ]*$/d' |
                                    BUILT_SHARED="$BUILT_SHARED $mod"
                                    ;;
                            esac
    -                       rule="$file: $objs"
    +                       rule="$file: $objs $ExpFileTarget"
                            rule="$rule; \$(BLDSHARED) $objs $libs $ExtraLibs -o $file"
                            echo "$rule" >>$rulesf
                    done

    Let me know your opinion about my fix.

  7. ayappanec commented on Aug 30, 2022

    @ayappanec
    ContributorAuthor

    #96316 also considers the static build of the modules case (where EXPORTSYMS is not required).
    So I think we can go ahead with #96316.

  8. ayappanec commented on Sep 1, 2022

    @ayappanec
    ContributorAuthor

    @tiran Can #96316 be merged? . This will fix one of the two build issues in AIX.

  9. ayappanec commented on Sep 2, 2022

    @ayappanec
    ContributorAuthor
  10. ayappanec commented on Oct 26, 2022

    @ayappanec
    ContributorAuthor

    Can this be merged please ?

  11. added a commit that references this issue on Nov 16, 2022
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