Debug紀錄:Failed running Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --
報錯事例:
(
Failed running C:\Program Files\Unity\Hub\Editor\2018.3.0f2\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="ARMv7" --configuration="Release" --outputpath="C:\Users\John\Documents\Projects\Test\test\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\John\Documents\Projects\Test\test\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2018.3.0f2/2019.1.9f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2018.3.0f2/2019.1.9f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=C:/Users/John/Documents/Projects/Test/test/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=C:/Users/John/Documents/Projects/Test/test/Temp/StagingArea/Il2Cpp/il2cppOutput
stdout:
Building libil2cpp.so with AndroidToolChain
Output directory: C:\Users\John\Documents\Projects\Test\test\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
Cache directory: C:\Users\John\Documents\Projects\Test\test\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: In file included from C:\Users\John\Documents\Projects\Test\test\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:
In file included from C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:
In file included from C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:
C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\John\Documents\Projects\Test\test\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/Users/John/Documents/Projects/Test/test/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/69A3015F0A286C34AA6224074AFEF3E0.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\John\Documents\Projects\Test\test\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp:72:
In file included from C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp\os\Unity\AtomicQueue.cpp:6:
In file included from C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp\os\Unity/ExtendedAtomicOps.h:121:
C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\bdwgc\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\libil2cpp\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\libil2cpp" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\il2cpp\external\bdwgc\include" -I"." -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\llvm-libc++abi\include" -I"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sysroot" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\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\2018.3.0f2\2019.1.9f1\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\John\Documents\Projects\Test\test\Temp\StagingArea\Il2Cpp\il2cppOutput\lumpedcpp\Lump_libil2cpp_os.cpp" -o "C:/Users/John/Documents/Projects/Test/test/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/libil2cpp/69A3015F0A286C34AA6224074AFEF3E0.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)
-----------
Exception: C:\Program Files\Unity\Hub\Editor\2018.3.0f2\2019.1.9f1\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 <1a10f9035b6b403994c99e5b653643c6>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <1a10f9035b6b403994c99e5b653643c6>: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 <1a10f9035b6b403994c99e5b653643c6>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <1a10f9035b6b403994c99e5b653643c6>: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)
)
問題點:
顯然Unity官方在2019.1.9、2019.1.10這兩個版本中升級了插件自帶安裝的sdk和ndk,
出問題的是ndk:
新的版本號能在ndk資料夾的source找到:
Pkg.Desc = Android NDK
Pkg.Revision = 19.1.5304403
沒問題的舊版是:
Pkg.Desc = Android NDK
Pkg.Revision = 16.1.4479499,
為了解決無法建置的問題,
必須自行下載r16b的ndk(經過測試,比這版更新的版本都會報錯),
在preference中手動設定,
這裡有另一個問題是瀏覽文件的按鈕似乎也壞掉了,
所以你ndk的目錄要手動複製貼上比較保險,
完成後請記得確認專案路徑中沒有中文或其他不兼容的語言,
否則也會報一樣的錯誤,
再次輸出應該就能恢復正常,
unity官方已經在著手解決問題,
應該下版就會修正了。
搞了一整天,現在是早上4:48,
等我把專案上完真的要好好睡一覺
QAQ
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言
你發現了這篇網誌的留言板,在這留點什麼吧|д・)