Failed running il2cpp.exe --platform="Android" --architecture="x86"

Hey, I got an issue, when I try to compile my Application: “Failed running il2cpp.exe”
I just downgraded my project from 2019.3.0a3 to 2019.2.0b4, if that is important.
Thanks for every help!

Here’s the full exception:

Failed running C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\il2cpp/build/il2cpp.exe --compile-cpp --libil2cpp-static --platform="Android" --architecture="x86" --configuration="Release" --outputpath="D:\Dateien Johannes\Unity\VoidFalling\Temp\StagingArea\assets\bin\Data\Native\x86\libil2cpp.so" --cachedirectory="D:\Dateien Johannes\Unity\VoidFalling\Assets\..\Library\il2cpp_android_x86/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.0b4/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.2.0b4/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.2.0b4/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.2.0b4/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --generatedcppdir="D:/Dateien Johannes/Unity/VoidFalling/Temp/StagingArea/Il2Cpp/il2cppOutput" --dotnetprofile="unityaot" 

stdout:
Building libil2cpp.so with AndroidToolChain
	Output directory: D:\Dateien Johannes\Unity\VoidFalling\Temp\StagingArea\assets\bin\Data\Native\x86
	Cache directory: D:\Dateien Johannes\Unity\VoidFalling\Library\il2cpp_android_x86\il2cpp_cache
ObjectFiles: 153 of which compiled: 57
	Time Compile: 9838 milliseconds Il2CppAttributes.cpp
	Time Compile: 9523 milliseconds Il2CppInvokerTable.cpp
	Time Compile: 7955 milliseconds Generics11.cpp
	Time Compile: 7147 milliseconds Generics12.cpp
	Time Compile: 6990 milliseconds Generics10.cpp
	Time Compile: 6874 milliseconds Generics6.cpp
	Time Compile: 6863 milliseconds com.unity.multiplayer-hlapi.Runtime1.cpp
	Time Compile: 6833 milliseconds Generics8.cpp
	Time Compile: 6790 milliseconds com.unity.multiplayer-hlapi.Runtime.cpp
	Time Compile: 6691 milliseconds Generics9.cpp
Total compilation time: 28031 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK	oolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\johan\AppData\Local\Temp	mp6661.tmp" -o "D:\Dateien Johannes\Unity\VoidFalling\Library\il2cpp_android_x86\il2cpp_cache\linkresult_B6D1CA47961150E5039C3AB65FB7CC5C\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\platforms\android-16\arch-x86" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK	oolchains\x86-4.9\prebuilt\windows-x86_64" -target i686-none-linux-android -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\libs\x86" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:503: error: undefined reference to '__atomic_load_8'
C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:427: error: undefined reference to '__atomic_fetch_add_8'
C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\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)


   bei Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
   bei Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   bei il2cpp.Program.DoRun(String[] args)
   bei il2cpp.Program.Run(String[] args)
   bei il2cpp.Program.Main(String[] args)
stderr:

Unbehandelte Ausnahme: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK	oolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\johan\AppData\Local\Temp	mp6661.tmp" -o "D:\Dateien Johannes\Unity\VoidFalling\Library\il2cpp_android_x86\il2cpp_cache\linkresult_B6D1CA47961150E5039C3AB65FB7CC5C\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\platforms\android-16\arch-x86" -gcc-toolchain "C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK	oolchains\x86-4.9\prebuilt\windows-x86_64" -target i686-none-linux-android -Wl,--wrap,sigaction -L "C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\libs\x86" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:503: error: undefined reference to '__atomic_load_8'
C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\sources\cxx-stl\gnu-libstdc++\4.9\include\bits/atomic_base.h:427: error: undefined reference to '__atomic_fetch_add_8'
C:\Program Files\Unity\Hub\Editor\2019.2.0b4\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\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)


   bei Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext)
   bei Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
   bei il2cpp.Program.DoRun(String[] args)
   bei il2cpp.Program.Run(String[] args)
   bei 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, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:71)
UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:502)
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)

You can likely work around this issue by disabling the build for x86 in the Player Settings. There were some issues related to the Android NDK and the x86 architecture which have been recently resolved in newer versions of Unity - this looks like one of them.

However, most projects don’t need to target x86 for Android, so this can usually be safely disabled to avoid this error.