HTML5 build fails

Hello,

I am using 4.11 for the mobile project. So far, I’ve successfully built it to iOS, and now trying to build for HTML5. I repeatedly get this error:

I have tried both Launching and packaging the project for HTML5 - all to get the same error above. What is the issue here?

double check your code – it’s showing that a function in your file UELinkerFixups.cpp is getting defined more than once.

i just scanned the current UE4 code base – and i do not see that file in there… if this is a UE4 file, can you tell me the path?

Hello,

The file is not mine. If it’s not a part of an engine, then it should be part of LE Extension Library code plugin that I use. I am wondering, however, why any other platform e.g. Android and iOS builds no prob, and only HTML5 fails.

looks like this is a generated file. and from a number other forum posting, i’m going to suggest that you run a “full rebuild” - or delete your intermediate folder and build again.

Did just that. Now a new error arises:

can you attach your build logs?

sure. Where can I find them? I looked in Saved/Logs, but these only appear to be editor logs.

Engine/Programs/AutomationTool/Saved/LogsUAT_Log.txt
this file is generated from both the editor and frontend.

also, out of curiosity, which one are you using to build/package for HTML5?

I have only tried to package from the editor.

Here’s the log:

[link text][1]

94696-uat_log.txt (58.2 KB)

Hey ,

These are the errors I’m seeing within your logs:

UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\emcc", line 1602, in <module>
UnrealBuildTool:     flush_js_optimizer_queue()
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\emcc", line 1508, in flush_js_optimizer_queue
UnrealBuildTool:     run_passes(chunks[i], 'js_opts_' + str(i), just_split='receiveJSON' in chunks[i], just_concat='emitJSON' in chunks[i])
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\emcc", line 1478, in run_passes
UnrealBuildTool:     final = shared.Building.js_optimizer(final, passes, debug_level >= 4, js_optimizer_extra_info, just_split=just_split, just_concat=just_concat)
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\tools\shared.py", line 1628, in js_optimizer
UnrealBuildTool:     ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat)
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\tools\js_optimizer.py", line 538, in run
UnrealBuildTool:     return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\tools\tempfiles.py", line 64, in run_and_clean
UnrealBuildTool:     return func()
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\tools\js_optimizer.py", line 538, in <lambda>
UnrealBuildTool:     return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat))
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\tools\js_optimizer.py", line 420, in run_on_js
UnrealBuildTool:     filenames = [write_chunk(chunks[i], i) for i in range(len(chunks))]
UnrealBuildTool:   File "C:\Unreal\UnrealEngine\Engine\Source\ThirdParty\HTML5\emsdk\emscripten\1.35.0\tools\js_optimizer.py", line 406, in write_chunk
UnrealBuildTool:     f.write(chunk)
UnrealBuildTool: IOError: [Errno 0] Error
UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Unreal\Timber\Binaries\HTML5\Timber.js

It looks like all of the errors you’re having trouble with relate back to your emscripten. Since you’re in 4.11, emscripten should be set up with the engine by default. Please make sure that you’ve went into the launcher and clicked the down-arrow beside launch on your version of the engine. Once you’ve done that, make sure you’ve selected options and you’ve installed everything relating to HTML5. If that’s already selected, you might want to verify your version of the engine again.

Let us know what happens, make sure to upload the full logs as a .txt file if there are any new errors.

Thanks!

it seems that your tmp folder might be full – can you make sure you have free hard space where your temp folder is located (usually c: – but, some of us use other drives…).

otherwise, the file might be locked (already opened? from another process) – make sure those executables have exited…

You are right. I have Temp on my ramdisk, and before it crashes it fills the whole ramdisk.
My ramdisk is 4 GB. Do you think that 8 GB would be enough for emscripten do it its work?

Update: 8 gigs turned out to be enough. The whole process took a very long time, but finished. Thank you :slight_smile: