You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ARM Raspbian 3.x fails to build _testcapi extension: undefined symbol: __atomic_fetch_or_8 #109054
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)
From @vstinner's comments and playing with https://gcc.godbolt.org/, it looks like the 8 byte (64-bit) use library support with the default compiler options on this platform. GCC doesn't need the library support if you target -march=armv7-a (the ARMv7-A and ARMv7-R profiles support the ldrexd "double-word" exclusive load).
Some random other things that I learned, but are probably not important:
Raspbian is now called Raspberry Pi OS
The Raspberry Pi Model B's have used a 64-bit CPUs (armv8-a) since ~2016, but the Raspbian/Raspberry Pi OS was 32-bit only until 2022 and it seems like 32-bit OS is still the most commonly used
Activity
vstinner commentedon Sep 7, 2023
Maybe Python should be linked to
-latomic. Old GCC discussions:vstinner commentedon Sep 7, 2023
Another example:
vstinner commentedon Sep 7, 2023
I confirm that this regression comes from the commit 2bd960b.
colesbury commentedon Sep 7, 2023
I'm on vacation this week, but I'll have some time to look at this this evening.
vstinner commentedon Sep 7, 2023
I never heard about Raspbian before. I was curious about it, so I added
platform.freedesktop_os_release()totest.pythoninfo:-)pythongh-109054: configure adds libatomic if needed
pythongh-109054: configure checks if libatomic is needed
pythongh-109054: configure checks if libatomic is needed
pythongh-109054: configure checks if libatomic is needed
pythongh-109054: configure checks if libatomic is needed
pythongh-109054: configure checks if libatomic is needed
pythongh-109054: configure checks if libatomic is needed
colesbury commentedon Sep 8, 2023
From @vstinner's comments and playing with https://gcc.godbolt.org/, it looks like the 8 byte (64-bit) use library support with the default compiler options on this platform. GCC doesn't need the library support if you target
-march=armv7-a(the ARMv7-A and ARMv7-R profiles support theldrexd"double-word" exclusive load).Some random other things that I learned, but are probably not important:
pythongh-109054: configure checks if libatomic is needed
pythongh-109054: configure checks if libatomic is needed
19 remaining items
pythongh-109054: Don't use libatomic on cross-compilation
pythongh-109054: Don't use libatomic on cross-compilation
pythongh-109054: Document configue options
pythongh-109054: Document configue variables
gh-109054: Don't use libatomic on cross-compilation (#109211)
pythongh-109054: Document configue variables
pythongh-109054: Document configue variables
pythongh-109054: Document configue variables
pythongh-109054: Document configue variables
pythongh-109054: Document configue variables
pythongh-109054: Document configue variables
gh-109054: Document configure variables (#109224)
pythongh-109054: Document configure variables (python#109224)
pythongh-109054: Document configure variables (python#109224)