dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.85k stars 4.62k forks source link

[NativeAOT/ARM] undefined symbol: NYI_Assert #97748

Closed filipnavara closed 7 months ago

filipnavara commented 7 months ago

Observed when compiling library tests:

ld.lld : error : undefined symbol: NYI_Assert [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux]
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginRead)
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__EndRead)
  >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginWrite)
  >>> referenced 1 more times
clang-17 : error : linker command failed with exit code 1 (use -v to see invocation) [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux]
ghost commented 7 months ago

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.

Issue Details
Observed when compiling library tests: ``` ld.lld : error : undefined symbol: NYI_Assert [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux] >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginRead) >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__EndRead) >>> referenced by /home/navara/runtime/artifacts/obj/Common.Tests/Debug/net9.0-linux/native/Common.Tests.o:(__ResolveVirtualFunction_System.IO.Stream__BeginWrite) >>> referenced 1 more times clang-17 : error : linker command failed with exit code 1 (use -v to see invocation) [/home/navara/runtime/src/libraries/Common/tests/Common.Tests.csproj::TargetFramework=net9.0-linux] ```
Author: filipnavara
Assignees: -
Labels: `arch-arm32`, `area-NativeAOT-coreclr`
Milestone: -
filipnavara commented 7 months ago

This is likely the same issue as #97749

MichalStrehovsky commented 7 months ago

https://github.com/dotnet/runtime/blob/9429e432f39786e1bcd1c080833e5d7691946591/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/Target_ARM/ARMReadyToRunHelperNode.cs#L162-L188

filipnavara commented 7 months ago

Yep, thanks, I have implemented it already. PR coming as soon as I test it.