Unable to Build

I'm unable to build android il2cpp on 2019.2.0a13 with the VR lightweight RP.
I didn't add anything new, just hit build.

IL2CPP error

[spoiler]

Failed running M:\Program Files\Unity\2019.2.0a13\Editor\Data\il2cpp/build/il2cpp.exe --compile-cpp --libil2cpp-static --platform="Android" --architecture="x86" --configuration="Release" --outputpath="M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Temp\StagingArea\assets\bin\Data\Native\x86\libil2cpp.so" --cachedirectory="M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Assets..\Library\il2cpp_android_x86/il2cpp_cache" --additional-include-directories="M:/Program Files/Unity/2019.2.0a13/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="M:/Program Files/Unity/2019.2.0a13/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="M:/Bureaublad/android-ndk-r16b" --map-file-parser="M:/Program Files/Unity/2019.2.0a13/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --generatedcppdir=M:/Bureaublad/ROR2Moing/Unity/multimod/MultiMod/vrtest/Temp/StagingArea/Il2Cpp/il2cppOutput --dotnetprofile="unityaot"

stdout:

Building libil2cpp.so with AndroidToolChain

Output directory: M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Temp\StagingArea\assets\bin\Data\Native\x86

Cache directory: M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Library\il2cpp_android_x86\il2cpp_cache

ObjectFiles: 141 of which compiled: 0

Total compilation time: 255 milliseconds.

il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: M:\Bureaublad\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users****\AppData\Local\Temp\tmp3309.tmp" -o "M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Library\il2cpp_android_x86\il2cpp_cache\linkresult_ACAC4381B9A5C19081F161AD0D8538FE\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "M:\Bureaublad\android-ndk-r16b\platforms\android-16\arch-x86" -gcc-toolchain "M:\Bureaublad\android-ndk-r16b\toolchains\x86-4.9\prebuilt\windows-x86_64" -target i686-none-linux-android -Wl,--wrap,sigaction -L "M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\x86" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:503: error: undefined reference to '__atomic_load_8'

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:427: error: undefined reference to '__atomic_fetch_add_8'

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:411: error: undefined reference to '__atomic_fetch_add_8'

clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

bij Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)

bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

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

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

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

stderr:

Onverwerkte uitzondering: Unity.IL2CPP.Building.BuilderFailedException: M:\Bureaublad\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users****\AppData\Local\Temp\tmp3309.tmp" -o "M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Library\il2cpp_android_x86\il2cpp_cache\linkresult_ACAC4381B9A5C19081F161AD0D8538FE\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "M:\Bureaublad\android-ndk-r16b\platforms\android-16\arch-x86" -gcc-toolchain "M:\Bureaublad\android-ndk-r16b\toolchains\x86-4.9\prebuilt\windows-x86_64" -target i686-none-linux-android -Wl,--wrap,sigaction -L "M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\x86" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:503: error: undefined reference to '__atomic_load_8'

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:427: error: undefined reference to '__atomic_fetch_add_8'

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:411: error: undefined reference to '__atomic_fetch_add_8'

clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

bij Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)

bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

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

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

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

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List
1, Action1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:504)
UnityEditorInternal.IL2CPPBuilder:RunCompileAndLink() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:370)
UnityEditorInternal.IL2CPPUtils:RunCompileAndLink(String, String, IIl2CppPlatformProvider, Action
1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:77)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[/spoiler]

There are other problems (with Visual Studio) in 2019.2.0a13 that make it unusable. You should roll back to 2019.2.0a11. ;)

[quote=“TaloxMachina”, post:1, topic: 741425]
I’m unable to build android il2cpp on 2019.2.0a13 with the VR lightweight RP.
I didn’t add anything new, just hit build.

IL2CPP error

Failed running M:\Program Files\Unity\2019.2.0a13\Editor\Data\il2cpp/build/il2cpp.exe --compile-cpp --libil2cpp-static --platform=“Android” --architecture=“x86” --configuration=“Release” --outputpath=“M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Temp\StagingArea\assets\bin\Data\Native\x86\libil2cpp.so” --cachedirectory=“M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Assets..\Library\il2cpp_android_x86/il2cpp_cache” --additional-include-directories=“M:/Program Files/Unity/2019.2.0a13/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include” --additional-include-directories=“M:/Program Files/Unity/2019.2.0a13/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include” --tool-chain-path=“M:/Bureaublad/android-ndk-r16b” --map-file-parser=“M:/Program Files/Unity/2019.2.0a13/Editor/Data/Tools/MapFileParser/MapFileParser.exe” --generatedcppdir=M:/Bureaublad/ROR2Moing/Unity/multimod/MultiMod/vrtest/Temp/StagingArea/Il2Cpp/il2cppOutput --dotnetprofile=“unityaot”

stdout:

Building libil2cpp.so with AndroidToolChain

Output directory: M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Temp\StagingArea\assets\bin\Data\Native\x86

Cache directory: M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Library\il2cpp_android_x86\il2cpp_cache

ObjectFiles: 141 of which compiled: 0

Total compilation time: 255 milliseconds.

il2cpp.exe didn’t catch exception: Unity.IL2CPP.Building.BuilderFailedException: M:\Bureaublad\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @“C:\Users****\AppData\Local\Temp\tmp3309.tmp” -o “M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Library\il2cpp_android_x86\il2cpp_cache\linkresult_ACAC4381B9A5C19081F161AD0D8538FE\libil2cpp.so” -shared -Wl,-soname,libil2cpp.so -Wl,–no-undefined -Wl,-z,noexecstack -Wl,–gc-sections -Wl,–build-id --sysroot “M:\Bureaublad\android-ndk-r16b\platforms\android-16\arch-x86” -gcc-toolchain “M:\Bureaublad\android-ndk-r16b\toolchains\x86-4.9\prebuilt\windows-x86_64” -target i686-none-linux-android -Wl,–wrap,sigaction -L “M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\x86” -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:503: error: undefined reference to ‘__atomic_load_8’

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:427: error: undefined reference to ‘__atomic_fetch_add_8’

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:411: error: undefined reference to ‘__atomic_fetch_add_8’

clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

bij Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)

bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

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

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

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

stderr:

Onverwerkte uitzondering: Unity.IL2CPP.Building.BuilderFailedException: M:\Bureaublad\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @“C:\Users****\AppData\Local\Temp\tmp3309.tmp” -o “M:\Bureaublad\ROR2Moing\Unity\multimod\MultiMod\vrtest\Library\il2cpp_android_x86\il2cpp_cache\linkresult_ACAC4381B9A5C19081F161AD0D8538FE\libil2cpp.so” -shared -Wl,-soname,libil2cpp.so -Wl,–no-undefined -Wl,-z,noexecstack -Wl,–gc-sections -Wl,–build-id --sysroot “M:\Bureaublad\android-ndk-r16b\platforms\android-16\arch-x86” -gcc-toolchain “M:\Bureaublad\android-ndk-r16b\toolchains\x86-4.9\prebuilt\windows-x86_64” -target i686-none-linux-android -Wl,–wrap,sigaction -L “M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\x86” -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:503: error: undefined reference to ‘__atomic_load_8’

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:427: error: undefined reference to ‘__atomic_fetch_add_8’

M:\Bureaublad\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:411: error: undefined reference to ‘__atomic_fetch_add_8’

clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)

bij Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)

bij Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)

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

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

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

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:126)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List1, Action1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:504) UnityEditorInternal.IL2CPPBuilder:RunCompileAndLink() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:370) UnityEditorInternal.IL2CPPUtils:RunCompileAndLink(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:77)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

[/quote]

This is a bug we have corrected. Until the fix is released, you can disable the x86 architecture for Android in the player settings, and this should go away.

1 Like