Search Unity

Cannot build with ILC2PP in 2019.1.8f1

Discussion in 'Editor & General Support' started by jonny2027, Sep 11, 2019.

  1. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    I'm getting the following issue when trying to make a Il2CPP windows desktop build. I have re-installed both unity and visual studio 2017 pro, first with a basic installation and later with everything installed so as to ensure any SDK's are not missing. When I installed Unity I made sure to add the Android package (saw it mentioned elsewhere that IL2CPP require the ndk, not sure why) as well which then downloaded and installed the sdks and ndks



    Any help would be great as this is happening on all projects and stopping me from making builds.

    Thanks

    Failed running C:\Program Files\Unity\Hub\Editor\2019.1.8f1\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="F:\AChairInARoomRemastered - PC\Temp/StagingArea/Data\Native\GameAssembly.dll" --cachedirectory="F:\AChairInARoomRemastered - PC\Assets\..\Library/il2cpp_cache" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.8f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="F:/AChairInARoomRemastered - PC/Temp/StagingArea/Data/Managed" --generatedcppdir="F:/AChairInARoomRemastered - PC/Temp/StagingArea/Data/il2cppOutput"
    stdout:
    Building GameAssembly.dll with MsvcDesktopToolChain
    Msvc Install Version: 15.0
    Msvc Install SDK Directory: C:\Program Files (x86)\Windows Kits\10
    Msvc Linker Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe
    Msvc Compiler Path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe
    Output directory: F:\AChairInARoomRemastered - PC\Temp\StagingArea\Data\Native
    Cache directory: F:\AChairInARoomRemastered - PC\Library\il2cpp_cache
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: Il2CppTypeDefinitions.c
    C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\libil2cpp\il2cpp-config.h(3): fatal error C1083: Cannot open include file: 'assert.h': No such file or directory
    Invocation was: Executable: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe"
    Arguments: "F:\AChairInARoomRemastered - PC\Temp\StagingArea\Data\il2cppOutput\Il2CppTypeDefinitions.c" /nologo /c /bigobj /W3 /Zi /EHs /GR- /Gy /utf-8 /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /Ox /Oi /Oy- /GS- /Gw /GF /Zo /MT /DNET_4_0 /DUNITY_AOT /DGC_NOT_DLL /DRUNTIME_IL2CPP /D_WIN32 /DWIN32 /DWIN32_THREADS /D_WINDOWS /DWINDOWS /D_UNICODE /DUNICODE /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS /DNOMINMAX /D_NDEBUG /DNDEBUG /DWINDOWS_SDK_BUILD_VERSION=18362 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP /I"C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\libil2cpp" /I"C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\libil2cpp" /I"C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\external\bdwgc\include" /I"F:\AChairInARoomRemastered - PC\Temp\StagingArea\Data\il2cppOutput" /I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" /Fo"F:\AChairInARoomRemastered - PC\Library\il2cpp_cache\C5DE24E1E808B53D0808F5DA7E115673.obj" /Fd"F:\AChairInARoomRemastered - PC\Library\il2cpp_cache\C5DE24E1E808B53D0808F5DA7E115673.pdb"
    EnvArg key: PATH value: C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64
    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(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: Il2CppTypeDefinitions.c
    C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\libil2cpp\il2cpp-config.h(3): fatal error C1083: Cannot open include file: 'assert.h': No such file or directory
    Invocation was: Executable: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.exe"
    Arguments: "F:\AChairInARoomRemastered - PC\Temp\StagingArea\Data\il2cppOutput\Il2CppTypeDefinitions.c" /nologo /c /bigobj /W3 /Zi /EHs /GR- /Gy /utf-8 /wd4102 /wd4800 /wd4056 /wd4190 /wd4723 /wd4467 /wd4503 /wd4996 /Ox /Oi /Oy- /GS- /Gw /GF /Zo /MT /DNET_4_0 /DUNITY_AOT /DGC_NOT_DLL /DRUNTIME_IL2CPP /D_WIN32 /DWIN32 /DWIN32_THREADS /D_WINDOWS /DWINDOWS /D_UNICODE /DUNICODE /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /D_WINSOCK_DEPRECATED_NO_WARNINGS /DNOMINMAX /D_NDEBUG /DNDEBUG /DWINDOWS_SDK_BUILD_VERSION=18362 /DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP /I"C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\libil2cpp" /I"C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\libil2cpp" /I"C:\Program Files\Unity\Hub\Editor\2019.1.8f1\Editor\Data\il2cpp\external\bdwgc\include" /I"F:\AChairInARoomRemastered - PC\Temp\StagingArea\Data\il2cppOutput" /I"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\winrt" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt" /Fo"F:\AChairInARoomRemastered - PC\Library\il2cpp_cache\C5DE24E1E808B53D0808F5DA7E115673.obj" /Fd"F:\AChairInARoomRemastered - PC\Library\il2cpp_cache\C5DE24E1E808B53D0808F5DA7E115673.pdb"
    EnvArg key: PATH value: C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64
    at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(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:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:496)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
    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:247)
    DesktopStandalonePostProcessor:postProcess(BuildPostProcessArgs) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:46)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Exception: C:\Program Files\Unity\Hub\Editor\2019.1.8f1\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:130)
    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:73)
    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:496)
    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:477)
    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:247)
    DesktopStandalonePostProcessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:46)
    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:61)
    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)
     
  2. NickIndie3D

    NickIndie3D

    Joined:
    Apr 17, 2019
    Posts:
    3
    is this a ARFoundation application?
     
  3. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    No it’s a VR game
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,138
    Sorry, are you receiving an error, what is stopping you?
     
  5. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    Yes I am receiving an error. It’s in the first post in the spoiler section. It’s related to not being able to find assert.h but the file exists
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,138
    Sorry about that, missed the error. Does it also happen on a new/empty project?
     
  7. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    I will check that tomorrow but it happens on two separate existing projects.

    If it helps I had visual studio 2019 and 2017 installed side by side and uninstalled 2019 recently, however I have also reinstalled vs 2017 since removing 2019 but it hasn’t resolved the issue, nor has reinstalling unity.

    Thanks
     
  8. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    I have just checked and it fails in a new project as well with the same error
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,969
    It looks like the error that matters is:

    Cannot open include file: 'assert.h': No such file or directory

    It seems you are building a Window Standalone player, so the Android SDK and NDK won't matter for this build. This error usually means you need to install the Visual Studio C++ workload. Can you use the Visual Studio installer to make sure the C++ packages for desktop builds in Visual Studio are installed?
     
  10. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    Yeah it was a longshot with the SDK and NDK, but I saw it mentioned in another post with a similar issue.

    In regards to my VS installation I am pretty sure I have everything setup correctly, see the attached screenshots.

    Thanks for your help








     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,969
    That does look like a proper Visual Studio installation. @Tautvydas-Zilys do you have any idea what might be the problem here?
     
  12. NickIndie3D

    NickIndie3D

    Joined:
    Apr 17, 2019
    Posts:
    3
    I'm having the same issues with an ARFoundation app. I've spent 2 days trying to get this published...
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,426
    Looks like your Windows Registry (HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\ProductVersion) claims you have SDK version 18362 installed, but it is actually missing from your machine at "C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0". You have two options:

    1. Change the registry key to point to an installed SDK version (like 10.0.17763)
    2. Install Windows SDK 10.0.18362 from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
     
  14. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    Oh fantastic. I will give that a try in the morning.

    Thanks
     
  15. jonny2027

    jonny2027

    Joined:
    Jul 16, 2013
    Posts:
    56
    I have just tested this morning and its all working perfectly. Thanks for all your help. Really appreciate it :)
     
  16. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,426