Hi,
I was building a microgame for educational purposes, and made a WebGL build with Unity Editor 2020.3.26f1 personal .
It didn’t build and showed this error. I saw multiple threads/discussions for WebGL errors but none was helpful for me. So, I am posting my own error here, in hopes to get solution for this. This WebGL build didn’t work in previous version of Unity Editor 2020.3.4f1 for any projects, so i thought it was editor problem which it isn’t i think.
Console error 1:
Exception: Unity.IL2CPP.Building.BuilderFailedException: ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
Invocation was: Executable: “C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe”
Arguments: -E “C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++” -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -Wno-null-conversion -std=c++11 -O3 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DNDEBUG -I"C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\il2cpp\external\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\il2cpp\external\xxHash" -I"C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\il2cpp\external\baselib\Include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\il2cpp\external\baselib\Platforms\WebGL\Include" -I"C:\Program Files\Unity\Hub\Editor\2020.3.26f1\Editor\Data\il2cpp\libil2cpp\pch" -I"C:\Users\Lenovo\Unity Projects\Surface Reflection microgame\Library\Il2cppBuildCache\WebGL\il2cppOutput" “C:\Users\Lenovo\Unity Projects\Surface Reflection microgame\Library\Il2cppBuildCache\WebGL\il2cppOutput\mscorlib9.cpp” -o “C:\Users\Lenovo\Unity Projects\Surface Reflection microgame\Library\il2cpp_cache\885F9C30E35E2C39D74C45A02255448F.o”
at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Compilation.CompilationDriver.Run(RuntimePlatform platform, BuildingOptions buildingOptions, ReadOnlyCollection1 matchedAssemblyMethodSourceFiles)
at il2cpp.Program.DoRun(String[ ] args, RuntimePlatform platform, BuildingOptions buildingOptions, Boolean throwExceptions)
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <55729f52d042492e9efc384182ae2feb>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo) (at <55729f52d042492e9efc384182ae2feb>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <55729f52d042492e9efc384182ae2feb>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <55729f52d042492e9efc384182ae2feb>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditor.WebGL.WebGlBuildPostprocessor.CompileBuild (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:365)
UnityEditor.WebGL.WebGlBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at /Users/bokken/buildslave/unity/build/PlatformDependent/WebGL/Extensions/Unity.WebGL.extensions/BuildPostprocessor.cs:913)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <55729f52d042492e9efc384182ae2feb>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Console error 2:
Build completed with a result of ‘Failed’ in 123 seconds (123302 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Console error 3:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <55729f52d042492e9efc384182ae2feb>:0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <55729f52d042492e9efc384182ae2feb>:0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Console error 4:
[Version and Build] Build failed! 00:02:03.3016934
UnityEngine.Debug:LogError (object)
Unity.Play.Publisher.Editor.PublisherBuildProcessor/d__7:MoveNext () (at Library/PackageCache/com.unity.connect.share@4.2.3/Editor/PublisherBuildProcessor.cs:77)
Unity.EditorCoroutines.Editor.EditorCoroutine/YieldProcessor:MoveNext (System.Collections.IEnumerator) (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:80)
Unity.EditorCoroutines.Editor.EditorCoroutine:ProcessIEnumeratorRecursive (System.Collections.IEnumerator) (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:134)
Unity.EditorCoroutines.Editor.EditorCoroutine:MoveNext () (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:115)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
[It is a bit urgent for me to create a WebGL build, it is intern work related. Windows build works fine but those are not accepted.]
Thanks for your time.