# WebGL always gets stuck building player - building native binary with IL2CPP

Discussion in 'WebGL' started by unklebooey1, Apr 13, 2017.

1. ### unklebooey1

Joined:
Jul 30, 2013
Posts:
4
EDIT: I was able to solve my issue with publishing to WebGL by disabling the FIPS setting in the regedit. See the thread I created here:

I am using Unity 5.6.0f3, Windows 7 (64-bit), and without fail, the WebGL build always freezes up on the step "Building native binary with IL2CPP". IL2CPP then proceeds to quit.

At first I was using a project that had plugins, such as UFPS and ProCore. I thought those may be the issue, so I tried building to WebGL with a blank project. I still get the same error. Attached is the editor log.

Thanks!

Perry

#### Attached Files:

• ###### Editor1.txt
File size:
139.7 KB
Views:
974
Last edited: Apr 26, 2017
2. ### mryechkin-cti

Joined:
Apr 20, 2017
Posts:
1
Having the exact same issue in OSX too (Unity 5.6.0f3 as well). Just trying to build the simple Roll A Ball example project, and it gets stuck on that step. Any help would be appreciated

EDIT: Attaching my Editor.log as well

#### Attached Files:

• ###### Editor.log.txt
File size:
75 KB
Views:
982
Last edited: Apr 20, 2017
3. ### Dragoan

Joined:
Feb 26, 2014
Posts:
3
Hey I've been getting the same error here and have tried a myriad of fixes with no luck. I had started a separate thread about it here: http://answers.unity3d.com/questions/1337886/webgl-build-error-in-56-problem-with-python-script.html

Something interesting I've found is that I rolled back my version of unity to 5.5 and also 5.4 separately and still get the error, even though I was able to build WebGL with those earlier. That leads me to believe it was a windows update error as shown here: https://forum.unity3d.com/threads/webgl-will-only-publish-with-fips-disabled.468004/

Can anyone else confirm this or roll back their unity to the same effect?

### Unity Technologies

Joined:
Jul 9, 2013
Posts:
1,653
Do you get the same error: "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms." ?

### Unity Technologies

Joined:
Jul 9, 2013
Posts:
1,653
yours seems a different issue but I can't tell from the log.

Joined:
Jan 21, 2016
Posts:
25
unity 5.6.0p3 error when try to build webgl

stdout:
Building build.bc with EmscriptenToolChain.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: CRITICAL:root:Could not verify LLVM version: argument of type 'NoneType' is not iterable
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================
(no targets could be identified: need more than 1 value to unpack)
===========================================================================
CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:rootEmscripten: Running sanity checks)
CRITICAL:root:failing sanity checks due to previous fastcomp failure

Invocation was: Executable: "C:\Program Files\Unity 5.60p3\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
Arguments: "C:\Program Files\Unity 5.60p3\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++" -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -std=c++11 -O1 -g0 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DIL2CPP_DEVELOPMENT=1 -I"C:\Program Files\Unity 5.60p3\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity 5.60p3\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Mada\Documents\pixel-gun-warfare 5.6.0P3\Temp\StagingArea\Data\il2cppOutput" "C:\Users\Mada\Documents\pixel-gun-warfare 5.6.0P3\Temp\StagingArea\Data\il2cppOutput\Bulk_Generics_8.cpp" -o "C:\Users\Mada\Documents\pixel-gun-warfare 5.6.0P3\Library\il2cpp_cache\88204603C90775569C3DB83342CFDB93.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
stderr:

Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: CRITICAL:root:Could not verify LLVM version: argument of type 'NoneType' is not iterable
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================
(no targets could be identified: need more than 1 value to unpack)
===========================================================================
CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:rootEmscripten: Running sanity checks)
CRITICAL:root:failing sanity checks due to previous fastcomp failure

Invocation was: Executable: "C:\Program Files\Unity 5.60p3\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
Arguments: "C:\Program Files\Unity 5.60p3\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\em++" -Wno-unused-value -Wno-invalid-offsetof -nostdinc -fno-strict-overflow -std=c++11 -O1 -g0 -Oz -DIL2CPP_EXCEPTION_DISABLED=1 -DIL2CPP_DEVELOPMENT=1 -I"C:\Program Files\Unity 5.60p3\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity 5.60p3\Editor\Data\il2cpp\external\boehmgc\include" -I"C:\Users\Mada\Documents\pixel-gun-warfare 5.6.0P3\Temp\StagingArea\Data\il2cppOutput" "C:\Users\Mada\Documents\pixel-gun-warfare 5.6.0P3\Temp\StagingArea\Data\il2cppOutput\Bulk_Generics_8.cpp" -o "C:\Users\Mada\Documents\pixel-gun-warfare 5.6.0P3\Library\il2cpp_cache\88204603C90775569C3DB83342CFDB93.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List1, Action1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:313)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:304)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:151)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:41)
UnityEditor.HostView:OnGUI()

Joined:
Jun 21, 2017
Posts:
1
I am having exactly the same issue. It starts off normally and gets stuck at the part where it says
"Building native binary with IL2CPP."

Joined:
Jul 10, 2017
Posts:
2
Same here...

9. ### John_Anderson

Joined:
Jul 10, 2017
Posts:
2
I don't know if this serves any help, but I just tried for the 10th time and suddenly it worked lol

greengoat likes this.
10. ### Poemind

Joined:
May 25, 2011
Posts:
30
I'm having this issue in 2017.1

11. ### Ewanuk

Joined:
Jul 9, 2011
Posts:
246
Same, webGL builds only work about 25% of the time for me. Very frustrating.

12. ### mistypixstudios

Joined:
Sep 23, 2015
Posts:
1
what is frustrating is that no one from unity ever replies as to what is the status of the fix, ever. Unity loves to send promotional emails , but not fix bugs.

It actually takes a very long time in my case to build a webgl project, first i thought that unity has hung, but i just kept waiting, and after a long long time, the project finally got built. so i suggest to everyone to just wait out the build process, it might look like unity is not responding, but it will build the project finally.

Last edited: Sep 6, 2017
shelkeanmol and Tony_N like this.

### Unity Technologies

Joined:
Jul 9, 2013
Posts:
1,653
Any specific bug? If you post the bug number here, I am happy check the status for you (or perhaps create a new thread if it's not related to this one)

14. ### johnleniel

Joined:
Feb 26, 2018
Posts:
1
Same problem here building the Space Shooter tutorial [ Space Shooter tutorial ] in a virtual machine running Parallels Desktop 13 with Windows 10 and Unity version 2017.3.1f1.

The build gets stuck in:

"Building native binary with IL2CPP."

shelkeanmol likes this.

### Unity Technologies

Joined:
Jul 21, 2014
Posts:
4,418
Can you use a tool like Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) to capture the process tree below Unity.exe when this happens? That might help us understand what is causing the problem,.

Joined:
Apr 4, 2018
Posts:
1
Same here

Joined:
Feb 18, 2016
Posts:
1
Same here

### Unity Technologies

Joined:
Jul 21, 2014
Posts:
4,418
@hikke @Chris85s

Can you use the tool I mentioned above to gather any additional information?

19. ### davenirline

Joined:
Jul 7, 2010
Posts:
608
This happened to me, too. I'm building for Windows 64bit Standalone. Here's a mini dump file. Hope it helps.

### Unity Technologies

Joined:
Jul 21, 2014
Posts:
4,418
@davenirline

Thanks for the information. Usually the time is not spent in the Unity.exe process, but in one of its child processes. For a Windows standalone build, that will probably be in a cl.exe process (the C++ compiler). Can you drill down to that process? The key thing we need is its command line arguments, so we can see what source file is taking too long to compile.

21. ### davenirline

