-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
gh-109054: Don't use libatomic on cross-compilation #109211
Conversation
Should it be documented in https://docs.python.org/dev/using/configure.html? |
This PR should fix the 3 wasm32-emscripten buildbots. See: |
!buildbot wasm32-emscripten |
🤖 New build scheduled with the buildbot fleet by @vstinner for commit bed957b 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
The "Configure host Python" step now says no for libatomic, as expected, good!
|
Thanks @vstinner! |
test_threading failed on Windows x64: it's an unrelated known bug, see: #108987 (I proposed a fix). I re-ran the Windows x64 job. |
configure no longer uses libatomic by default when Python is cross-compiled. The LIBATOMIC variable can be set manually in this case: ./configure LIBATOMIC="-latomic" (...)
bed957b
to
0a69b27
Compare
I wrote PR #109224 to document |
LGTM! |
]])], | ||
[ac_cv_libatomic_needed=no], dnl build succeeded | ||
[ac_cv_libatomic_needed=yes], dnl build failed | ||
[ac_cv_libatomic_needed=no]) dnl cross compilation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could have used ac_cv_libatomic_needed=n/a
for a more accurate result message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't know this value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't know this value.
Actually, the value is up to you; it's not a magical GNU Autoconf value :) See docs for AC_CACHE_CHECK. The signature for that macro is:
AC_CACHE_CHECK (message, cache-id, commands-to-set-it)
Quoting the docs:
It calls
AC_MSG_CHECKING
for message, thenAC_CACHE_VAL
with the cache-id and commands arguments, andAC_MSG_RESULT
with cache-id.
In out case, cache-id is ac_cv_libatomic_needed
. Whatever we set it to will be displayed to the user at the end of the check (via the implicit AC_MSG_RESULT
call). So if we set ac_cv_libatomic_needed
to n/a
, the user should see this when cross-compiling:
checking whether libatomic is needed by <pyatomic.h>... n/a
Currently, the user will see this when cross-compiling:
checking whether libatomic is needed by <pyatomic.h>... no
The "no" may lead the user to incorrectly assume that configure
actually checked whether libatomic was needed (and that configure
concluded it was not).
I think it may be worth it to adjust this message. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, my suggestion is made moot by #109344
configure no longer uses libatomic by default when Python is cross-compiled. The LIBATOMIC variable can be set manually in this case: