x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

HTML5 build fails because undefined std:: symbols

My HTML5 build of a project containing a 3rd party C++ source including <array>, <vector> and <memory> (all c++ stdlib modules) fails with:

   error: undefined symbol: _ZNKSt3__220__vector_base_commonILb1EE20__throw_length_errorEv
   warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
   error: undefined symbol: __cxa_bad_typeid
   error: undefined symbol: __cxa_guard_acquire
   error: undefined symbol: __cxa_guard_release
   error: undefined symbol: __dynamic_cast
   error: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
   error: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
   error: undefined symbol: _ZTVN10__cxxabiv121__vmi_class_type_infoE
   error: undefined symbol: tzname
   Error: Aborting compilation due to previous errors
   shared:ERROR: '/home/kyra/src/UnrealEngine/Engine/Extras/ThirdPartyNotUE/emsdk/Linux/node/8.9.1_64bit/bin/node /home/kyra/src/UnrealEngine/Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/1.38.20/src/compiler.js /home/kyra/src/UnrealEngine/Engine/Intermediate/Build/HTML5/EmscriptenTemp/tmpmzlhxK.txt /home/kyra/src/UnrealEngine/Engine/Source/Runtime/HTML5/HTML5JS/Private/HTML5JavaScriptFx.js /home/kyra/src/UnrealEngine/Engine/Extras/ThirdPartyNotUE/emsdk/emscripten/1.38.20/src/library_pthread.js' failed (1)
 Took 155.912479s to run mono, ExitCode=5

which demangled resolves to:

  • std::__2::__vector_base_common<true>::__throw_length_error() const

  • __cxa_bad_typeid

  • __cxa_guard_acquire

  • __cxa_guard_release

  • __dynamic_cast

  • vtable for __cxxabiv1::__class_type_info

  • vtable for __cxxabiv1::__si_class_type_info

  • vtable for __cxxabiv1::__vmi_class_type_info

  • tzname

and according to emscripten this shouldn't happen (especially also since i'm never actually including time.h where tzname is declared, also pretty sure the "class type info" things are used for stuff like UClass, not by my code, so this seems to be some underlying issue instead).

does anyone have an idea what's going on here or how i could fix it?

EDIT: after doing a -clean, removing /Intermediate/Build/HTML5 and rebuilding, now it fails to find a bazillion other stdlib things: https://pastebin.com/YL5yqfju

Product Version: UE 4.22 Preview
Tags:
more ▼

asked Mar 11 '19 at 03:25 PM in Packaging & Deployment

avatar image

nonchip
14 1 3 5

avatar image nick.shin STAFF Mar 13 '19 at 09:53 PM

does building a basic template project -- with NO extra plugins enabled -- work on your development environment? (e.g. blueprint first person)

and then, when adding your wanted plugin -- does it still build for html5? the errors are basic and seems there's something interfering with the packaging.

also, you can turn on verbose build by editing:

 .../Engine/Source/Programs/UnrealBuildTool/Platform/HTML5/HTML5ToolChain.cs

and uncommenting:

 Environment.SetEnvironmentVariable("EMCC_DEBUG", "1");


(am interested in seeing the linker step...)

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

hello nonchip,

i have fixed this for 4.22.1 -- you can see the solution here:

https://github.com/EpicGames/UnrealEngine/commit/5956a33a84b13e909574ef1a128e2f71b0bf8483

more ▼

answered Apr 04 '19 at 06:54 PM

avatar image

nick.shin STAFF
471 5 4 9

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question