Joined:
Jul 7, 2010
Posts:
608
Sorry, I already killed the process. I'll post it here when I build again.

22. ### davenirline

Joined:
Jul 7, 2010
Posts:
608
And oh, I've also tried it in cloud build. It failed with this error:

/BUILD_PATH/.mason/buildpacks/unity/bin/compile:367:in run_build': ! build failed - export directory is empty! (RuntimeError)
from /BUILD_PATH/.mason/buildpacks/unity/bin/compile:618:in `<main>'
! build of 'test-pc-64bit' failed. compile failed

23. ### JohnyF66

Joined:
Oct 21, 2017
Posts:
1
same problem here

24. ### ragmondo

Joined:
Aug 23, 2018
Posts:
1
Same issue here. A "hello world" in unity freezes (flatlines CPU) at the same step

25. ### patrickgh3

Joined:
May 22, 2015
Posts:
1
Yesterday the same happened to me on 2018.2.10f1. Today I restarted my computer and it happened again. After force quitting unity and trying a second time though, it stayed on "Compile WebAssembly module" for ~10 minutes, but then the build succeeded. Subsequent 2 builds succeeded, and another 2 builds after restarting unity and modifying the game succeeded too. Strange... Maybe I just wasn't waiting long enough on "Building native binary with IL2CPP".

Joined:
Nov 12, 2013
Posts:
26
For what it is worth, I have a Ryzen 2700x and I just let my computer churn at "building native binary with IL2CPP" for about 4 minutes, then "Compile WebAssembly module" for another 12 minutes and it finally finished. Pretty ridiculous amount of processing time. It is also worth noting that my CPU was pinned at 100% utilization for most of that time and caused complete freezing of my computer.

27. ### Matinet11

Joined:
Dec 19, 2018
Posts:
1
Same problem here, I am using Unity2018.3of2 and gets stuck in:
"BUILDING PLAYER; building native binary with IL2CPP..." I tried like 5 times already but didnt work, always while triyng to build it in WebGL

28. ### bugfinders

Joined:
Jul 5, 2018
Posts:
175
A project that compiles at home in around 4 minutes, has been compiling on my machine here 4 hours.. Theres no idea how far it has got, or not got.. I am finding great resentment for IL2CPP, it feels like a big rework of something .net has mostly done for us in many other ways.

It could be 1 file from completion or just rehashing the same one.. (yes I did find some log file showing some stuff) but when your entire machine has 20% cpu, 30% memory and next to nothing else of value and everything hangs and wont draw properly because unity is compiling, the many hours are incredibly frustrating.. I have an SSD, but cannot change the virus settings to exclude the area

So like the others here, Im on 2018.3.5f1 and while I cant say its hanging, its not getting on with it much either..

### Unity Technologies

Joined:
Jul 21, 2014
Posts:
4,418
If you are on Windows, can you use Process Explorer to see what processes are running? If you can provide the processes and command lines, that might help.

Also, I'm wondering about the difference in build times between your home and work computers. Is this the same project? Are you building the same player platform on both machines?

30. ### appllowastaken

Joined:
Jan 28, 2019
Posts:
5
Hi, it happened to me too but I waited around 20 minutes and it finally finished. I don't think it's a problem, just I can't build to web that often.

31. ### bugfinders

Joined:
Jul 5, 2018
Posts:
175
I cant install many tools on the work pc, however, it’s exactly the same project, turns out compile time at work is 5.5 hours. Everything about the build is the same.

Processes are around the same quantity of python il2cpp et al as my home pc.

While my home pc is a better spec, the main difference is work pc has many work snooping apps on. But things like visual studio compiles for example aren’t noticeably different speeds. Im not sure work would like me to advertise what thy use, however, if you josh would like to discuss over pm some finer details, i will share what i can

32. ### GalleryWhitte

Joined:
Jan 23, 2017
Posts:
4
Same here. (2018.3.10f1)

bugfinders likes this.
33. ### unity_h0kQTY4UgXkmxg

Joined:
Mar 13, 2019
Posts:
1
I'm also having this issue on 2018.3.11f1

34. ### KyleStank

Joined:
Feb 9, 2014
Posts:
204
I am on Unity 2018.3.13f1. While I have not gotten a crash yet, it does take quite a while to build my very, very simple project. It is simply a cube that can move left and right. The longest stage is "Building native library with IL2CPP..."

I have not really tried IL2CPP on standalone yet, so I can't say what the build times are for that.

But I must say that 20 minutes for this very simply project is quite the wait. I had a bug in the build that I was unaware of and now I need to wait another 20 minutes to see if the fix even had a chance of working.

35. ### AUSTIN362667

Joined:
Jan 19, 2019
Posts:
1
same here on 2019.1.2f1

36. ### UDN_08a62c30-cdb1-4e59-bb48-acda29f9e582

Joined:
Jun 19, 2018
Posts:
23
I changed my workflow. Main rule: everything I do MUST be reproducible in Editor. Debugging in browser I call "Desperation".

bugfinders likes this.
37. ### Caolan

Joined:
Dec 20, 2012
Posts:
18
I can't build WebGL projects at all in Unity 2019.1 Official, or the 2019.2 Beta.

The build process crashes either at IL2CPP compilation, or the stage immediately after that, I forget what it was called.

The crash happens 100% of the time on both the official release, and the Beta. Each crash causes a BSOD on my machine, (Windows x64). This happens 100% percent of the time I try to build anything in WebGL, even plain Jane blank projects.

The BSOD returns a paging error most of the time (makes no sense to me, my comp shouldn't be paging stuff at all as far as I know)

I assume the problem must be on my end seeing as no one else is crying about it, but not really sure what else to try?

38. ### Dryn27

Joined:
Dec 10, 2016
Posts:
11
Same here. I get stuck at "Compile WebAssembly module" when compiling for WebGL on 2018.3.14f1

Caolan likes this.
39. ### GrisWoldDiablo

Joined:
Apr 5, 2017
Posts:
8
Be patient, Unity will build it eventually. It also freeze at Compile WebAssembly module ,it takes me like 10 min to build a relatively small project 50mb, Unity goes unresponsive, it shows as Not responding in the task manager, but it will finish, just set it and forget it.

40. ### sotrosh

Joined:
Dec 25, 2014
Posts:
11
Updating to Unity 2019.1 and installing all necessary modules fixed the problem.

41. ### RSH1

Joined:
Jul 9, 2012
Posts:
184
having this issue with 2019.2.2f1 publishing for Android

joaoruirego2 likes this.

Joined:
Aug 28, 2019
Posts:
22

Joined:
Aug 28, 2019
Posts:
22

Joined:
Jul 21, 2014
Posts:
4,418

Joined:
Aug 28, 2019
Posts:
22
46. ### joaoruirego2

Joined:
Aug 28, 2019
Posts:
22
And when I'm trying to build, in reality I thinks it is building a .yaml file (that I don't know what it is), but I'm not sure, the only thing that I know is that unity stops building when says "Building native binary with IL2CPP" and then that error occurs

### Unity Technologies

Joined:
Jul 21, 2014
Posts:
4,418
What is the error message? Let's start there.

48. ### joaoruirego2

Joined:
Aug 28, 2019
Posts:
22
The error message is UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors

49. ### joaoruirego2

Joined:
Aug 28, 2019
Posts:
22
First error: is the one related to il2cpp, which says that il2cpp didn't run properly. And appears all that text that I sent you before.

Second error: Build completed with a result of 'Failed'.
UnityEngine.GUIUtilityrocessEvent(Int32, IntPtr)

Third error:
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
UnityEngine.GUIUtilityrocessEvent(Int32, IntPtr)

### Unity Technologies

Joined:
Jul 21, 2014
Posts:
4,418
If you click on each error message in the Unity editor console, there should be more information below.

unityunity