Skip to content
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

Fix for newest Emscripten #306

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

erysdren
Copy link
Contributor

@erysdren erysdren commented Feb 2, 2025

On November 29 2022, the Emscripten setting STACK_SIZE was lowered from 5MB to 64kb. FTEQW does not work with a 64kb stack, so I have upped it back to 5MB. Because the FTEQW GitHub runner uses a really old version of Emscripten, I had to use the TOTAL_STACK setting (it was renamed to STACK_SIZE on November 8 2022).

Tested working with Emscripten 3.1.72-git on my Arch Linux machine.

@dsvensson
Copy link
Contributor

dsvensson commented Feb 3, 2025

The reason for emsdk being so old in GH CI is because it uses "The Spike Version" because newer versions have been broken for one reason or another, nobody had spent time on figuring out what was needed to make newer versions work. Worth noting it was broken for other reasons before emsdk's stack size change. Not sure if it's worth having that old version working given how easy it is to select any version with emsdk. If you change that, then you could also throw in installation of libpng-dev in the CI runner to fix that other build issue. otoh, if it works with both old and new that's nice. Have you noticed any differences? The 2.0.12 version doesn't provide arm64 versions, so that will make macOS dev a much better experience compared to running intel docker.

@dsvensson
Copy link
Contributor

dsvensson commented Feb 7, 2025

I tried this out yesterday, and it resulted in the same issues I had last time. Both 3.1.72 and 4.x. Think it was with 4.x there was some issue with not finding epoll, but regardless of that part when I tried loading it in the browser I ended up with Browser.requestAnimationFrame not found exception in the console. As I had other things to fix I just reverted back to 2.0.12 again to make progress. Do you have additional changes to get this working? Might also be that I got rekt by a super sticky cache, will revisit during the weekend.

The hope of this working natively on macOS was also crushed. zlib build system uses libtool, and that doesn't recognize the object files when doing emscripten. Should probably work fine with arm64 docker which is faster than intel docker which 2.0.12 is limited to as there's no arm64 build of that ancient version. I guess moving to emscripten's USE_ZLIB could work, but that requires more changes to the Makefile than I'd like to expose myself to. Would be nice if the cmake files could use emscripten, but that's also a big project (adding makelibs equivalent etc).

@Xylemon
Copy link
Collaborator

Xylemon commented Feb 21, 2025

@Shpoike ping

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.

3 participants