Closed matouskozak closed 5 months ago
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.
Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos See info in area-owners.md if you want to be subscribed.
Tagging subscribers to 'os-tvos': @steveisok, @akoeplinger See info in area-owners.md if you want to be subscribed.
Could it be caused by https://github.com/dotnet/runtime/pull/98712 @cshung @janvorli?
Yes, it is my problem.
For NativeAOT compile on x64 platform, we need to link one more library.
Who would be a good person to talk to about AppleAppBuilderTask
?
Unlike other smoke tests, seems like mono library-mode smoke tests are using aotsdk from package while the aot runtime build took place with live bits, hence the conflict. It should be using live build for both. @ivanpovazan any idea how to bring library-mode tests to the same plan as rest of the platforms (use live build of nativeaot)?
Unlike other smoke tests, seems like mono library-mode smoke tests are using aotsdk from package while the aot runtime build took place with live bits, hence the conflict. It should be using live build for both. @ivanpovazan any idea how to bring library-mode tests to the same plan as rest of the platforms (use live build of nativeaot)?
I think that all NativeAOT runtime tests (tests under: https://github.com/dotnet/runtime/tree/main/src/tests) are using aotsdk
based on:
https://github.com/dotnet/runtime/blob/ffb257818db89672d84d538964cec1b54fb2a094/src/tests/Directory.Build.targets#L563-L563
so I don't think that is the problem.
The problem seems to be specific to inclusion of libRuntime.Vxsort*.a
libraries and looking at the binlogs from the failed test build, it seems that when building runtime tests for iossimulator (most probably all ios platforms) _targetArchitecture
is not being set, which in turn prevents the required library to be included in NativeLibrary
item group and further passed to the native linker when bundling iOS app bundle.
@matouskozak @kotlarmilos do you remember why we had to explicitly set these properties here:
https://github.com/dotnet/runtime/blob/e61064949214b9eebdbf9faad58b71afd240ff15/src/tests/Directory.Build.props#L213-L216
I would assume we were hitting similar problems for _targetOS
, as we are now having with _targetArchitecture
not being resolved at the adequate time during build.
@matouskozak @kotlarmilos do you remember why we had to explicitly set these properties here:
They are used in https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets.
Yes, but _targetOS
(and _targetArchitecture
) should be resolved in https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets
so I was asking if you remember why did we have to set it manually
Can you check from the binlog if the condition in Microsoft.DotNet.ILCompiler.SingleEntry.targets is true?
<PropertyGroup Condition="'$(RuntimeIdentifier)' != '' and '$(NETCoreSdkPortableRuntimeIdentifier)' != ''">
I think that all NativeAOT runtime tests (tests under:
main
/src/tests) are usingaotsdk
based on:
Yes, that is resolved to the live build of runtime. I was suspecting that iOS platforms end up using BuildIntegration targets from the SDK (which is still at preview 1 per global.json), rather than the clr artifacts directory (live build) which causes the missing libvxsort in the logs and lead to the missing symbol during the link. With current situation, any time we will add a new dependency or remove one, it will run into the same error.
Thanks for looking into it everyone. 👍
Ideally, the test should use the target files in the repo, if we could do that, that would be the best.
@cshung the problem is most probably related to how we configure runtime tests for NativeAOT on iOS, and not with the build integration targets file.
@kotlarmilos NETCoreSdkPortableRuntimeIdentifier
is not set.
<_targetArchitecture>$(TargetArchitecture)</_targetArchitecture>
in the place I linked above.Microsoft.NET.Sdk.props
and with it Microsoft.NETCoreSdk.BundledVersions.props
which defines NETCoreSdkPortableRuntimeIdentifier
. This way we would avoid any similar future problems with changes introduced to NativeAOT build (or its dependencies).
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=629964 Build error leg or test failing:
Error Message
Fill the error message using step by step known issues guidance.
Error log:
Report
Summary
Known issue validation
Build: :mag_right: https://dev.azure.com/dnceng-public/public/_build/results?buildId=629964 Error message validated:
[/Users/runner/work/1/s/src/mono/msbuild/apple/build/AppleBuild.targets(296,5): error MSB4018: Undefined symbols for architecture x86_64: [/Users/runner/work/1/s/src/tests/build.proj]
] Result validation: :white_check_mark: Known issue matched with the provided build. Validation performed at: 4/4/2024 7:53:18 PM UTC