Search Unity

Cannot build IL2CPP to Android - "il2cpp.exe did not run properly!"

Discussion in 'Editor & General Support' started by jackmillington1994, Jun 13, 2019.

  1. jackmillington1994

    jackmillington1994

    Joined:
    Jan 24, 2019
    Posts:
    5
    Hello

    I have been attempting to publish a completed app targetting Android. After successfully implementing AdMob and Unity IAP,. When using the "Mono" backend, Unity successfully builds an APK which runs as expected on the Android device. However, I am stuck trying to build the app using the "IL2CPP" backend (to comply with Google's x64 compatability guidelines). 3 errors are produced but I don't have enough experience to know the root of the problem or solution.

    I am using Unity 2019.1.6 with Android SDK and NDK build tools installed.

    The build fails with 3 errors (Log below)

    Some of the things I have tried:
    Updating NDK to r20
    Changing Api compatability level to .NET 4.x
    Reimporting all Assets


    Error 1:


    Failed running C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp/build/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="C:\TEMP\SmashBlox_Game\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\TEMP\SmashBlox_Game\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/TEMP/SmashBlox_Game/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=C:/TEMP/SmashBlox_Game/Temp/StagingArea/Il2Cpp/il2cppOutput

    stdout:

    il2cpp.exe didn't catch exception: System.Exception: Android NDK r13b or newer not detected at 'C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK'.

    at Unity.IL2CPP.Building.ToolChains.Android.AndroidNDKUtilities..ctor(NPath ndkRootPath, Architecture architecture, Boolean useDependenciesToolChain)

    at Unity.IL2CPP.Building.ToolChains.AndroidToolChain..ctor(Architecture architecture, BuildConfiguration buildConfiguration, Boolean treatWarningsAsErrors, Boolean assemblyOutput, Boolean useDependenciesToolChain, NPath toolchainPath)

    at Unity.IL2CPP.Building.Platforms.AndroidPlatformSupport.MakeCppToolChain(BuildingOptions buildingOptions)

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

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

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

    stderr:



    Unhandled Exception: System.Exception: Android NDK r13b or newer not detected at 'C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK'.

    at Unity.IL2CPP.Building.ToolChains.Android.AndroidNDKUtilities..ctor(NPath ndkRootPath, Architecture architecture, Boolean useDependenciesToolChain)

    at Unity.IL2CPP.Building.ToolChains.AndroidToolChain..ctor(Architecture architecture, BuildConfiguration buildConfiguration, Boolean treatWarningsAsErrors, Boolean assemblyOutput, Boolean useDependenciesToolChain, NPath toolchainPath)

    at Unity.IL2CPP.Building.Platforms.AndroidPlatformSupport.MakeCppToolChain(BuildingOptions buildingOptions)

    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, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    Error 2:

    Exception: C:\Program Files\Unity\Hub\Editor\2019.1.6f1\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 tempFolder, 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:63)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4132c5c2cd7b45b09ef33302ae416489>: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 <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4132c5c2cd7b45b09ef33302ae416489>: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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Error 3:

    UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors

    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194

    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    Any help is greatly appreciated as I am running out of ideas!

    Thanks
    Jack
     
    Opeth001 likes this.
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    It seems like the Unity Editor cannot find the location of the Android NDK installation. You can explicitly set that location via the Preferences menu in the Unity Editor. Have you tried to do that?
     
  3. jackmillington1994

    jackmillington1994

    Joined:
    Jan 24, 2019
    Posts:
    5
    Hi @JoshPeterson
    Thanks for your response. Under Edit > Preferences > External Tools I have attempted to set the location of the new NDK (r20) but still have the same result. Thank you for narrowing down the issue, that should make it easier to solve!

    Jack
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    Is the Unity Editor still looking in 'C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK' for the NDK? Shouldn't it be looking in a different location where you installed the NDK now?

    If so, I would expect the error message to be different
     
  5. jackmillington1994

    jackmillington1994

    Joined:
    Jan 24, 2019
    Posts:
    5

    Hi @JoshPeterson

    Sorry for the late response,
    I have installed latest versions of JDK, SDK and NDK. I have directed unity to the file paths that are shown in Android Studio, the previous error has disappeared but now producing another error:


    Failed running C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="ReleasePlus" --outputpath="C:\TEMP\SmashBlox_Game\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\TEMP\SmashBlox_Game\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/TEMP/SmashBlox_Game/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=C:/TEMP/SmashBlox_Game/Temp/StagingArea/Il2Cpp/il2cppOutput

    stdout:

    Building libil2cpp.so with AndroidToolChain

    Output directory: C:\TEMP\SmashBlox_Game\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a

    Cache directory: C:\TEMP\SmashBlox_Game\Library\il2cpp_android_armeabi-v7a\il2cpp_cache

    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:

    In file included from C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:

    In file included from C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r0", "r1", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    9 errors generated.





    Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"

    Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\android\support\include" -c -g -DNDEBUG -fexceptions -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 "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -isystem "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot\usr\include\arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/TEMP/SmashBlox_Game/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/42BB39D5B237D83C2981F8654832334D.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)

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

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

    stderr:



    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:

    In file included from C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:

    In file included from C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r0", "r1", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp/..\..\..\..\..\..\..\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list

    : "cc", "memory", "r2", "r3"

    ^

    9 errors generated.





    Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"

    Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\android\support\include" -c -g -DNDEBUG -fexceptions -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 "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -isystem "C:\Program Files\Unity\Hub\Editor\2019.1.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot\usr\include\arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "C:\TEMP\SmashBlox_Game\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/TEMP/SmashBlox_Game/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/42BB39D5B237D83C2981F8654832334D.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)

    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, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Any ideas appreciated.

    Thanks in advance
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    This looks like a known issue! There was a problem building for Android/x86 with some Unity version/NDK version combinations. It looks like you are hitting this issue. Disable the x86 architecture in the Player Settings, and this error should not occur.
     
  7. jackmillington1994

    jackmillington1994

    Joined:
    Jan 24, 2019
    Posts:
    5
    Ah that explains the days of headache. Thanks for the suggestion I was actually trying that as you replied. It seems to have got further with the build this time, however still throwing some errors:

    Error 1:
    C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld.bfd.exe: cannot find -lgnustl_static

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Error 2:
    C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld.bfd.exe: cannot find -lc++

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Error 3:
    CommandInvokationFailure: Failed to link 'libunity.so'.
    C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe @"Temp/StagingArea/strip/arm64-v8a/libunity.rsp"

    stderr[
    C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld.bfd.exe: cannot find -lgnustl_static
    C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld.bfd.exe: cannot find -lc++
    C:/Program Files/Unity/Hub/Editor/2019.1.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld.bfd.exe: cannot find -lc++
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    ]
    stdout[

    ]
    exit code: 1
    UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, System.String errorMsg) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildSharedLibrary.Link (UnityEditor.Android.PostProcessor.PostProcessorContext context, UnityEditor.Android.AndroidNDKTools ndk, UnityEditor.Android.AndroidTargetDeviceType deviceType, System.Collections.Generic.IEnumerable`1[T] objects) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildSharedLibrary.Build (UnityEditor.Android.PostProcessor.PostProcessorContext context, UnityEditor.Android.AndroidNDKTools ndk, UnityEditor.Android.AndroidTargetDeviceType deviceType) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.PostProcessor.Tasks.BuildSharedLibrary.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <4132c5c2cd7b45b09ef33302ae416489>: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 <4132c5c2cd7b45b09ef33302ae416489>:0)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <4132c5c2cd7b45b09ef33302ae416489>: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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:281)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    I'm not sure about this error. There still seems to be some mismatch between what Unity thinks the NDK should be and which actual NDK you are using.

    Check the Edit > Preferences dialog in the Unity editor and ensure that I have installed the same NDK version that the Unity editor expects. If you happen to have a newer version of the NDK installed, it might not work.
     
  9. jackmillington1994

    jackmillington1994

    Joined:
    Jan 24, 2019
    Posts:
    5
    ISSUE SOLVED

    I ended up deleting all existing NDK folders (there were 3-4), downloading Android NDK (r13b) and pointed Unity to its location. I also extracted all files inside NDK folder directly into a new folder named "NDK" and removed the root folder "android-ndk-r13b-windows-x86_64" (I am not sure if it that part was relevant or not.).

    Now able to build Google App Bundle using IL2CPP scripting backend.

    Thank you @JoshPeterson for your help it is very much appreciated!
     
    JoshPeterson likes this.
  10. NewGame789

    NewGame789

    Joined:
    May 16, 2019
    Posts:
    4
    Hello @JoshPeterson I got this error when i want to build android apk in unity 2017.4.29

    Failed running F:\Unity2017.4.29f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="F:\Unity2017.4.29f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="F:\Unity2017.4.29f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/GOR/Downloads/Compressed/android-ndk-r13b" --map-file-parser="F:\Unity2017.4.29f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --assembly="F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll" --assembly="F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Temp\StagingArea\assets\bin\Data\Managed\Assembly-UnityScript.dll" --assembly="F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll" --assembly="F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll" --generatedcppdir="F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Temp\StagingArea\Il2Cpp\il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain.
    Output directory: F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: F:\UnityCodes\Bundel codes\Vegas Stickman\Vegas Crime stickman City 17\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    ObjectFiles: 508 of which compiled: 508
    Time Compile: 10774 milliseconds Bulk_mscorlib_7.cpp
    Time Compile: 10340 milliseconds Bulk_mscorlib_8.cpp
    Time Compile: 8776 milliseconds Il2CppAttributes.cpp
    Time Compile: 8211 milliseconds Bulk_Assembly-CSharp_0.cpp
    Time Compile: 7975 milliseconds Bulk_Assembly-CSharp_1.cpp
    Time Compile: 7838 milliseconds Bulk_mscorlib_5.cpp
    Time Compile: 7774 milliseconds Bulk_Assembly-CSharp_6.cpp
    Time Compile: 7768 milliseconds Bulk_Assembly-CSharp_2.cpp
    Time Compile: 6665 milliseconds Bulk_Generics_1.cpp
    Time Compile: 6648 milliseconds Bulk_mscorlib_6.cpp
    Total compilation time: 113897 milliseconds.
    il2cpp.exe didn't catch exception: System.IO.IOException: There is not enough space on the disk.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
    at NiceIO.NPath.CopyWithDeterminedDestination(NPath absoluteDestination, Func`2 fileFilter)
    at NiceIO.NPath.Copy(NPath dest, Func`2 fileFilter)
    at NiceIO.NPath.Copy(NPath dest)
    at NiceIO.Extensions.<Copy>c__AnonStorey0.<>m__0(NPath p)
    at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    at NiceIO.Extensions.Copy(IEnumerable`1 self, NPath dest)
    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
    at il2cpp.Program.DoRun(String[] args)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: System.IO.IOException: There is not enough space on the disk.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
    at NiceIO.NPath.CopyWithDeterminedDestination(NPath absoluteDestination, Func`2 fileFilter)
    at NiceIO.NPath.Copy(NPath dest, Func`2 fileFilter)
    at NiceIO.NPath.Copy(NPath dest)
    at NiceIO.Extensions.<Copy>c__AnonStorey0.<>m__0(NPath p)
    at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
    at NiceIO.Extensions.Copy(IEnumerable`1 self, NPath dest)
    at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(IEnumerable`1 objectFiles, CppToolChainContext toolChainContext)
    at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, 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:336)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection`1, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)



    ------------------

    Exception: F:\Unity2017.4.29f1\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 setupStartInfo) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1 arguments, System.Action`1 setupStartInfo, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:336)
    UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:317)
    UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:160)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report)
    UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:272)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Please Help how can i solve it ?

    Thanks in advance
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    It looks like this is the relevant error message:

    There is not enough space on the disk.

    It looks like this machine might be running out of space.
     
  12. mahmoud93p

    mahmoud93p

    Joined:
    Feb 11, 2015
    Posts:
    28
    Hello @JoshPeterson i have this error can you help me

    Unity Version: 2019.1.9f1
    NDK download automatic with unity hub


    Failed running /Applications/Unity/Hub/Editor/2019.1.9f1/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/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a/libil2cpp.so" --cachedirectory="/Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Assets/../Library/il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="/Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="/Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/Il2Cpp/il2cppOutput"

    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: /Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a
    Cache directory: /Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Library/il2cpp_android_armeabi-v7a/il2cpp_cache
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from /Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/Il2Cpp/il2cppOutput/lumpedcpp/Lump_libil2cpp_os.cpp:72:
    In file included from /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/AtomicQueue.cpp:6:
    In file included from /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps.h:121:
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r0", "r1", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    9 errors generated.


    Invocation was: Executable: /Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
    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/2019.1.9f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/external/bdwgc/include" -I"." -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/llvm-libc++/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/llvm-libc++abi/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sources/android/support/include" -c -g -DNDEBUG -fexceptions -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 "/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sysroot" -gcc-toolchain "/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/Il2Cpp/il2cppOutput/lumpedcpp/Lump_libil2cpp_os.cpp" -o "/Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/64DC2AD1F4268F84882C186AC8A2A205.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)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:

    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from /Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/Il2Cpp/il2cppOutput/lumpedcpp/Lump_libil2cpp_os.cpp:72:
    In file included from /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/AtomicQueue.cpp:6:
    In file included from /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps.h:121:
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r0", "r1", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    /Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp/os/Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    9 errors generated.


    Invocation was: Executable: /Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
    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/2019.1.9f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/Unity.app/Contents/il2cpp/external/bdwgc/include" -I"." -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/llvm-libc++/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sources/cxx-stl/llvm-libc++abi/include" -I"/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sources/android/support/include" -c -g -DNDEBUG -fexceptions -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 "/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sysroot" -gcc-toolchain "/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Applications/Unity/Hub/Editor/2019.1.9f1/PlaybackEngines/AndroidPlayer/NDK/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Temp/StagingArea/Il2Cpp/il2cppOutput/lumpedcpp/Lump_libil2cpp_os.cpp" -o "/Users/mahmoud/Desktop/F3.) ios/HumanPlantOnline 10.0.13/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/64DC2AD1F4268F84882C186AC8A2A205.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)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    at Program.Main(String[] args)

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunNetCoreProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:79)
    UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:494)
    UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Jul 10, 2019
  13. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    This error occurs with the Android x86 build. I suspect that you don't need to use the x85 architecture, so I would recommend disabling it in the Player Settings for the Android player build.

    If you do need it, please update to the latest version of Unity 2019.1, I believe this has been corrected.
     
  14. BoatBest

    BoatBest

    Joined:
    Jan 4, 2016
    Posts:
    60
    Hello @JoshPeterson! I also have this same issue, but disabling x86 in Player Settings still haven't solve my problem. There is still the same error. Oh and after disabling it and build and run to android device there is a window pop up said solving dependency don't know if that the right behavior? I really need to get rid of this because I have to update my game on the store now.
    Much much appreciated!!!
     
    Last edited: Jul 11, 2019
  15. BoatBest

    BoatBest

    Joined:
    Jan 4, 2016
    Posts:
    60
    @mahmoud93p Is your problem solved yet by disable x86 in Player Setting?
     
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    Can you submit a bug report to Unity? I Thought that this only happened with x86, but it seems there is something else going on here.

    Also, please check Edit > Preferences in the Unity editor to make sure you are using the proper version of the Android NDK.
     
  17. BoatBest

    BoatBest

    Joined:
    Jan 4, 2016
    Posts:
    60
    Sure! I'll report that in Unity Bug Reporter, and for NDK I use the one from Unity itself when install Unity Editor. So please let me know if you find the solution. Thank you in advance!!!
     
  18. exzizt

    exzizt

    Joined:
    Sep 30, 2017
    Posts:
    41
    Having this issue as well. The project was building fine in 2019.1.8f1 on Android. Opened it up in 2019.1.9f1 and the build fails with errors. Tried opening back in 2019.1.8f1, and the error seems to have transferred over.
     
    Ponyu likes this.
  19. Ponyu

    Ponyu

    Joined:
    May 18, 2018
    Posts:
    1
    Hi, I also encountered such a problem after switching to version 2019.1.9f1.
    I downloaded separately android-ndk-r16b. And indicated the path to this folder.
    It helped me.

    I hope to be released a patch to fix the problem.
     
  20. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    126
    Unity 2019.1.10f1
    Building for ARMv7 and ARM64

    Throws the following errors:

    Code (CSharp):
    1. Failed running C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp/build/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="C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Lighthouse Games 2018\ChallengeStars\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Lighthouse Games 2018/ChallengeStars/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="C:/Lighthouse Games 2018/ChallengeStars/Temp/StagingArea/Il2Cpp/il2cppOutput"
    2.  
    3. stdout:
    4.  
    5. Building libil2cpp.so with AndroidToolChain
    6.  
    7.     Output directory: C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    8.  
    9.     Cache directory: C:\Lighthouse Games 2018\ChallengeStars\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    10.  
    11. il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:
    12.  
    13. In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:
    14.  
    15. In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:
    16.  
    17. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list
    18.  
    19.        : "cc", "r2", "r3"
    20.  
    21.                ^
    22.  
    23. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    24.  
    25.        : "cc", "memory", "r2", "r3"
    26.  
    27.                          ^
    28.  
    29. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    30.  
    31.        : "cc", "memory", "r2", "r3"
    32.  
    33.                          ^
    34.  
    35. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    36.  
    37.        : "cc", "memory", "r2", "r3"
    38.  
    39.                          ^
    40.  
    41. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    42.  
    43.        : "cc", "memory", "r0", "r1", "r3"
    44.  
    45.                          ^
    46.  
    47. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    48.  
    49.        : "cc", "memory", "r2", "r3"
    50.  
    51.                          ^
    52.  
    53. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    54.  
    55.        : "cc", "memory", "r2", "r3"
    56.  
    57.                          ^
    58.  
    59. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    60.  
    61.        : "cc", "memory", "r2", "r3"
    62.  
    63.                          ^
    64.  
    65. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    66.  
    67.        : "cc", "memory", "r2", "r3"
    68.  
    69.                          ^
    70.  
    71. 9 errors generated.
    72.  
    73.  
    74.  
    75.  
    76.  
    77. Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    78.  
    79. Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\android\support\include" -c -g -DNDEBUG -fexceptions -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 "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -isystem "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot\usr\include\arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/Lighthouse Games 2018/ChallengeStars/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/1CFEE1915D22AFBF5D13BC335498514A.o"
    80.  
    81.  
    82.  
    83.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    84.  
    85.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    86.  
    87.   at il2cpp.Program.DoRun(String[] args)
    88.  
    89.   at il2cpp.Program.Run(String[] args)
    90.  
    91.   at il2cpp.Program.Main(String[] args)
    92.  
    93. stderr:
    94.  
    95.  
    96.  
    97. Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:
    98.  
    99. In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:
    100.  
    101. In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:
    102.  
    103. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list
    104.  
    105.        : "cc", "r2", "r3"
    106.  
    107.                ^
    108.  
    109. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    110.  
    111.        : "cc", "memory", "r2", "r3"
    112.  
    113.                          ^
    114.  
    115. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    116.  
    117.        : "cc", "memory", "r2", "r3"
    118.  
    119.                          ^
    120.  
    121. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    122.  
    123.        : "cc", "memory", "r2", "r3"
    124.  
    125.                          ^
    126.  
    127. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    128.  
    129.        : "cc", "memory", "r0", "r1", "r3"
    130.  
    131.                          ^
    132.  
    133. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    134.  
    135.        : "cc", "memory", "r2", "r3"
    136.  
    137.                          ^
    138.  
    139. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    140.  
    141.        : "cc", "memory", "r2", "r3"
    142.  
    143.                          ^
    144.  
    145. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    146.  
    147.        : "cc", "memory", "r2", "r3"
    148.  
    149.                          ^
    150.  
    151. C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    152.  
    153.        : "cc", "memory", "r2", "r3"
    154.  
    155.                          ^
    156.  
    157. 9 errors generated.
    158.  
    159.  
    160.  
    161.  
    162.  
    163. Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    164.  
    165. Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\android\support\include" -c -g -DNDEBUG -fexceptions -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 "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -isystem "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot\usr\include\arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/Lighthouse Games 2018/ChallengeStars/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/1CFEE1915D22AFBF5D13BC335498514A.o"
    166.  
    167.  
    168.  
    169.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    170.  
    171.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    172.  
    173.   at il2cpp.Program.DoRun(String[] args)
    174.  
    175.   at il2cpp.Program.Run(String[] args)
    176.  
    177.   at il2cpp.Program.Main(String[] args)
    178.  
    179.  
    180. UnityEngine.Debug:LogError(Object)
    181. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    182. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    183. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:496)
    184. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
    185. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    186. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    187. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    188.  
    189.  
     
  21. MartinFoxAndSheep

    MartinFoxAndSheep

    Joined:
    Feb 13, 2017
    Posts:
    3
    I encountered the same issue (Unity 2019.1.10f1, Building for ARMv7 and ARM64).

    Switching to an NDK version downloaded from the Google Android website as described by Ponyu solved this issue (ndk-16b).

    But other issues with the IL2CCP build process under Android remain (e.g. iOS c libraries are included in the build process).
     
  22. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    126
    switching to ndk-16b but now I get the following errors:

    Code (CSharp):
    1. Failed running C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp/build/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="C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Lighthouse Games 2018\ChallengeStars\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="D:/android-ndk-r16b-windows-x86_64/android-ndk-r16b" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Lighthouse Games 2018/ChallengeStars/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="C:/Lighthouse Games 2018/ChallengeStars/Temp/StagingArea/Il2Cpp/il2cppOutput"
    2.  
    3. stdout:
    4.  
    5. Building libil2cpp.so with AndroidToolChain
    6.  
    7.     Output directory: C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    8.  
    9.     Cache directory: C:\Lighthouse Games 2018\ChallengeStars\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    10.  
    11. ObjectFiles: 353 of which compiled: 353
    12.  
    13.     Time Compile: 29325 milliseconds Il2CppAttributes.cpp
    14.  
    15.     Time Compile: 19535 milliseconds Il2CppInvokerTable.cpp
    16.  
    17.     Time Compile: 13808 milliseconds Il2CppTypeDefinitions.c
    18.  
    19.     Time Compile: 9602 milliseconds BestHTTP33.cpp
    20.  
    21.     Time Compile: 9162 milliseconds Il2CppMetadataUsage.c
    22.  
    23.     Time Compile: 9086 milliseconds Unity.TextMeshPro1.cpp
    24.  
    25.     Time Compile: 7829 milliseconds Unity.TextMeshPro2.cpp
    26.  
    27.     Time Compile: 7565 milliseconds Il2CppCompilerCalculateTypeValues4.cpp
    28.  
    29.     Time Compile: 7454 milliseconds System.Xml4.cpp
    30.  
    31.     Time Compile: 7327 milliseconds BestHTTP13.cpp
    32.  
    33. Total compilation time: 98311 milliseconds.
    34.  
    35. il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\edwar\AppData\Local\Temp\tmp1CD6.tmp" -o "C:\Lighthouse Games 2018\ChallengeStars\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_5924403817C6C58360CDF02BD8059F28\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe
    36.  
    37.  
    38.  
    39. C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp9.cpp:41974: error: undefined reference to '_GenerateIdentity'
    40.  
    41. C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp9.cpp:41974: error: undefined reference to '_GenerateIdentity'
    42.  
    43. clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    44.  
    45.  
    46.  
    47.  
    48.  
    49.   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    50.  
    51.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    52.  
    53.   at il2cpp.Program.DoRun(String[] args)
    54.  
    55.   at il2cpp.Program.Run(String[] args)
    56.  
    57.   at il2cpp.Program.Main(String[] args)
    58.  
    59. stderr:
    60.  
    61.  
    62.  
    63. Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\edwar\AppData\Local\Temp\tmp1CD6.tmp" -o "C:\Lighthouse Games 2018\ChallengeStars\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_5924403817C6C58360CDF02BD8059F28\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "D:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe
    64.  
    65.  
    66.  
    67. C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp9.cpp:41974: error: undefined reference to '_GenerateIdentity'
    68.  
    69. C:\Lighthouse Games 2018\ChallengeStars\Temp\StagingArea\Il2Cpp\il2cppOutput/Assembly-CSharp9.cpp:41974: error: undefined reference to '_GenerateIdentity'
    70.  
    71. clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    72.  
    73.  
    74.  
    75.  
    76.  
    77.   at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
    78.  
    79.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    80.  
    81.   at il2cpp.Program.DoRun(String[] args)
    82.  
    83.   at il2cpp.Program.Run(String[] args)
    84.  
    85.   at il2cpp.Program.Main(String[] args)
    86.  
    87.  
    88. UnityEngine.Debug:LogError(Object)
    89. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    90. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    91. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:496)
    92. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
    93. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    94. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    95. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    96.  
    97.  
    Any ideas?
     
  23. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,620
    I've been building against Android solidly for the past few builds, Installing 2019.1.10 introduced this error even if I was only building for ARMv7 .
    I tried switching to x86 and got this error instead
    upload_2019-7-16_17-53-31.png

    I exclusively use the Android SDK/NDK provided by Unity for all my installs.

    I went back and re-installed 2019.1.9, which worked previously but that also now fails with the same error. I'm downloading 2019.1.8 to check again, tested 2018 which worked 100% of the time, and this fails utterly too now

    Have Unity updated the SDK/NDK in the backend so all builds download the same source for the tools?
     
    Last edited: Jul 16, 2019 at 6:03 PM
    DebugLogWarning likes this.
  24. KabaTemas

    KabaTemas

    Joined:
    Jan 11, 2016
    Posts:
    1
    I got the same Exception:
    Exception: C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\2019.1.9f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!

    And then:
    ---> (Inner Exception #1) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.


    Code (CSharp):
    1. Failed running C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\2019.1.9f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARM64" --configuration="Release" --outputpath="G:\FreeTime\workspaces\SVN\branches\V3372 - Finalization\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a\libil2cpp.so" --cachedirectory="G:\FreeTime\workspaces\SVN\branches\V3372 - Finalization\Assets\..\Library\il2cpp_android_arm64-v8a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/2019.1.9f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --incremental-g-c-time-slice=3 --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/2019.1.9f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="G:/FreeTime/workspaces/SVN/branches/V3372 - Finalization/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="G:/FreeTime/workspaces/SVN/branches/V3372 - Finalization/Temp/StagingArea/Il2Cpp/il2cppOutput"
    2.  
    3. stdout:
    4.  
    5. Building libil2cpp.so with AndroidToolChain
    6.  
    7.     Output directory: G:\FreeTime\workspaces\SVN\branches\V3372 - Finalization\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a
    8.  
    9.     Cache directory: G:\FreeTime\workspaces\SVN\branches\V3372 - Finalization\Library\il2cpp_android_arm64-v8a\il2cpp_cache
    10.  
    11. il2cpp.exe didn't catch exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The specified executable is not a valid application for this OS platform.
    12.  
    13.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    14.  
    15.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    16.  
    17.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    18.  
    19.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)
    20.  
    21.   --- End of inner exception stack trace ---
    22.  
    23.   at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    24.  
    25.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    26.  
    27.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    28.  
    29.   at il2cpp.Program.DoRun(String[] args)
    30.  
    31.   at il2cpp.Program.Run(String[] args)
    32.  
    33.   at il2cpp.Program.Main(String[] args)
    34.  
    35. ---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    36.  
    37.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    38.  
    39.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    40.  
    41.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    42.  
    43.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    44.  
    45.  
    46.  
    47. ---> (Inner Exception #1) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    48.  
    49.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    50.  
    51.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    52.  
    53.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    54.  
    55.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    56.  
    57.  
    58.  
    59. ---> (Inner Exception #2) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    60.  
    61.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    62.  
    63.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    64.  
    65.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    66.  
    67.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    68.  
    69.  
    70.  
    71. ---> (Inner Exception #3) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    72.  
    73.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    74.  
    75.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    76.  
    77.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    78.  
    79.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    80.  
    81.  
    82.  
    83. ---> (Inner Exception #4) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    84.  
    85.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    86.  
    87.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    88.  
    89.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    90.  
    91.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    92.  
    93.  
    94.  
    95. ---> (Inner Exception #5) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    96.  
    97.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    98.  
    99.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    100.  
    101.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    102.  
    103.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    104.  
    105.  
    106.  
    107. ---> (Inner Exception #6) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    108.  
    109.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    110.  
    111.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    112.  
    113.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    114.  
    115.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    116.  
    117.  
    118.  
    119. ---> (Inner Exception #7) System.ComponentModel.Win32Exception (0x80004005): The specified executable is not a valid application for this OS platform.
    120.  
    121.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    122.  
    123.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    124.  
    125.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    126.  
    127.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    128.  
    129.  
    130.  
    131. stderr:
    132.  
    133.  
    134.  
    135. Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The specified executable is not a valid application for this OS platform.
    136.  
    137.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    138.  
    139.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    140.  
    141.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    142.  
    143.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)
    144.  
    145.   --- End of inner exception stack trace ---
    146.  
    147.   at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    148.  
    149.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    150.  
    151.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    152.  
    153.   at il2cpp.Program.DoRun(String[] args)
    154.  
    155.   at il2cpp.Program.Run(String[] args)
    156.  
    157.   at il2cpp.Program.Main(String[] args)
    158.  
    159.  
    160. UnityEngine.Debug:LogError(Object)
    161. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    162. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    163. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:496)
    164. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(String, String, String, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:477)
    165. UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    166. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    167. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    168.  
    169.  
    170. Exception: C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\2019.1.9f1\Editor\Data\il2cpp/build/il2cpp.exe did not run properly!
    171. 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)
    172. 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)
    173. 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)
    174. 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)
    175. UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:334)
    176. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, 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:63)
    177. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    178. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    179. 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 <1a10f9035b6b403994c99e5b653643c6>:0)
    180. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <1a10f9035b6b403994c99e5b653643c6>:0)
    181. 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)
    182. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    183.  
    184.  
    185. Build completed with a result of 'Failed'
    186. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    187.  
    188.  
    189. UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
    190.  
    191.  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
    192.  
    193.  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
    194. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    195.  
    196.  
    197.  
    198.  
     
  25. MartinFoxAndSheep

    MartinFoxAndSheep

    Joined:
    Feb 13, 2017
    Posts:
    3
    I would search my code for _GenerateIdentity. Are you using iOS native plugins? In our case IL2CCP accidentally included references to iOS native code in the build and then the linking failed since the library could not be found. The way to solve this issue was to remove all iOS native plugins when building Android with IL2CPP.

    Good luck.
     
    Last edited: Jul 17, 2019 at 2:42 PM
  26. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    126
    Thanks, but that sounds more like a hack.
    Unity needs to fix this. My project relies on a lot of plugins that support both iOS and Android, to try to delete all the iOS ones each time I need to do an Android Build is ridiculous.

    I had 2 files called GCIdentity in the plugins folder for iOS which I deleted and where it was referencing them in the code I used the #if UNITY_IOS to prevent them from building on Android but still getting the same error.
     
  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    You can open the generated .cpp file mentioned in the error message. If you have a look at the line where the error occurs, you should see comments in the code which indicate the C# function that causes the problem. That might help track down where GenerateIdentity is still defined in the C# code.
     
  28. hitwill

    hitwill

    Joined:
    Jun 5, 2016
    Posts:
    10
    I am also getting a similar error and now sure how to fix it?

    Failed running C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp/build/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="C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.1.10f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="C:/Users/willi/OneDrive/Documents/Catpurse/Hit the Green Tile/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="C:/Users/willi/OneDrive/Documents/Catpurse/Hit the Green Tile/Temp/StagingArea/Il2Cpp/il2cppOutput"
    stdout:
    Building libil2cpp.so with AndroidToolChain
    Output directory: C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    Cache directory: C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:
    In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:
    In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r0", "r1", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    9 errors generated.
    Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\android\support\include" -c -g -DNDEBUG -fexceptions -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 "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -isystem "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot\usr\include\arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/Users/willi/OneDrive/Documents/Catpurse/Hit the Green Tile/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/ACEF1B145DC67CAD328DBF31C5C3E89A.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)
    at il2cpp.Program.Run(String[] args)
    at il2cpp.Program.Main(String[] args)
    stderr:
    Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:
    In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:
    In file included from C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:622:17: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:653:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:690:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:724:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:755:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r0", "r1", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:793:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:833:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:875:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps-arm.h:917:27: error: asm-specifier for input or output variable conflicts with asm clobber list
    : "cc", "memory", "r2", "r3"
    ^
    9 errors generated.
    Invocation was: Executable: "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++"
    Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\android\support\include" -c -g -DNDEBUG -fexceptions -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 "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -isystem "C:\Program Files\Unity\Hub\Editor\2019.1.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot\usr\include\arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "C:\Users\willi\OneDrive\Documents\Catpurse\Hit the Green Tile\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/Users/willi/OneDrive/Documents/Catpurse/Hit the Green Tile/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/ACEF1B145DC67CAD328DBF31C5C3E89A.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)
    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, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:63)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  29. hitwill

    hitwill

    Joined:
    Jun 5, 2016
    Posts:
    10
    I used the Unity Hub to install JDK, SDK and NDK
     
  30. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    3,783
    Make sure you are using the Android r16b NDK. It seems that the Unity Hub instals the wrong version of the NDK for some reason, which can lead to these errors.
     
    SimonDarksideJ and Cubequad like this.
  31. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    126
    Thanks, that helped me solve that issue, I can finally build to the phone!
     
    JoshPeterson likes this.
  32. serge_ilkov

    serge_ilkov

    Joined:
    Jul 5, 2019
    Posts:
    1
    I was helped by a change in the name of the unity project that used to contain a bracket
     
  33. hitwill

    hitwill

    Joined:
    Jun 5, 2016
    Posts:
    10
    That did the trick! Thank you!
     
  34. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,620
    Where I used to always recommend using the NDK/SDK that comes with Unity, after 2019.1.10, I'm going to change my advice.
    Better to download manually the SDK / NDK installer, which never changes unless you want it to and configure Unity to use that instead.
    I've found if you have multiple versions of Unity installed with the SDK/NDK installed, it gets very confused.