-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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-89640: properly detect float word ordering on Linux #125571
gh-89640: properly detect float word ordering on Linux #125571
Conversation
Prerequisite: python/cpython-devcontainers#23 autoconf-archive patch by Dan Amelang.
@damelang, FYI I get this error on WASI:
At first, I thought using |
Hi Erlend, I may be stating the obvious, but it looks like your use of autoconf with a WASM compiler (clang?) is misconfigured. $EXEEXT is set to ".wasm" somewhere in the configuration, but the compiler is generating a binary with something else as the extension (maybe ".wasi", or quite possible no extension at all, in which case $EXEEXT maybe should be set to the empty string?). I've never built an autoconf-based project with a WASM compiler before, and maybe it's not common enough of a situation for others to have run into this issue. It's not a great time for me to dive into this, but if I did, I'd poke around to see where $EXEEXT is set to ".wasm". And I'd look at what extension the compiler is actually giving the WASI binaries. One of those hopefully makes more sense to use than the other, and you can simply update the configuration/code to only use that one. I wish I knew internals well enough to tell you where to go poking around 🤷🏼♂️ |
I've got a semi-functional WASI dev environment up and running with GitHub Codespaces, and I notice a few things:
Seems our |
From the top of my head, I see two options:
Let's go for the latter. I'll create an issue and a PR. |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, @erlend-aasland, I could not cleanly backport this to
|
Sorry, @erlend-aasland, I could not cleanly backport this to
|
If we are to backport this, we need to first backport #124657. |
Hmm this change broke float word order detection on Emscripten, because |
What about checking both the object file and the executable and setting the endian order if a match is found in either? |
@hoodmane, is there an Emscripten buildbot? How can I reproduce the failure? |
No, I'm working on setting up a buildbot for Emscripten again after the steering council approved switching adding back tier 3 support for it last week. Applying this patch to --- a/aclocal.m4
+++ b/aclocal.m4
@@ -112,10 +112,10 @@ int main (int argc, char *argv[])
]])], [
-if grep noonsees conftest$EXEEXT >/dev/null ; then
+if grep noonsees conftest$EXEEXT >/dev/null || grep noonsees conftest.$ac_objext >/dev/null; then
ax_cv_c_float_words_bigendian=yes
fi
-if grep seesnoon conftest$EXEEXT >/dev/null ; then
+if grep seesnoon conftest$EXEEXT >/dev/null || grep seesnoon conftest.$ac_objext >/dev/null; then
if test "$ax_cv_c_float_words_bigendian" = unknown; then
ax_cv_c_float_words_bigendian=no
else For now, to reproduce:
|
Nevermind, the patch doesn't work because |
This comment was marked as resolved.
This comment was marked as resolved.
@hoodmane, I can confirm that this breaks Emscripten. I'll reopen the issue. Perhaps a better solution is to directly manipulate |
What does
and then look at |
It's the suffix the Python executable gets in the Makefile. |
…ython#126387) Properly detect float word ordering on Linux (pythongh-125571) autoconf-archive patch by Dan Amelang. (cherry picked from commit 26d6277) Hardcode WASM float word ordering to little endian (pythongh-126387) (cherry picked from commit 532fc08)
Prerequisite: python/cpython-devcontainers#23
autoconf-archive patch by Dan Amelang.