Search Issue Tracker
Third Party Issue
Votes
21
Found in
2021.2
2021.2.17f1
2021.3
2022.1
2022.2
Issue ID
1413756
Regression
Yes
[IL2CPP] Android Build failure when building project with ToolBuddy asset and IL2CPP Scripting Backend selected
Reproduction steps:
1. Open the attached user's project
2. Go to File > Build Settings and switch to Android Platform
3. In the Build Settings window press the Player Settings button
4. In Player Settings make sure that Scripting Backend is set to IL2CPP
5. Go back to Build Settings and Build the project
6. Observe errors that appear in the Console window
Expected result: The Build is successful
Actual result: The Build fails and errors are thrown in the Console window
Reproducible with: 2021.2.19f1, 2021.3.0f1, 2022.1.0b15, 2022.2.0a10
Not reproducible with: 2019.4.37f1, 2020.3.33f1, 2021.1.28f1
Notes:
- Issue is reproducible when building for Android
- Issue is not reproducible when building with Mono Scripting Backend selected
- Issue is not reproducible when building for iOS, Mac/Windows Standalone
- When navigating to Assets > Plugins and deleting the "ToolBuddy" folder, the Build is successful
- Errors in the Console window:
"Building Library/Bee/artifacts/Android/fy9m9/libil2cpp.so failed with output:
/Users/*user name*/Library/Android/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld.gold: internal error in arm_branch_common, at /Volumes/Android/buildbot/src/android/binutils/toolchain/binutils/binutils-2.27/gold/arm.cc:4063
clang++: error: linker command failed with exit code 1 (use -v to see invocation)"
"BuildFailedException: Incremental Player build failed!"
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2022.2.X):
It looks like this is a bug in the gold linker shipped with the Android r21 NDK that is used by Unity, when link time optimization is enabled. We can work around this issue in one of two ways:
1. For Unity 2022.1 and earlier versions, change the C++ Compiler Configuration option from a value of "Master" to a value of "Release". This will avoid link time optimization, and therefore avoid the error. This may change the performance characteristics of the code at run time though.
2. Use Unity 2022.2 and later, where Unity uses the r23 NDK and the lld linker. This bug is not present in that version.