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
cross-compile error: undefined reference to `__atomic_load_8' #125269
IIRC, the LINK variant only runs the linker, so it should work on a correctly setup cross-compiling environment. The RUN variant also runs the resulting executable, which will fail in a cross-compiling dev environment.
Activity
colesbury commentedon Oct 10, 2024
The
configurescript has a check for-latomic. I'm not sure why it's not working on your system:cpython/configure.ac
Lines 7498 to 7545 in 01fc3b3
colesbury commentedon Oct 10, 2024
Oh, I guess we disabled it for cross compilation (#109211). cc @vstinner @erlend-aasland
colesbury commentedon Oct 10, 2024
Could we use
AC_LINK_IFELSEinstead ofAC_RUN_IFELSEfor this check?vstinner commentedon Oct 11, 2024
I don't know, it's beyond my autotools skills :-) Maybe @erlend-aasland or @corona10 knows.
vstinner commentedon Oct 11, 2024
I don't know autotools. When Python is cross-compiled, does AC_RUN_IFELSE build the program? Or does it do nothing?
erlend-aasland commentedon Oct 11, 2024
IIRC, the LINK variant only runs the linker, so it should work on a correctly setup cross-compiling environment. The RUN variant also runs the resulting executable, which will fail in a cross-compiling dev environment.
erlend-aasland commentedon Oct 11, 2024
Ah, the check in our configure script defaults to not requiring libatomic if we are cross compiling. Perhaps we want to change that configure branch.
colesbury commentedon Oct 13, 2024
Looking at the past PRs:
-latomicthe default when cross-compiling-latomicto fixwasm32, which is cross-compiled but doesn't support-latomic.I think the link time check should be sufficient for both cross-compiling and native compilation (famous last words). I'll give it a go.
pythongh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed
erlend-aasland commentedon Oct 14, 2024
Yes, that aligns with my assumptions as well. Let's try.
gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (#…
pythongh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is nee…
[3.13] gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is ne…
colesbury commentedon Nov 4, 2024
This should be fixed now in the
mainand3.13branches.