Skip to content

Fix the emscripten build - #82

Merged
dhdaines merged 2 commits into
dev.ej/prep-v0.6.8from
dev.ej/fix-em-build
Oct 28, 2026
Merged

dhdaines merged 2 commits into
dev.ej/prep-v0.6.8from
dev.ej/fix-em-build

Conversation

@joanise

@joanise joanise commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

PR Goal?

Fix the emscripten build so it works with a current emsdk.

  • -sSUPPORT_BIG_ENDIAN=1 apparently already didn't really work with WASM=0, but that was silently ignored. Now the emsdk makes it a fatal error to combine those options. The solution appears to be to simply remove the big-endian support flag. The feature is marked "experimental" and we get a warning about that, too. I have no big-endian hardware I could possibly test this on anyway!

  • just removing a warning: #ifndef EMSCRIPTEN issues a deprecation warning that says to use #ifndef __EMSCRIPTEN__ instead.

Fixes?

let CI test pass by fixing the emscripten build

Feedback sought?

confirmation that you agree it's OK to remove SUPPORT_BIG_ENDIAN.

If it's not OK everywhere, the two build commands in js/CMakeLists.txt that use -sWASM=1 instead of 0 could be changed to -sWASM=1 -sSUPPORT_BIG_ENDIAN=1 so we preserve it where it does not cause a compilation error.

Priority?

medium. I need to fix this before making a release, which I'd like to do for the same of readalongs on Windows with Python 3.15

Tests added?

no

How to test?

build and test and js stuff, like CI does

Confidence?

medium-high

@joanise
joanise requested a review from dhdaines October 20, 2026 21:41
@joanise joanise changed the title Dev.ej/fix em build Fix the emscripten build Oct 20, 2026
Compiling with -sWASM=0 -sSUPPORT_BIG_ENDIAN=1 is no longer allowed, and
yields a fatal error. It seems this combination was silently ignored but
probably never worked.

Big-endian support remains compatible with -sWASM=1 so we use it in
those cases only.
@joanise
joanise force-pushed the dev.ej/fix-em-build branch from eafaa14 to 8214222 Compare October 21, 2026 21:18
@joanise

joanise commented Oct 21, 2026 •

Copy link
Copy Markdown
Member Author

Update: on second thought, I decided it does not make sense to remove big-endian support from the configurations where it appears to work, so I put it back in for the -sWASM=1 cases.

@dhdaines
dhdaines merged commit 11b1ccd into dev.ej/prep-v0.6.8 Oct 28, 2026
30 checks passed
@dhdaines
dhdaines deleted the dev.ej/fix-em-build branch October 28, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants