Builds failing after upgrading to 2022.2

Hi there,

I tried newly released 2022.2.1f1 but (clean) builds are now failing in the “Linking build.js (wasm)” phase with an unclear error message.

Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_ (referenced by top-level compiled C/C++ code)

upgraded from 2021.1.7f1, any idea what causes this and how I could fix and/or debug this error message?

1 Like

Some more info from Editor.log

##### Custom Environment Variables
EM_CONFIG=C:\Program Files\Unity\Hub\Editor\2022.2.1f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\.emscripten
EMSDK_PYTHON=C:\Program Files\Unity\Hub\Editor\2022.2.1f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\python\python.exe
EMCC_SKIP_SANITY_CHECK=1
EM_FROZEN_CACHE=1
EM_WORKAROUND_PYTHON_BUG_34780=1
EM_WORKAROUND_WIN7_BAD_ERRORLEVEL_BUG=1
##### ExitCode
1
##### Output
error: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_ (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: __ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_ may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
emcc: error: '"C:/Program Files/Unity/Hub/Editor/2022.2.1f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/node/node.exe" "C:\Program Files\Unity\Hub\Editor\2022.2.1f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\src\compiler.js" C:\Users\STEFAN~1\AppData\Local\Temp\tmp4_8xydfj.json' failed (returned 1)
*** Tundra build failed (965.34 seconds - 0:16:05), 346 items updated, 551 evaluated
ExitCode: 3 Duration: 16m:05s

Deleting and rebuilding the Library folder did not solve the issue

After some searching in files for this signature, it seems to be caused by a Draco plugin. This plugin might not support the latest Emscripten version?

Submitted an issue on the github page for the Draco plugin, still looking for advice on how to build.

3 Likes

got same issue on 22.2.4f1c1

Library/Bee/artifacts/WebGL/build/debug_WebGL_wasm/build.js: undefined symbol: ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5 (referenced by top-level compiled C/C++ code)

1 Like