-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve experience when using PublishAot with unsupported RID #73678
Comments
Using net7.0-rc1 I'm unable to build for unsupported RIDs. With PublishAot=true (and with or without package reference) it says runtime is missing. With no PublishAot and package reference it doesn't compile native code at all. I've heard it works in .net 8 but that's not available using Azure Pipelines that only support main releases https://github.com/dotnet/core/blob/main/release-notes/releases-index.json |
This should be fixed in rc2 by dotnet/installer#14464 |
Ok thanks, would be nice to add all RIDs in docs https://docs.microsoft.com/en-us/dotnet/core/deploying/native-aot/ and https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/docs/compiling.md. Supported/unsupported wording is a bit confusing, I'd call RIDs that can be compiled but aren't supported 'experimental'. |
In rc2 osx-64x started working but osx-arm64 doesn't. Is it not possible to build in net7? @jkotas I've tried to reference dotnet8 nuget package but that seems impossible as PublishAot always removes it: Gets removed during compilation (and replaced with rc2 ilcompiler): Without PublishAot it doesn't compile native code. If that's not a bug - is it possible to use alpha net8 in Azure pipelines? |
@agocke @LakshanF Is this going to be fixed by dotnet/sdk#28495 ? |
There are a couple questions here, let me pull some of them apart.
For (1) the answer is: no, you cannot publish using NativeAOT in .NET 7. That's not a supported scenario. But, as referenced in (2), we will support OSX in .NET 8. To use .NET 8, you'll need to download a .NET 8 SDK. At the moment, we have not publicly shipped a .NET 8 preview. When we do, that will be the recommended path. If you want to live on the bleeding edge, you can download nightlies from https://github.com/dotnet/installer#table. For (3), how do the Microsoft.NET.ILCompiler packages relate? The intent is that they should provide a similar experience to the SDK, but give you more fine-grained version control, in case there's a specific bug. The packages aren't meant to be a supported experience and aren't meant to substitute for the SDK. In particular, using packages mismatched with the target framework they were built for would not be supported. So, using .NET 8 packages with the .NET 7 SDK to target net7.0 would not be supported. At the moment it appears that the packages have some strange behavior when interacting with the SDK. I'm not sure of all the issues there, but we'll have to work through them. Lastly, the change in dotnet/sdk#28495 is intended to improve the experience when building and not actually publishing with AOT. It wouldn't help with using AOT on unsupported platforms. |
As I said I can publish osx-64x but not osx-arm64. This comment also says something else: #75264 (comment)
Anyway I've tried dotnet8 sdk and got error:
Command:
Using Azure Pipelines Microsoft hosted agent, the newest mac12 that's x64. Is it possible to cross-compile arm64 (x64 works fine)? |
Oh wow, removed
Error is gone and building arm64 works fine with NET 8. https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/docs/compiling.md should be updated. |
Any news about win-x86? |
We would accept community contributions towards enabling it, but we don't have current x86 plans for NativeAOT. #86573 has more discussion about it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Can we also add runtime/eng/targetingpacks.targets Line 61 in b4c1a09
That would make consuming NativeAOT-LLVM package slightly more natural. For context: dotnet/runtimelab#2203 |
Can we close this now? With the fix from dotnet/sdk#32943, any unsupported RIDs (those not listed in https://github.com/dotnet/installer/blob/c10115c483a4f61f021fc4cde7b66e4919f9785e/src/redist/targets/GenerateBundledVersions.targets#L295-L301) produce errors like the following:
|
Yes, I think we can close. |
#61231 (comment)
E.g. win-x86, win-arm, linux-arm, osx-x64, all work with .NET, but we current don't support them in NativeAOT. We should make it more obvious that that's the problem.
Also, we should add linux-musl-arm64 to the list of supported RIDs.
Cc @LakshanF
The text was updated successfully, but these errors were encountered: