I’ve been struggling building for Android for a while and have narrowed things down somewhat but am stuck again and am not able to make any more progress.
Building without ‘Development Build’ checked: works fine and the game runs.
Building with ‘Development Build’ checked: the game freezes right after the splash screen.
Building with ‘Development Build’ + ‘Script Debugging’: build fails with the following error:
Edit: I forgot to say that this happens in both local and cloud builds
Edit 2: Also forgot to say that I’m running 2019.4.16f
Exception: C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe did not run properly!
Failed running “C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe” --compile-cpp --libil2cpp-static --platform=“Android” --architecture=“ARM64” --configuration=“ReleasePlus” --outputpath=“C:\Users\simon\repos\rugby-unity\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a\libil2cpp.so” --cachedirectory=“C:\Users\simon\repos\rugby-unity\Assets..\Library\il2cpp_android_arm64-v8a/il2cpp_cache” --additional-include-directories=“C:/Program Files/Unity/Hub/Editor/2019.4.16f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include” --additional-include-directories=“C:/Program Files/Unity/Hub/Editor/2019.4.16f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include” --tool-chain-path=“C:/Program Files/Unity/Hub/Editor/2019.4.16f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK” --map-file-parser=“C:/Program Files/Unity/Hub/Editor/2019.4.16f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe” --generatedcppdir=C:/Users/simon/repos/rugby-unity/Temp/StagingArea/Il2Cpp/il2cppOutput --dotnetprofile=“unityaot” --enable-debugger
stdout:
Building libil2cpp.so with AndroidToolChain
Output directory: C:\Users\simon\repos\rugby-unity\Temp\StagingArea\assets\bin\Data\Native\arm64-v8a
Cache directory: C:\Users\simon\repos\rugby-unity\Library\il2cpp_android_arm64-v8a\il2cpp_cache
ObjectFiles: 994 of which compiled: 0
Total compilation time: 935 milliseconds.
il2cpp.exe didn’t catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @“C:\Users\simon\AppData\Local\Temp\tmpBC36.tmp” -o “C:\Users\simon\repos\rugby-unity\Library\il2cpp_android_arm64-v8a\il2cpp_cache\linkresult_B7315E624227AAD87D98CA3B0A62996F\libil2cpp.so” -shared -Wl,-soname,libil2cpp.so -Wl,–no-undefined -Wl,-z,noexecstack -Wl,–gc-sections -Wl,–build-id -stdlib=libc++ -static-libstdc++ -target aarch64-linux-android21 -Wl,–wrap,sigaction -llog -rdynamic -fuse-ld=bfd.exe
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function AndroidLogCallback(char const*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp\libil2cpp\os\Android/Initialize.cpp:12:(.text._ZL18AndroidLogCallbackPKc+0x18): relocation truncated to fit: R_AARCH64_JUMP26 against symbol
__android_log_print’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/liblog.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function il2cpp::hushed:s::OpenAndroidConfig()': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp\libil2cpp\os\Android/TimeZoneInfo.cpp:48:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x1c): relocation truncated to fit: R_AARCH64_CALL26 against symbol
getenv@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::char_traits<char>::length(char const*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/__string:217:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x50): relocation truncated to fit: R_AARCH64_CALL26 against symbol
strlen@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function il2cpp::hushed:s::OpenAndroidConfig()': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp\libil2cpp\os\Android/TimeZoneInfo.cpp:49:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x88): relocation truncated to fit: R_AARCH64_CALL26 against symbol
getenv@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::__libcpp_allocate(unsigned long, unsigned long)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/new:259:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x9c): relocation truncated to fit: R_AARCH64_CALL26 against symbol
operator new(unsigned long)’ defined in .text._Znwm section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::char_traits<char>::length(char const*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/__string:217:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0xd0): relocation truncated to fit: R_AARCH64_CALL26 against symbol
strlen@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::_DeallocateCaller::__do_call(void*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x114): relocation truncated to fit: R_AARCH64_CALL26 against symbol
operator delete(void*)’ defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x124): relocation truncated to fit: R_AARCH64_CALL26 against symbol operator delete(void*)' defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o) C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x18c): relocation truncated to fit: R_AARCH64_CALL26 against symbol
operator delete(void*)’ defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x1c4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)’ defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x1ec): additional relocation overflows omitted from the output
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
at Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet1 objectFiles, CppToolChainContext toolChainContext) at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Program.DoRun(String[ ] args, List
1 foundAssemblies)
at il2cpp.Program.Run(String[ ] args, Boolean setInvariantCulture)
at il2cpp.Program.Main(String[ ] args)
stderr:
Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @“C:\Users\simon\AppData\Local\Temp\tmpBC36.tmp” -o “C:\Users\simon\repos\rugby-unity\Library\il2cpp_android_arm64-v8a\il2cpp_cache\linkresult_B7315E624227AAD87D98CA3B0A62996F\libil2cpp.so” -shared -Wl,-soname,libil2cpp.so -Wl,–no-undefined -Wl,-z,noexecstack -Wl,–gc-sections -Wl,–build-id -stdlib=libc++ -static-libstdc++ -target aarch64-linux-android21 -Wl,–wrap,sigaction -llog -rdynamic -fuse-ld=bfd.exe
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function AndroidLogCallback(char const*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp\libil2cpp\os\Android/Initialize.cpp:12:(.text._ZL18AndroidLogCallbackPKc+0x18): relocation truncated to fit: R_AARCH64_JUMP26 against symbol
__android_log_print’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/liblog.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function il2cpp::hushed:s::OpenAndroidConfig()': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp\libil2cpp\os\Android/TimeZoneInfo.cpp:48:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x1c): relocation truncated to fit: R_AARCH64_CALL26 against symbol
getenv@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::char_traits<char>::length(char const*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/__string:217:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x50): relocation truncated to fit: R_AARCH64_CALL26 against symbol
strlen@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function il2cpp::hushed:s::OpenAndroidConfig()': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\il2cpp\libil2cpp\os\Android/TimeZoneInfo.cpp:49:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x88): relocation truncated to fit: R_AARCH64_CALL26 against symbol
getenv@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::__libcpp_allocate(unsigned long, unsigned long)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/new:259:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x9c): relocation truncated to fit: R_AARCH64_CALL26 against symbol
operator new(unsigned long)’ defined in .text._Znwm section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::char_traits<char>::length(char const*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/__string:217:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0xd0): relocation truncated to fit: R_AARCH64_CALL26 against symbol
strlen@@LIBC’ defined in .text section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android/21/libc.so
C:/Users/simon/repos/rugby-unity/Library/il2cpp_android_arm64-v8a/il2cpp_cache/libil2cpp/DBC5130846C16018DCB65FE676D3FFB2.o: In function std::__ndk1::_DeallocateCaller::__do_call(void*)': C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x114): relocation truncated to fit: R_AARCH64_CALL26 against symbol
operator delete(void*)’ defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x124): relocation truncated to fit: R_AARCH64_CALL26 against symbol operator delete(void*)' defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o) C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/../sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x18c): relocation truncated to fit: R_AARCH64_CALL26 against symbol
operator delete(void*)’ defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/lib/aarch64-linux-android\libc++_static.a(new.o)
C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin/…/sysroot/usr/include/c++/v1/new:340:(.text._ZN6il2cpp2os17OpenAndroidConfigEv+0x1c4): relocation truncated to fit: R_AARCH64_CALL26 against symbol `operator delete(void*)’ defined in .text._ZdlPv section in C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\PlaybackE