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.List
1,System.Action1<System.Diagnostics.ProcessStartInfo>)
UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData,string,bool)
UnityEditorInternal.IL2CPPBuilder:Run ()
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp (string,UnityEditorInternal.IIl2CppPlatformProvider,System.Action
1,UnityEditor.RuntimeClassRegistry)
DesktopStandalonePostProcessor:RunIL2CPP (UnityEditor.Modules.BuildPostProcessArgs,UnityEditorInternal.IIl2CppPlatformProvider,System.Collections.Generic.List1<string>)
DesktopStandalonePostProcessor:SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs,System.Collections.Generic.HashSet
1)
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.List
1[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.Action
1[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 ?
6992984--825986--upload_2021-3-31_17-52-44.png

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

7004891--828209--QAD$B97EI})O3_EB%}((`SR.png

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.List
1[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.Action
1[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.List
1[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.Action
1[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.