Search Unity

Failed Running il2cppcore.dll + il2cppcore.dll did not run properly! failed to build APK on MAC

Discussion in 'Android' started by iGAMONIC, Apr 30, 2020.

  1. iGAMONIC

    iGAMONIC

    Joined:
    Oct 27, 2017
    Posts:
    12
    Build failure even in empty project.
    i have following things in mac:
    * Unity hub 2.3.1 on macOS Mojave 10.14.6
    * Unity 2018.4.18f1 & 2018.4.16f1 (LTS) + Android + iOS Support installed.
    * Android NDK android-ndk-r16b at Desktop/Android/android-ndk-r16b
    * In Unity > Preferences > External Tools > Checked (Use Embedded JDK)
    * NDK path is set.
    * Downloaded sdk by Android Studio > SDK Manager and set its path to external tool path of sdk.
    * i have successfully uploaded apps for AppStore. but now i am unable to set unity platform so i can build APK as well.
    i have gone through this link
    https://forum.unity.com/threads/il2cpp-exe-did-not-run-properly.686434/
    https://forum.unity.com/threads/build-fails-with-il2cpp.523955/#post-4787474
    https://answers.unity.com/questions/1682447/il2cppcoredll-did-not-run-properly-empty-project.html
    https://docs.unity3d.com/Manual/android-sdksetup.html
    but didn't find solution. i tried all things that might discussed in threads.

    Thanks in Advance, Please review my error and help!

    Code (CSharp):
    1.  
    2.  
    3. ******************ERROR 1*******************
    4.  
    5. Failed running /Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a/libil2cpp.so" --cachedirectory="/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Assets/../Library/il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Users/saifullahsadi/Desktop/Android/android-ndk-r16b" --map-file-parser="/Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/Il2Cpp/il2cppOutput"
    6.  
    7. stdout:
    8. Building libil2cpp.so with AndroidToolChain
    9. Output directory: /Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a
    10. Cache directory: /Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Library/il2cpp_android_armeabi-v7a/il2cpp_cache
    11. il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException:
    12.  
    13. Invocation was: Executable: /Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
    14. Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/external/boehmgc/include" -I"/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward" -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sysroot" -gcc-toolchain "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.cpp" -o "/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Library/il2cpp_android_armeabi-v7a/il2cpp_cache/6DC6F2B88254C6700375C28640C4718E.o"
    15.  
    16. at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    17. at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    18. at il2cpp.Program.DoRun(String[] args)
    19. at il2cpp.Program.Run(String[] args)
    20. at il2cpp.Program.Main(String[] args)
    21. stderr:
    22.  
    23. Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException:
    24.  
    25. Invocation was: Executable: /Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
    26. Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/external/boehmgc/include" -I"/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward" -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sysroot" -gcc-toolchain "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.cpp" -o "/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Library/il2cpp_android_armeabi-v7a/il2cpp_cache/6DC6F2B88254C6700375C28640C4718E.o"
    27.  
    28. at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    29. at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    30. at il2cpp.Program.DoRun(String[] args)
    31. at il2cpp.Program.Run(String[] args)
    32. at il2cpp.Program.Main(String[] args)
    33. at Program.Main(String[] args)
    34.  
    35. UnityEngine.Debug:LogError(Object)
    36. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    37. UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
    38. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:374)
    39. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:357)
    40. UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    41. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    42. UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    43.  
    44. ******************ERROR 2*******************
    45. Exception: /Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll did not run properly!
    46. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    47. UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
    48. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:374)
    49. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (System.String inputDirectory, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:357)
    50. UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    51. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:35)
    52. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9732af87a1134c179f7349df6be25cbc>:0)
    53. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <9732af87a1134c179f7349df6be25cbc>:0)
    54. 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 <9732af87a1134c179f7349df6be25cbc>:0)
    55. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <9732af87a1134c179f7349df6be25cbc>:0)
    56. 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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:288)
    57. UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    58.  
    59.  
    60. ******************ERROR 3*******************
    61.  
    62. Build completed with a result of 'Failed'
    63. UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    64.  
    65. ******************ERROR 4*******************
    66.  
    67. UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    68. at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:194
    69. at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:97
    70. UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    5,669
    It looks like the C++ compiler from the NDK if failing, but I don't see an error message. It might be worth trying to run the compiler from the command line directly.

    To do this, make the error happen in Unity, and leave the Unity editor running (that will leave all of the temporary files in place). Then run this command in a terminal window:

    /Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2018.4.16f1/Unity.app/Contents/il2cpp/external/boehmgc/include" -I"/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward" -I"/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sysroot" -gcc-toolchain "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Users/saifullahsadi/Desktop/Android/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.cpp" -o "/Users/saifullahsadi/Desktop/BopCorn/Mr Spy Water /Library/il2cpp_android_armeabi-v7a/il2cpp_cache/6DC6F2B88254C6700375C28640C4718E.o"

    Hopefully that will provide some useful output.
     
  3. iGAMONIC

    iGAMONIC

    Joined:
    Oct 27, 2017
    Posts:
    12
    @JoshPeterson I regenerated the error in editor and didn't stop it. i opened the terminal and run your code.
    i found
    -bash: /Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++: No such file or directory
    and i looked carefully in this directory i didn't find its directory but i found following directory

    /Users/saifullahsadi/Desktop/Android/android-ndk-r16b/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

    i think you were right, NDK incorrectly installed.
    Please if its this kinda matter! please see my unity version and send me link to compatible version of NDK from a good link.

    if the matter is other please help me !
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    5,669
    It looks like you might have the Windows version of the NDK installed on macOS. You can find the NDK setup instructions here: https://docs.unity3d.com/Manual/android-sdksetup.html
     
  5. iGAMONIC

    iGAMONIC

    Joined:
    Oct 27, 2017
    Posts:
    12
  6. iGAMONIC

    iGAMONIC

    Joined:
    Oct 27, 2017
    Posts:
    12
  7. NikolaiZaets

    NikolaiZaets

    Joined:
    Jul 18, 2019
    Posts:
    1
    @JoshPeterson I have the same issue, but in this case I am sure about using the correct NDK. Also I tried to clear the cache, but it didn't help( Mono Script Backend works fine but there're troubles in IL2CPP one.

    Failed running /Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/build/deploy/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a/libil2cpp.so" --cachedirectory="/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Assets/../Library/il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.3.4f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.3.4f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Users/nikolaizaiets/Downloads/android-ndk-r19c" --profiler-report --map-file-parser="/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/Il2Cpp/il2cppOutput"



    stdout:

    Building libil2cpp.so with AndroidToolChain

    Output directory: /Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a

    Cache directory: /Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Library/il2cpp_android_armeabi-v7a/il2cpp_cache

    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException:



    Invocation was: Executable: /Users/nikolaizaiets/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

    Arguments: -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2019.3.4f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/external/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/external/xxHash" -I"/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -c -g -DNDEBUG -fexceptions -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fno-addrsig -fPIC -Os -target armv7-linux-androideabi19 -D__ANDROID_API__=19 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.c" -o "/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/5315C9D8845F5A2E663693BDF76C32FF.o"



    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, List`1 foundAssemblies)

    at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)

    at il2cpp.Program.Main(String[] args)

    stderr:



    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException:



    Invocation was: Executable: /Users/nikolaizaiets/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang

    Arguments: -DNET_4_0 -DUNITY_AOT -DIL2CPP_MONO_DEBUGGER_DISABLED -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2019.3.4f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/external/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/external/xxHash" -I"/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -c -g -DNDEBUG -fexceptions -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fno-addrsig -fPIC -Os -target armv7-linux-androideabi19 -D__ANDROID_API__=19 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.c" -o "/Users/nikolaizaiets/Desktop/Projects/PrepareLoading/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/5315C9D8845F5A2E663693BDF76C32FF.o"



    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, List`1 foundAssemblies)

    at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)

    at il2cpp.Program.Main(String[] args)

    at Program.Main(String[] args) in /Users/builduser/buildslave/unity/build/External/il2cpp/il2cpp/il2cppcore/Program.cs:line 24



    UnityEngine.Debug:LogError(Object)

    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)

    UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:77)

    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:517)

    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(Il2CppBuildPipelineData, String, String, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:500)

    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:337)

    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:65)

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)







    Exception: /Applications/Unity/Hub/Editor/2019.3.4f1/Unity.app/Contents/il2cpp/build/deploy/il2cppcore/il2cppcore.dll 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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)

    UnityEditorInternal.Runner.RunNetCoreProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:77)

    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:517)

    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:500)

    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:337)

    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:65)

    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8656af08553f4582a8969c722a26e39b>:0)

    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8656af08553f4582a8969c722a26e39b>: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 <8656af08553f4582a8969c722a26e39b>:0)

    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <8656af08553f4582a8969c722a26e39b>: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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:340)

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)





    Build completed with a result of 'Failed'

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)







    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors

    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00269] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:191

    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:187)
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    5,669
    It looks like the clang compiler from the Android NDK is crashing while it is compiling Il2CppTypeDefinitions.c. This is a file that IL2CPP generates, and sometimes it can be very large. I'd recommend trying the latest 2019.3 release of Unity with this project. We have made some changes to make that generated file smaller in many cases, which might avoid this issue.
     
  9. jmguillemette

    jmguillemette

    Joined:
    Mar 4, 2015
    Posts:
    42
    i am running into the same error running unity cloud build for mac and windows
     
unityunity