-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cross-compile error: undefined reference to `__atomic_load_8' #125269
Comments
The Lines 7498 to 7545 in 01fc3b3
|
Oh, I guess we disabled it for cross compilation (#109211). cc @vstinner @erlend-aasland |
Could we use |
I don't know, it's beyond my autotools skills :-) Maybe @erlend-aasland or @corona10 knows. |
I don't know autotools. When Python is cross-compiled, does AC_RUN_IFELSE build the program? Or does it do nothing? |
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. |
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. |
Looking at the past PRs:
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. |
We previously used `AC_RUN_IF_ELSE` with a short test program to detect if `-latomic` is needed, but that requires choosing a specific default value when cross-compiling because the test program is not run. Some cross compilation targets like `wasm32-emscripten` do not support `-latomic`, while other cross compilation targets, like `arm-linux-gnueabi` require it.
Yes, that aligns with my assumptions as well. Let's try. |
…125416) We previously used `AC_RUN_IF_ELSE` with a short test program to detect if `-latomic` is needed, but that requires choosing a specific default value when cross-compiling because the test program is not run. Some cross compilation targets like `wasm32-emscripten` do not support `-latomic`, while other cross compilation targets, like `arm-linux-gnueabi` require it.
…ded (pythonGH-125416) We previously used `AC_RUN_IF_ELSE` with a short test program to detect if `-latomic` is needed, but that requires choosing a specific default value when cross-compiling because the test program is not run. Some cross compilation targets like `wasm32-emscripten` do not support `-latomic`, while other cross compilation targets, like `arm-linux-gnueabi` require it. (cherry picked from commit 8d42e2d) Co-authored-by: Sam Gross <[email protected]>
…eded (GH-125416) (#125493) gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (GH-125416) We previously used `AC_RUN_IF_ELSE` with a short test program to detect if `-latomic` is needed, but that requires choosing a specific default value when cross-compiling because the test program is not run. Some cross compilation targets like `wasm32-emscripten` do not support `-latomic`, while other cross compilation targets, like `arm-linux-gnueabi` require it. (cherry picked from commit 8d42e2d) Co-authored-by: Sam Gross <[email protected]>
This should be fixed now in the |
Bug report
Bug description:
Should not configure script check if
-latomic
is needed?getting build error when cross-compile:
configure cmd line:
workaround
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
AC_LINK_IF_ELSE
to detect if-latomic
is needed #125416AC_LINK_IF_ELSE
to detect if-latomic
is needed (GH-125416) #125493The text was updated successfully, but these errors were encountered: