[Solved] Build Error while IL2CPP/WebGL

Hello.

I faced build error when I building IL2CPP and WebGL.

Mono build is successfuly work.

I searched and tried :

  • Delete Library Folder

  • Delete Library/Bee folder

  • Changing Version 2021.3.37f1 to 2022.3.19f1 and 2022.3.26f1

  • Rename textures non-ascii character to english alphabet and underscore.

  • now assets have only english alphabet, digits, underscore, hyphen and space.

THERE ARE NO EXTERNAL PLUGINS.

And I also tried create new project, and build immediately but it still shows error.

help

Building Library\Bee\artifacts\WebGL\il2cpp\release_WebGL_wasm\gsntp1wluhzr.o failed with output:
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.    Program arguments: E:/2022.3.26f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\\clang++.exe -target wasm32-unknown-emscripten -DEMSCRIPTEN -D__EMSCRIPTEN_major__=3 -D__EMSCRIPTEN_minor__=1 -D__EMSCRIPTEN_tiny__=8 -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=E:\\2022.3.26f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\emscripten\\cache\\sysroot -Xclang -iwithsysroot/include\\compat -D__webgl__ -Wno-c++11-extensions -Wno-nonportable-include-path -ffunction-sections -fno-unwind-tables -fomit-frame-pointer -fno-threadsafe-statics -std=c++11 -Wno-#warnings -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -O3 -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DGC_NOT_DLL -DIL2CPP_DEFAULT_DATA_DIR_PATH=Data -DNDEBUG -I. -IE:/2022.3.26f1/Editor/Data/il2cpp/external/bdwgc/include -IE:/2022.3.26f1/Editor/Data/il2cpp/libil2cpp/pch -IE:/2022.3.26f1/Editor/Data/il2cpp/libil2cpp -IE:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include -IE:/2022.3.26f1/Editor/Data/il2cpp/libil2cpp/os/ClassLibraryPAL/brotli/include -IE:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Platforms/WebGL/Include -fcolor-diagnostics -fdiagnostics-absolute-paths -c -xc++ Library/Bee/artifacts/WebGL/il2cpp/release_WebGL_wasm/4fygqrsm19jp1.lump.cpp -o Library/Bee/artifacts/WebGL/il2cpp/release_WebGL_wasm/gsntp1wluhzr.o
1.    E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/../C/Internal/Baselib_CappedSemaphore_SemaphoreBased.inl.h:135:5 <Spelling=E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Platforms/WebGL/Include\BaselibPlatformSpecificEnvironment.h:54:30>: current parser token 'emscripten_debugger'
2.    E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/../C/Internal/Baselib_CappedSemaphore_SemaphoreBased.inl.h:131:1: parsing function body 'Baselib_CappedSemaphore_FreeInplace'
3.    E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/../C/Internal/Baselib_CappedSemaphore_SemaphoreBased.inl.h:131:1: in compound statement ('{}')
4.    E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/../C/Internal/Baselib_CappedSemaphore_SemaphoreBased.inl.h:135:5 <Spelling=E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/Assert.h:31:8>: in compound statement ('{}')
5.    E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/../C/Internal/Baselib_CappedSemaphore_SemaphoreBased.inl.h:135:5 <Spelling=E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/Assert.h:33:9>: in compound statement ('{}')
6.    E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/../C/Internal/Baselib_CappedSemaphore_SemaphoreBased.inl.h:135:5 <Spelling=E:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include/Internal/Assert.h:35:13>: in compound statement ('{}')
#0 0x00007ff7020a2e61 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x1002e61)
#1 0x00007ff7020a196e (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x100196e)
#2 0x00007ff702093baa (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0xff3baa)
#3 0x00007ff7034f42df (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x24542df)
#4 0x00007ff7033fd3f5 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x235d3f5)
#5 0x00007ff7034e9b65 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2449b65)
#6 0x00007ff703229bdf (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2189bdf)
#7 0x00007ff70322401e (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218401e)
#8 0x00007ff703228f23 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2188f23)
#9 0x00007ff70322829c (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218829c)
#10 0x00007ff703223050 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2183050)
#11 0x00007ff703228754 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2188754)
#12 0x00007ff70322829c (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218829c)
#13 0x00007ff70322611f (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218611f)
#14 0x00007ff7032287a5 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x21887a5)
#15 0x00007ff70322829c (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218829c)
#16 0x00007ff703223050 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2183050)
#17 0x00007ff703228754 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2188754)
#18 0x00007ff70322829c (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218829c)
#19 0x00007ff70322611f (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218611f)
#20 0x00007ff7032287a5 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x21887a5)
#21 0x00007ff70322829c (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218829c)
#22 0x00007ff703223050 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2183050)
#23 0x00007ff703228754 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2188754)
#24 0x00007ff70322829c (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218829c)
#25 0x00007ff703223aeb (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2183aeb)
#26 0x00007ff7032287de (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x21887de)
#27 0x00007ff70322829c (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x218829c)
#28 0x00007ff703223050 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2183050)
#29 0x00007ff7032258e0 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x21858e0)
#30 0x00007ff7031aeb20 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x210eb20)
#31 0x00007ff7031d4b1b (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2134b1b)
#32 0x00007ff7031ad18e (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x210d18e)
#33 0x00007ff7031ad339 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x210d339)
#34 0x00007ff7031addb5 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x210ddb5)
#35 0x00007ff7031b2571 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2112571)
#36 0x00007ff7031a8a12 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2108a12)
#37 0x00007ff7026c3857 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x1623857)
#38 0x00007ff704032628 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2f92628)
#39 0x00007ff7026c3332 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x1623332)
#40 0x00007ff70268df45 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x15edf45)
#41 0x00007ff70272a288 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x168a288)
#42 0x00007ff701113533 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x73533)
#43 0x00007ff70110e467 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x6e467)
#44 0x00007ff7025a64f7 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x15064f7)
#45 0x00007ff701e64e1d (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0xdc4e1d)
#46 0x00007ff7025a6ad0 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x1506ad0)
#47 0x00007ff702521fbf (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x1481fbf)
#48 0x00007ff70252230d (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x148230d)
#49 0x00007ff7025091be (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x14691be)
#50 0x00007ff7011108bb (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x708bb)
#51 0x00007ff703df3484 (E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm\clang++.exe+0x2d53484)
#52 0x00007fffda7d7344 (C:\Windows\System32\KERNEL32.DLL+0x17344)
#53 0x00007fffdaa626b1 (C:\Windows\SYSTEM32\ntdll.dll+0x526b1)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 14.0.1 (https://github-com-cache.bf.unity3d.com/Unity-Technologies/llvm-project c62053979489ccb002efe411c3af059addcb5d7d)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\llvm
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: C:\Users\punch\AppData\Local\Temp\4fygqrsm19jp1-0f6e4e.cpp
clang++: note: diagnostic msg: C:\Users\punch\AppData\Local\Temp\4fygqrsm19jp1-0f6e4e.sh
clang++: note: diagnostic msg:

********************
emcc: error: 'E:/2022.3.26f1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\clang++.exe -target wasm32-unknown-emscripten -DEMSCRIPTEN -D__EMSCRIPTEN_major__=3 -D__EMSCRIPTEN_minor__=1 -D__EMSCRIPTEN_tiny__=8 -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=E:\2022.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\cache\sysroot -Xclang -iwithsysroot/include\compat -D__webgl__ -Wno-c++11-extensions -Wno-nonportable-include-path -ffunction-sections -fno-unwind-tables -fomit-frame-pointer -fno-threadsafe-statics -std=c++11 -Wno-#warnings -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -O3 -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DGC_NOT_DLL -DIL2CPP_DEFAULT_DATA_DIR_PATH=Data -DNDEBUG -I. -IE:/2022.3.26f1/Editor/Data/il2cpp/external/bdwgc/include -IE:/2022.3.26f1/Editor/Data/il2cpp/libil2cpp/pch -IE:/2022.3.26f1/Editor/Data/il2cpp/libil2cpp -IE:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Include -IE:/2022.3.26f1/Editor/Data/il2cpp/libil2cpp/os/ClassLibraryPAL/brotli/include -IE:/2022.3.26f1/Editor/Data/il2cpp/external/baselib/Platforms/WebGL/Include -fcolor-diagnostics -fdiagnostics-absolute-paths -c -xc++ Library/Bee/artifacts/WebGL/il2cpp/release_WebGL_wasm/4fygqrsm19jp1.lump.cpp -o Library/Bee/artifacts/WebGL/il2cpp/release_WebGL_wasm/gsntp1wluhzr.o' failed (returned 1)

UnityEditor.GenericMenu:CatchMenu (object,string[],int)

Do you have a separate antivirus installed? If so, disable that or uninstall or exclude the project and editor folders from live scans.

Try installing a Unity editor version to its default location under Program Files and then create a new project in its default location under the user‘s home directory (eg Documents or Desktop) then try building for Web.

If this succeeds you have likely incorrect permissions either on E: or where the project is located.

No. I dont installed any vaccines and I turned off Windows Defender.

And I reinstalled my Windows, only install unity hub and editer (with VS2022) but it has same issue.

++ I tried build on my laptop, it works.

  • I booted my desktop in Safe Mode, it successfully built.

???..???

it’s was a CPU issues.

I’m using Intel Core i9-13900K, but BIOS setting is default.

I tried under-volt my CPU, it built successfully.

9803454--1407456--upload_2024-4-30_0-56-0.png

Referenced :
https://videocardz.com/newz/falcon-northwest-has-a-guide-for-mitigating-stability-issues-with-intel-raptor-lake-core-i9-cpus

1 Like

I can second this. I’ve been having those same errors since I built my new PC with an I9-14900K. I followed the referenced link to change up my BIOS a bit and I was able to build successfully. Thanks a million @Jade_Jinyong