Skip to content

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

Closed
@ayappanec

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

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