Skip to content

AIX fails to build _testcapi extension: Undefined symbol: .__atomic_fetch_or_8 #110828

Description

@ayappanec

Bug report

Bug description:

Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp      Modules/_testcapimodule.o Modules/_testcapi/vectorcall.o Modules/_testcapi/vectorcall_limited.o Modules/_testcapi/heaptype.o Modules/_testcapi/abstract.o Modules/_testcapi/unicode.o Modules/_testcapi/dict.o Modules/_testcapi/set.o Modules/_testcapi/getargs.o Modules/_testcapi/datetime.o Modules/_testcapi/docstring.o Modules/_testcapi/mem.o Modules/_testcapi/watchers.o Modules/_testcapi/long.o Modules/_testcapi/float.o Modules/_testcapi/structmember.o Modules/_testcapi/exceptions.o Modules/_testcapi/code.o Modules/_testcapi/buffer.o Modules/_testcapi/pyatomic.o Modules/_testcapi/pyos.o Modules/_testcapi/immortal.o Modules/_testcapi/heaptype_relative.o Modules/_testcapi/gc.o   -o Modules/_testcapi.cpython-313.so
ld: 0711-327 WARNING: Entry point not found: PyInit__testcapi.cpython-313
ld: 0711-317 ERROR: Undefined symbol: .__atomic_fetch_or_8
ld: 0711-317 ERROR: Undefined symbol: .__atomic_fetch_and_8
ld: 0711-317 ERROR: Undefined symbol: .__atomic_load_8
ld: 0711-317 ERROR: Undefined symbol: .__atomic_store_8
ld: 0711-317 ERROR: Undefined symbol: .__atomic_exchange_8
ld: 0711-317 ERROR: Undefined symbol: .__atomic_compare_exchange_8
ld: 0711-317 ERROR: Undefined symbol: .__atomic_fetch_add_8
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
gmake: *** [Makefile:3159: Modules/_testcapi.cpython-313.so] Error 1

This is a regression as this issue was fixed through #109101 but later changes made to configure through #109344 broke it. LIBATOMIC in configure is replaced with LIBS but LIBS is never passed during the _testcapi module creation.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Activity

  1. added
    buildThe build process and cross-build
    on Oct 13, 2023
  2. colesbury commented on Oct 16, 2023

    @colesbury
    Contributor

    Sorry about that! I can look at fixing this once there is a way for me to actually test PRs on AIX (python/buildmaster-config#419)

  3. added a commit that references this issue on Oct 17, 2023
  4. ayappanec commented on Oct 17, 2023

    @ayappanec
    ContributorAuthor

    Sorry about that! I can look at fixing this once there is a way for me to actually test PRs on AIX (python/buildmaster-config#419)

    I have a fix for it. I will send a PR soon. Please review it.

  5. added a commit that references this issue on Oct 18, 2023
  6. added a commit that references this issue on Oct 22, 2023
  7. erlend-aasland commented on Oct 22, 2023

    @erlend-aasland
    Contributor

    Resolved with #110962

  8. added a commit that references this issue on Feb 11, 2024
  9. added a commit that references this issue on Sep 2, 2024
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