How to reproduce:
1. Open the attached “IN-80821.zip” project
2. Open the Build Settings window (File → Build Settings…)
3. Change the Build Target to Android
4. Build the Project
Expected result: The Build is successful
Actual result: The Build fails and “ld.lld: error: undefined symbol: stderr” error is thrown
Reproducible with: 2021.3.41f1, 2022.3.39f1, 6000.0.12f1
Reproducible on: macOS M1 Max, macOS 14.15 (Intel)
Not reproducible on: No other environment tested
Notes:
- The issue is not reproducible with Mono Scripting Backend
- The issue is not reproducible when building for Standalone
- The reporter noted that the issue is not supposed to reproduce as “stderr” is a standard library
- Full error message:
”Building Library/Bee/artifacts/Android/iz17e/libil2cpp.so failed with output:
ld.lld: error: undefined symbol: test_c
>>> referenced by Assembly-CSharp.cpp:227 (Library/Bee/artifacts/Android/il2cppOutput/cpp/Assembly-CSharp.cpp:227)
>>> Library/Bee/artifacts/Android/iz17e/lk81nll58e8a.o:(test_test_c_m83DA76F808553D2DC88A7ECE5FB0AA0AF1EA45FE)
>>> referenced by Assembly-CSharp.cpp:227 (Library/Bee/artifacts/Android/il2cppOutput/cpp/Assembly-CSharp.cpp:227)
>>> Library/Bee/artifacts/Android/iz17e/lk81nll58e8a.o:(test_Start_mEC610EE12F006B73DD8DBE742E8660D39BFF518F)
clang++: [0;1;31merror: [0m[1mlinker command failed with exit code 1 (use -v to see invocation)[0m
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:219)”