IL2CPP Build Fail

I am not sure if this is Unity problem or not, but I can highly suspect it so I will write it down.

When I build using il2cpp (windows pc, not UWP) I get the following error :

Failed running C:\Program Files\Unity\Hub\Editor\2020.2.0b5\Editor\Data\il2cpp/build/BeeSettings/offline/bee.exe --useprebuiltbuildprogram

stdout:
[32m[[32m [32m] [0mRequire frontend run. artifacts\tundra.dag.json does not exist yet
[ 0s] Executed build program. Created build graph with 2 nodes.
[32m[[32m 0s[32m] [0mFreezing tundra.dag.json into .dag (.dag file didnā€™t exist)
[91m*** Bee build failed (0.06 seconds), 0 items updated, 2 evaluated[0m
stderr:

UnityEngine.Debug:LogError (object)
UnityEditorInternal.Runner:RunProgram (UnityEditor.Utils.Program,string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase)
UnityEditorInternal.Runner:RunManagedProgram (string,string,string,UnityEditor.Scripting.Compilers.CompilerOutputParserBase,System.Action1<System.Diagnostics.ProcessStartInfo>) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments (System.Collections.Generic.List1,System.Action1<System.Diagnostics.ProcessStartInfo>) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData,string,bool) UnityEditorInternal.IL2CPPBuilder:Run () UnityEditorInternal.IL2CPPUtils:RunIl2Cpp (string,UnityEditorInternal.IIl2CppPlatformProvider,System.Action1,UnityEditor.RuntimeClassRegistry)
DesktopStandalonePostProcessor:RunIL2CPP (UnityEditor.Modules.BuildPostProcessArgs,UnityEditorInternal.IIl2CppPlatformProvider,System.Collections.Generic.List1<string>) DesktopStandalonePostProcessor:SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs,System.Collections.Generic.HashSet1)
DesktopStandalonePostProcessor:postProcess (UnityEditor.Modules.BuildPostProcessArgs)
UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

Now, the same empty project does build fine using Mono.

The same empty project does build with Il2cpp using Unity 2019.4 version.

All of the tests are run on the same PC.

I donā€™t even know if it is worth while to send repo bug report, because, well, the project is simply empty. I have created a brand new project and just attempted to build.

Since Unity 2019.4 builds fine with il2cpp, I am more leaning towards that it could not be the setting on my pc.

Using Visual Studio 2019. 16.7.5
Unity 2020.2 b5

Any ideas?

Here is entire editor.log file.

6380874ā€“710943ā€“Editor.zip (7.25 KB)

My guess is that the non-ASCII characters in the path to the project are causing a problem somewhere. We do a good bit of testing with project paths like this, but something might have been missed. Can you submit a bug report for this issue?

1 Like

I tried to reproduce your issue by using what looks like the same project directory and directory layout, and I was able to get an error, but not the exact same one you hit.

Iā€™m working on a fix for the error I was able to reproduce, and hopefully it will fix your issue as well.

To check if perhaps thereā€™s something else unique to your machine or setup, could you do a test of creating and building an empty project into a directory that only has ASCII characters in the path? If that works, then Iā€™m pretty sure my fix will alleviate your problem. But if it still doesnā€™t work when using a project path with only ASCII characters, weā€™ll know something else is the issue and then we can narrow it down more.

2 Likes

Thanks will try that and report tonight.

1 Like

I have done some more experiments and here is my finding :

Empty project :

  1. Ascii only folder path names : Works!
  2. The same project with Unicode path name : Fails!

My actual project :
Project path name doesnā€™t have any unicode characters, but fails with the following error :

il2cpp.exe didnā€™t catch exception: Unity.IL2CPP.Building.BuilderFailedException: Rewired_Core26.cpp

C:\Subterrain\subterrain2RPG\UnityProject\Library\Il2cppBuildCache\Windows\x64\il2cppOutput\Rewired_Core26.cpp(21796) : fatal error C1001:

It looks like it failed on Rewired_Core26, which is sad, because it seems like Microsoft STILL didnā€™t fix the compiler bug even after so many months and the last update to the Visual Studioā€¦

6392657ā€“712748ā€“Editor.zip (994 KB)

Right on, thanks for checking into that! Iā€™ll put in a fix for the Unicode character pretty soon here.

Thank you! Would you be kind to press Microsoft to fix rewired compile bug please? It has been months after months since the issue has arised but the fix is not comingā€¦

Hi @castor76 Were you able to submit a bug report for the ASCII char issue?

I did not. But apparently the ascii issue is fixed?

Exception: Failed running E:\Unity\2020.3.1f1\Editor\Data\il2cpp/build/BeeSettings/offline/bee.exe --useprebuiltbuildprogram --no-colors
stdout:
Require frontend run. tundra.dag no longer valid. FileSignature timestamp changed: il2cpp_settings.json
[ 0s] Executed build program. Created build graph with 2 nodes.
[ 0s] Freezing tundra.dag.json into .dag (.dag file didnā€™t exist)
[BUSY 6s] Il2Cpp E:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/Native/armeabi-v7a/libil2cpp.so
[BUSY 16s] Il2Cpp E:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/Native/armeabi-v7a/libil2cpp.so
[BUSY 27s] Il2Cpp E:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/Native/armeabi-v7a/libil2cpp.so
[BUSY 37s] Il2Cpp E:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/Native/armeabi-v7a/libil2cpp.so
[0/2 39s] Il2Cpp E:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/Native/armeabi-v7a/libil2cpp.so

CommandLine

E:\Unity\2020.3.1f1\Editor\Data\il2cpp/build/deploy/netcoreapp3.1/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile=ā€œunityaotā€ --compile-cpp --libil2cpp-static --platform=ā€œAndroidā€ --architecture=ā€œARMv7ā€ --configuration=ā€œReleaseā€ --outputpath=ā€œE:\Unity\New folder\Maze 3D Multiplayer\Library\Il2cppBuildCache\Android\armeabi-v7a\Native\armeabi-v7a\libil2cpp.soā€ --cachedirectory=ā€œE:\Unity\New folder\Maze 3D Multiplayer\Assets..\Library\il2cpp_android_armeabi-v7a/il2cpp_cacheā€ --additional-include-directories=ā€œE:/Unity/2020.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/includeā€ --additional-include-directories=ā€œE:/Unity/2020.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/includeā€ --baselib-directory=ā€œE:/Unity/2020.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer\Variations\il2cpp\Release\StaticLibs\armeabi-v7aā€ --avoid-dynamic-library-copy --tool-chain-path=ā€œE:/Unity/2020.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDKā€ --additional-cpp=ā€œE:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/additionalCppFiles/UnityAdsInitializationListener.hā€ --additional-cpp=ā€œE:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/additionalCppFiles/UnityAdsLoadListener.hā€ --additional-cpp=ā€œE:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/additionalCppFiles/UnityAdsShowListener.hā€ --profiler-report --map-file-parser=E:/Unity/2020.3.1f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe --directory=ā€œE:/Unity/New folder/Maze 3D Multiplayer/Temp/StagingArea/assets/bin/Data/Managedā€ --generatedcppdir=ā€œE:/Unity/New folder/Maze 3D Multiplayer/Library/Il2cppBuildCache/Android/armeabi-v7a/il2cppOutputā€

Failed because this command failed to write the following output files:

E:\Unity\New folder\Maze 3D Multiplayer\Library\Il2cppBuildCache\Android\armeabi-v7a\Native\armeabi-v7a\libil2cpp.so

Output

Building libil2cpp.so with AndroidToolChain
Output directory: E:\Unity\New folder\Maze 3D Multiplayer\Library\Il2cppBuildCache\Android\armeabi-v7a\Native\armeabi-v7a
Cache directory: E:\Unity\New folder\Maze 3D Multiplayer\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
ObjectFiles: 443 of which compiled: 0
Total compilation time: 5059 milliseconds.
Cleaned up 0 object files.
*** Bee build failed (42.17 seconds), 1 items updated, 2 evaluated
stderr:
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <0c3742f371b24679bcaa6fcc508d0cca>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <0c3742f371b24679bcaa6fcc508d0cca>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo, System.String generatedCppOutputDirectory) (at <0c3742f371b24679bcaa6fcc508d0cca>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.Boolean platformSupportsManagedDebugging) (at <0c3742f371b24679bcaa6fcc508d0cca>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <0c3742f371b24679bcaa6fcc508d0cca>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <0c3742f371b24679bcaa6fcc508d0cca>:0)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>: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 <0c3742f371b24679bcaa6fcc508d0cca>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

facing same issue

1 Like

Is there another error message in the editor log file near this one?

1 Like

I also got a similar error. Can you have a solution for my project ?

2 Likes

Please copy the full text of the bottom pane from that error message, and paste it here.

I had the same issue using Unity 2020.2.6f1
Removing non - ASCII letters from the project path solved the problem.

facing same issue

1 Like

Hello. Another similar error with IL2CPP when I build for android (or PC too). I have installed Unity 2020 LTS (3.2f1) and the Android SDK and NDK from Unity Hub (just mention that Visual Studio was not installed due to a problem with NET framework 4.7.2 and Windows 7).

I am doing the tests with an empty project. Any idea where I can start looking? Many thanks.

This here in Spanish is weird or is it normal? ā€¦ā€œerror: Mļæ½todo no encontradoā€ā€¦
Windows 7 is in Spanish, but everything else is in English.

This is the console log:

Exception: Failed running C:\Program Files\Unity\Hub\Editor\2020.3.2f1\Editor\Data\il2cpp/build/BeeSettings/offline/bee.exe --useprebuiltbuildprogram --no-colors

stdout:
error: Mļæ½todo no encontrado: ā€˜System.Collections.Generic.IEnumerable1<!!0> System.Linq.Enumerable.Append(System.Collections.Generic.IEnumerable1<!!0>, !!0)ā€™. (System.MissingMethodException)
at Bee.Core.DynamicLoader.GetAllTypesInAssemblies
at Bee.Core.DynamicLoader.FindAndCreateInstanceOfEachInAllAssemblies
at Bee.StandaloneBeeDriverā€¦cctor
at Bee.StandaloneBeeDriver.RealMain
at Bee.StandaloneBeeDriver.Main
stderr:

UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at :0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo, System.String generatedCppOutputDirectory) (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.Boolean platformSupportsManagedDebugging) (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <d6a6a4b561b9431dbfe2c61f7bf0d405>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at :0)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>: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 :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

I have this issue:

Exception: Failed running C:\Program Files\Unity\Hub\Editor\2020.3.5f1\Editor\Data\il2cpp/build/BeeSettings/offline/bee.exe --useprebuiltbuildprogram --no-colors
stdout:
Require frontend run. tundra.dag no longer valid. FileSignature timestamp changed: il2cpp_settings.json
[ 0s] Executed build program. Created build graph with 2 nodes.
[ 0s] Freezing tundra.dag.json into .dag (.dag file didnā€™t exist)
[0/2 0s] Il2Cpp C:/Users/USER/Unity Games/Snake Game/Library/Il2cppBuildCache/Android/armeabi-v7a/Native/armeabi-v7a/libil2cpp.so

CommandLine
ExitCode

1

Output

Failed to create output directory for targetfile C:\Users\USER\Unity Games\Snake Game\Library\Il2cppBuildCache\Android\armeabi-v7a\Native\armeabi-v7a\libil2cpp.so as part of preparing to actually running this node
*** Bee build failed (0.07 seconds), 0 items updated, 2 evaluated
stderr:
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <411aa9fd83b6416fab626ca292954771>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action1[T] setupStartInfo) (at <411aa9fd83b6416fab626ca292954771>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List1[T] arguments, System.Action1[T] setupStartInfo) (at <411aa9fd83b6416fab626ca292954771>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <411aa9fd83b6416fab626ca292954771>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <411aa9fd83b6416fab626ca292954771>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <411aa9fd83b6416fab626ca292954771>:0)
UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2c6e9a95f1dd4e06ad71afcd2684dcb7>: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 <411aa9fd83b6416fab626ca292954771>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

This might happen because there are spaces in the path to the Unity project:

C:\Users\USER\Unity Games\Snake Game

Can you try to remove those spaces? We have a bug around this issue, and a fix is on the way to a 2020.3 patch release, but you might be able to work around the issue sooner.