Building hxcpp emscripten error: lseek is invalid in C99

I’m trying to build lime to support WASM.

  • I have VC++2017 Compiler as well GCC 8.10 [By default hxcpp uses VC++ Compiler on win I knew]
  • My EMSDK is v 1.37.26
  • hxcpp v4.0.4

when I run either of these:

haxelib run lime rebuild hxcpp emscripten
haxelib run lime rebuild hxcpp emscripten -Dmingw=d:/devsdk/mingw64

both gives me error:

I set EMCC_DEBUG=1 so I could get some info and the problem lies in:
lseek is invalid in C99, under the zlib things as you can see on the pic.

help??

I think this may be a fix recently to HXCPP:

I got another error when building hxcpp with the given patch.
HXCPP_VARS environment variable is undefined.

So I use older hxcpp adn compile works partially.
when emcc trying to get SDL ports, it got error: my internet runs quite fast, no network problemwerr

Also I have serious question: why WASM support doesn’t included on official release?

Supporting WASM feels like a moving target. We get support running for one version of Emscripten, then it stops working in the next, or we have difficulty getting the same environment running on a different host system platform.

I have not seen any performance benefits to WASM in my testing (though admittedly, these tests were more GPU- than CPU-bound) but with much larger binaries, more difficult debugging, much longer compile-times and the instability in maintaining support for the toolchain, it was dropped from haxelib releases.

However, I do think that it may be a valuable target in the future, and have no need to break the source compatibility we have so far. I believe our JS HTML5 target is better all-around right now, but some day in the future, WASM may surprise me and it will be stable, fast and the best way to go :wink:

ah okay… thanks.
I was curious on WASM with OpenFL, but for now I think I just need to skip it from my list :frowning:

I think 1.37.1 was the last version I confirmed was working properly

but we’d welcome any additional word/work on future Emscripten and WASM support for anyone who looks into this!