Open aardappel opened 6 years ago
Thanks to the helpful error message that was quick to fix, but I wasn't expecting this when running make.
I blame that one on the Cube2 build system running ENet's configure step during make ;)
Second, I had to add -DEMSCRIPTEN=1 to the Makefile to make it build. Not sure where this normally comes from.
I think we used to define that, and still do for compatibility's sake in the asm.js backend. Anyhow, the we should use the proper __EMSCRIPTEN__
define instead. I fixed that now.
I do see a runtime failure though, so something seems to have broken here.
Hey, maybe @lsalzman could fix that then :P
You missed some, e.g. engine/main.cpp:604
Thanks, fixed. Also fixed some options that needed updating after recent emscripten changes. It now works in -O2, but not -Os (which uses the new metadce stuff, which apparently has a bug).
Ok, I figured out the JSDCE bug, fix is in https://github.com/kripken/emscripten/pull/5965 . That replaces the previous PR, which was not correct.
With the later PR in emscripten, everything looks ok, at least using the default asm2wasm path. Does it work with the wasm backend too?
With Emscripten and BananaBread from today, building now works fine, running still gives TypeError: Module.FS_createPath is not a function
.
Ah, that's a recent filesystem emulation change on emscripten. Fixed on master now.
I'm sure this has something to do with me using tools from https://wasm-stat.us/waterfall, but wanted to report it anyway just in case any of these problems are worth fixing:
First, I got:
Thanks to the helpful error message that was quick to fix, but I wasn't expecting this when running make.
Second, I had to add
-DEMSCRIPTEN=1
to the Makefile to make it build. Not sure where this normally comes from.Then when running, it manages to init most of the engine, when it gets to:
There's also still quite a few warnings that may have popped up because of the recent clang, and some messages saying it can't find SDL_Image and similar, but that doesn't appear to prevent it from building.