Skip to content

ARM Raspbian 3.x fails to build _testcapi extension: undefined symbol: __atomic_fetch_or_8 #109054

Closed
@vstinner

Description

@vstinner

I supposed that the build error is related to Modules/_testcapi/pyatomic.c and Include/cpython/pyatomic.h.

"Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware."

Buildbot worker says: "Raspberry Pi 4 B running Raspbian (Bullseye 11.x)."

test.pythoninfo:

  • CC.version: gcc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110
  • platform.architecture: 32bit ELF
  • platform.libc_ver: glibc 2.31
  • platform.platform: Linux-6.1.21-v8+-aarch64-with-glibc2.31
  • sysconfig[PY_CFLAGS]: -fno-strict-overflow -DNDEBUG -g -O3 -Wall -UNDEBUG
  • sysconfig[PY_CFLAGS_NODIST]: -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal
  • sysconfig[PY_STDMODULE_CFLAGS]: -fno-strict-overflow -DNDEBUG -g -O3 -Wall -UNDEBUG -std=c11 -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include

Logs:

gcc -pthread -shared      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/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-arm-linux-gnueabihf.so
[ERROR] _testcapi failed to import: /var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/build/lib.linux-aarch64-3.13/_testcapi.cpython-313-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_or_8
The necessary bits to build these optional modules were not found:
_tkinter              _uuid                                    
To find the necessary bits, look in configure.ac and config.log.

Following modules built successfully but were removed because they could not be imported:
_testcapi                                                      

Checked 107 modules (31 built-in, 72 shared, 1 n/a on linux-aarch64, 0 disabled, 2 missing, 1 failed on import)

logs: https://buildbot.python.org/all/#/builders/424/builds/4849

cc @colesbury @gpshead

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions