[HTML5] Build failed with 4.1 release version

I have followed the instruction mentioned here:https://docs.unrealengine.com/latest/INT/Platforms/HTML5/GettingStarted/index.html
My build configuration is Solution Configuration: Development Solution Platform:HTML5, the compile progress goes smooth until nearly reach the end, then got a LLVM error: EXEC : LLVM error : bad use of setjmp, should only call it.I think the build enviroment is meet the requirement.I searched forum and answer hub, I’m not the only one have this issue, but no solution is provided. I hope there is an official answer for this question, is it just a bug or I missed something important?

Any replay is appreciated, thanks!

Hello Eros,

It looks like the current process is broken with the new update from emscripten. We’re working on fixing this but there is currently no ETA on the fix.

-Max B.

I had the same problem and believe to be related to building zlib which fails because of missing lseek definition.

In zlib source tree, find gzguts.h and add:

#include <unistd.h>

just before

#include <stdio.h>

(would be line 20 or so, ignore the 1. , there was no other way for me to get this to show properly)

The recompile everything from VS, and it should work. :slight_smile:

Got it! I’m looking forward to it. Thanks!

With all due respect Maximusdb3, you shouldn’t be accepting your own answer when you did not provide a solution. It skews the whole point of the system…if you just want to close the issue.

Hi, amigo, you means Engine/Source/ThirdParty/zlib/zlib-1.2.5/Src/gzguts.h right? I added #include just as you mentioned above, then I rebuild UE4 project in VS, but I still got the same error : (.

Hi, yes, that should be it.

I did not use local git for this (duh I should’ve) so I don’t know exactly if there was anything else I changed. I’m at work at the moment so I’ll double check if there was anything else when I get back home.

By the way did you clear the build and start all over again as there could be some leftover objects from prior builds?

Also, I noticed that if I try building again and again, it eventually worked, which is another inconsistency I noticed.

Hi amigo, thanks for your patient! I just found that with that error prompted, target file UE4Game.bc and UE4Game.js still generated, I’ll try to see if it will work, thanks a lot!
P.S. And you are right, If I try building for twice or more times, it will work : ).

Hello Amigo!

Thank you for providing help for the User. Anytime Staff answer a question on the AnswerHub, it’s flagged as the accepted answer. It’s not a perfect system and we’ll be on the look out in the future.

-Max B.

Meh, I didn’t know that - sorry if my post came out the wrong way, was not intentional, and in light of this revelation (to me) I feel silly. :slight_smile:

Did you try building this using the bat file from Engine/Build/BatchFiles/HTML5/BuildThirdParty.bat ?

Before that though, read the readme.txt in that folder and also edit _internal.bat and correct the path to VS.

Make sure you do this from the command prompt (hold Shift and right click in the above folder then select Command Prompt Here).

I just want to say, WOW, nice detective work amigo. With the information you provided, now the error has gone. Many many thanks!