HTML5 Build __cxa_demangle symbol multiply defined

When I try to package HTML5 content, I get this linker error from emscripten:

MainFrameActions: Packaging (HTML5): UnrealBuildTool: C:/Program Files/Emscripten/clang/e1.22.0_64bit\llvm-link: link error in 'C:\Users\Robert\.emscripten_cache\libcxxabi.bc': Linking globals named '__cxa_demangle': symbol multiply defined!

MainFrameActions: Packaging (HTML5): UnrealBuildTool: Traceback (most recent call last):

MainFrameActions: Packaging (HTML5): UnrealBuildTool:   File "C:\Program Files\Emscripten\emscripten\1.22.0\emcc", line 1554, in <module>

MainFrameActions: Packaging (HTML5): UnrealBuildTool:     shared.Building.link(linker_inputs, in_temp(target_basename + '.bc'), force_archive_contents=len([temp for i, temp in temp_files if not temp.endswith(STATICLIB_ENDINGS)]) == 0)

I’ve tried to build it from 4.4.1, 4.4.2 (4.4 branch) and 4.5 (master branch) but I haven’t got it working yet. I’ve also tried different projects. This particular project was based on the Code Flyer template.

First, I don’t think the recommended sdk is 1.22, it is 1.21. That being said - if you want to compile with 1.22 you need a patch. Araxis Merge Patch

If you end up downgrading your sdk - make sure you do it cleanly ( remove older first ) - env var are not set correctly if you downgrade.