[mono][android][tests] Library mode functional tests fail to build on android arm/x86
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- android, csharp
- Domain
- build-system, mobile, testing
Research direction
Start with the Android library build path in src/mono/msbuild/common/LibraryBuilder.targets and the LibraryBuilderTask calls shown in the failure. Reproduce the functional test build for android-x86 and android-arm, comparing them with the passing x64 and arm64 builds from the test introduced by pull request 111545. Done means the tests build successfully on both affected platforms and can be re-enabled in CI.
Written by the indexing model from the issue text.
Description
Description
Functional test for testing library mode on Android fails to build on:
- android x86 emulator build fails at linking:
d.lld: error: relocation R_386_PC32 cannot be used against symbol 'fmodf'; recompile with -fPIC >>> defined in /usr/local/android-sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/lib/i686-linux-android/21/libm.so >>> referenced by /__w/1/s/artifacts/obj/Android.Device_Emulator.LibraryMode_Aot_Llvm.Test/Release/net10.0/android-x86/mobile/System.Private.CoreLib.dll.o:(wrapper_managed_to_native_object___icall_wrapper___emul_rrem_single_single) clang: error: linker command failed with exit code 1 (use -v to see invocation) - android arm device build crashes (clang crashes in particular):
##[error]src/mono/msbuild/common/LibraryBuilder.targets(28,5): error MSB4018: (NETCORE_ENGINEERING_TELEMETRY=Build) The "LibraryBuilderTask" task failed unexpectedly. System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/usr/local/android-sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a21-clang' with working directory '/__w/1/s/artifacts/bin/Android.Device_Emulator.LibraryMode_Aot_Llvm.Test/Release/net10.0/android-arm/AppBundle/'. No such file or directory at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at Utils.TryRunProcess(TaskLoggingHelper logger, String path, String args, IDictionary`2 envVars, String workingDir, Boolean silent, Boolean logStdErrAsMessage, MessageImportance debugMessageImportance, String label, Action`1 inputProvider) in /_/src/tasks/Common/Utils.cs:line 174 at Utils.RunProcess(TaskLoggingHelper logger, String path, String args, IDictionary`2 envVars, String workingDir, Boolean ignoreErrors, Boolean silent, MessageImportance debugMessageImportance) in /_/src/tasks/Common/Utils.cs:line 116 at Microsoft.Android.Build.AndroidProject.Build(String workingDir, ClangBuildOptions buildOptions, Boolean stripDebugSymbols, String apiLevel) in /_/src/tasks/MobileBuildTasks/Android/AndroidProject.cs:line 50 at LibraryBuilderTask.BuildAndroidLibrary(List`1 sources, List`1 libs, List`1 linkerArgs) in /_/src/tasks/LibraryBuilder/LibraryBuilder.cs:line 376 at LibraryBuilderTask.Execute() in /_/src/tasks/LibraryBuilder/LibraryBuilder.cs:line 152 at Microsoft.Build.BackEnd.TaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
The test will be disabled on our CI for these platforms. We should investigate the failures and fix the builds eventually.
Note
The test has been introduced in: https://github.com/dotnet/runtime/pull/111545 and passes on x64 and arm64 architectures
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·