Uh oh!
There was an error while loading. Please reload this page.
gh-89640: properly detect float word ordering on Linux - #125571
Conversation
Prerequisite: python/cpython-devcontainers#23 autoconf-archive patch by Dan Amelang.
erlend-aasland
commented
Oct 16, 2024
@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 🤷🏼♂️ |
erlend-aasland
commented
Oct 18, 2024
I've got a semi-functional WASI dev environment up and running with GitHub Codespaces, and I notice a few things:
Seems our |
erlend-aasland
commented
Oct 18, 2024
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 |
erlend-aasland
commented
Oct 26, 2024
If we are to backport this, we need to first backport #124657. |
hoodmane
commented
Oct 30, 2024
Hmm this change broke float word order detection on Emscripten, because |
hoodmane
commented
Oct 30, 2024
What about checking both the object file and the executable and setting the endian order if a match is found in either? |
erlend-aasland
commented
Oct 30, 2024
@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
elseFor now, to reproduce:
|
hoodmane
commented
Oct 30, 2024
Nevermind, the patch doesn't work because |
This comment was marked as resolved.
This comment was marked as resolved.
erlend-aasland
commented
Oct 31, 2024
@hoodmane, I can confirm that this breaks Emscripten. I'll reopen the issue. Perhaps a better solution is to directly manipulate |
hoodmane
commented
Oct 31, 2024
What does and then look at |
erlend-aasland
commented
Nov 1, 2024
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)
…125571) autoconf-archive patch by Dan Amelang.
Prerequisite: python/cpython-devcontainers#23
autoconf-archive patch by Dan Amelang.