Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Errors with IL2CPP

Discussion in 'Windows' started by bsmall, Dec 8, 2019.

  1. bsmall

    bsmall

    Joined:
    Sep 24, 2015
    Posts:
    79
    I can't build my project, i get these errors :

    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:190
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:95
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    Exception: C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:503)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:484)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:70)
    DesktopStandalonePostProcessor.SetupStagingArea (UnityEditor.Modules.BuildPostProcessArgs args, System.Collections.Generic.HashSet`1[T] filesToNotOverwrite) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:242)
    DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:41)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:59)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultBuildPostprocessor.cs:27)
    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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    Failed running C:\Program Files\Unity\Hub\Editor\2019.2.15f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="WindowsDesktop" --architecture="x64" --configuration="Release" --outputpath="C:\Users\El Barto\Dev\Projets Unity\SpeedRacer\SpeedRacer\SpeedRacer\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="C:\Users\El Barto\Dev\Projets Unity\SpeedRacer\SpeedRacer\SpeedRacer\Assets\..\Library/il2cpp_cache" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.2.15f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Users/El Barto/Dev/Projets Unity/SpeedRacer/SpeedRacer/SpeedRacer/Temp/StagingArea/Data/Managed" --generatedcppdir="C:/Users/El Barto/Dev/Projets Unity/SpeedRacer/SpeedRacer/SpeedRacer/Temp/StagingArea/Data/il2cppOutput"

    stdout:
    il2cpp.exe didn't catch exception: System.InvalidOperationException: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have one of these installed:
    Visual Studio 2010 with C++ compilers and Windows 7 SDK (it cannot build C++ code because it is not installed)
    Visual Studio 2010 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\10.0_Config\InstallDir" in the registry
    Windows 7 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder" in the registry

    Visual Studio 2013 with C++ compilers and Windows 8.1 SDK (it cannot build C++ code because it is not installed)
    Visual Studio 2013 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\12.0_Config\InstallDir" in the registry
    Windows 8.1 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1\InstallationFolder" in the registry

    Visual Studio 2015 with C++ compilers and Windows 10 SDK (it cannot build C++ code because Windows SDK is not installed)
    Visual Studio 2015 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry
    Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry

    Visual Studio 2017 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
    Visual Studio 2017 installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
    Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry


    � Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment()
    � Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    � il2cpp.Program.DoRun(String[] args)
    � il2cpp.Program.Run(String[] args)
    � il2cpp.Program.Main(String[] args)
    stderr:

    Exception non g�r�e�: System.InvalidOperationException: C++ code builder is unable to build C++ code. In order to build C++ code for Windows Desktop, you must have one of these installed:
    Visual Studio 2010 with C++ compilers and Windows 7 SDK (it cannot build C++ code because it is not installed)
    Visual Studio 2010 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\10.0_Config\InstallDir" in the registry
    Windows 7 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder" in the registry

    Visual Studio 2013 with C++ compilers and Windows 8.1 SDK (it cannot build C++ code because it is not installed)
    Visual Studio 2013 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\12.0_Config\InstallDir" in the registry
    Windows 8.1 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1\InstallationFolder" in the registry

    Visual Studio 2015 with C++ compilers and Windows 10 SDK (it cannot build C++ code because Windows SDK is not installed)
    Visual Studio 2015 installation is found by looking at "SOFTWARE\Microsoft\VisualStudio\14.0_Config\InstallDir" in the registry
    Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry

    Visual Studio 2017 with C++ compilers and Windows 10 SDK (it cannot build C++ code because it is not installed)
    Visual Studio 2017 installation is found using Microsoft.VisualStudio.Setup.Configuration COM APIs
    Windows 10 SDK is found by looking at "SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\InstallationFolder" in the registry


    � Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment()
    � Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    � il2cpp.Program.DoRun(String[] args)
    � il2cpp.Program.Run(String[] args)
    � il2cpp.Program.Main(String[] args)

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:503)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:484)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:70)
    DesktopStandalonePostProcessor:SetupStagingArea(BuildPostProcessArgs, HashSet`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:242)
    DesktopStandalonePostProcessor:postProcess(BuildPostProcessArgs) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:41)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    Windows errors:
    Signature du problème :
    Nom d’événement de problème: CLR20r3
    Signature du problème 01: il2cpp.exe
    Signature du problème 02: 0.0.0.0
    Signature du problème 03: 5dd92b2b
    Signature du problème 04: Unity.IL2CPP.Building
    Signature du problème 05: 0.0.0.0
    Signature du problème 06: 5dd92b19
    Signature du problème 07: 32
    Signature du problème 08: 4d
    Signature du problème 09: System.InvalidOperationException
    Version du système: 6.1.7601.2.1.0.256.1
    Identificateur de paramètres régionaux: 1036
    Information supplémentaire n° 1: 0bda
    Information supplémentaire n° 2: 0bda85d402fabda5e14f9d2e7848aadf
    Information supplémentaire n° 3: b914
    Information supplémentaire n° 4: b914345eb8cf5d07c8522e23a5d737ca
     
    Last edited: Dec 8, 2019
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,308
    You will need to install some version of Visual Studio with the C++ compiler workload, as mentioned in the error message.
     
  3. bsmall

    bsmall

    Joined:
    Sep 24, 2015
    Posts:
    79
    I resolved the problem by installing the windows 10 sdk through visual studio.
     
  4. alexerd

    alexerd

    Joined:
    Nov 5, 2019
    Posts:
    10
    It looks like this is the error message which suggests the problem:
    clang++.exe: error: no such file or directory: 'C:\Users\Vladim?r Dubeck?\Desktop\Geometry leap - kopie\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\AC9A2E9056678649598B692E5353E9B3.o'
    I suspect those '?' characters that are now not phase of the ASCII character set. I suppose that the Android NDK has hassle with these characters. I would advocate locating your Unity task in a course which has solely ASCII characters. That would possibly work.
     
  5. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    1,234
    Yeah this whole message is a bit of a poor experience when trying to build to il2cpp..
    I have VS2019 installed and I installed some C++ component and the windows SDK, still get same issue - edit: eventually fixed by installing all of C++/windows option in VS 2019

    - why is VS2019 not mentioned? (2018 LTS)
    - why no 1-click solution to install the relevant components?
    - why such obtuse console error until you drill down into it?
     
    Last edited: Jan 5, 2020
    Meltdown likes this.
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    7,189
    If you install Unity and choose to install "Visual Studio" component, it will install all the components needed for the build to succeed.

    Got any suggestions on how to improve it? I thought the error message was pretty straightforward.
     
  7. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    1,234
    OK I wondered that thanks, I had installed separately.

    well I guess I am used to Unity taking the load when building to all platforms, so do not have much knowledge on the individual platforms and even VS setup. So any 1 line summary visible in the console without clicking through would be more explicit, but perhaps I am just too used to how straight forward and easy Unity's cross platform building is most of the time!
     
unityunity