-
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
Add RID values for s390x #52907
Add RID values for s390x #52907
Conversation
Is |
src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props
Outdated
Show resolved
Hide resolved
It is community-supported, same as e.g. Tizen. It is not Microsoft-supported. |
</RuntimeGroup> | ||
|
||
<RuntimeGroup Include="alpine"> | ||
<Parent>linux-musl</Parent> | ||
<Architectures>x64;arm;arm64</Architectures> | ||
<Architectures>x64;arm;arm64;s390x</Architectures> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there really alpine for s390x ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we've been supporting alpine for a few years now, see e.g.
https://wiki.alpinelinux.org/wiki/S390x
https://alpinelinux.org/downloads/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uweigand is there a need for anything other than "rhel"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't mind getting s390x support on Fedora too. I think it's better to keep it as general as possible.
@ericstj based on that, I think we can leave out the versioned rids from this PR (like |
Possibly, the one thing we get by adding them to the graph that we don't get by just building for those architectures is the ability for an SDK to build a self-contained application for that RID from another platform. For example: suppose I want to build a self-contained application for rhel.7-z390x from my Windows machine with the Microsoft-provided dotnet SDK. The only way that will work correctly is if the RID is added to the checked-in RID graph. |
@ericstj I think we may be even able to leave out "rhel", right? So we need to add I think we should give that a try, and maybe fix some issues we bump into along the way. |
So the initial reason I had to add RIDs was that otherwise the loader would sometimes fail to find the appropriate runtime version of dependent libraries. For example, some test cases have "unix" versions of some libraries, and while the loader would know the current RID is "linux-s390x" even if that is not in the graph, it would fail to understand that "linux-s390x" is a version of "linux" is a version of "unix". Adding "linux-s390x" to the RID graph fixes this. Now whether we absolutely need all the distro-specific RIDs, I'm not fully sure. I simply added all Linux distros that currently support s390x, for consistency with the other architectures. I don't fully understand the nuances what difference the distro-specific (or even version-specific) RIDs make, so I certainly appreciate guidance here. |
@uweigand the rid graph has required everything to be specified up front. This has bitten us a couple of times when we tried to build .NET on a distro that was not yet in the graph (like a new version of Fedora). To improve, @ericstj implemented #50818 to add rids as part of the build. I think it means we only need to add |
OK, I'll give that a try. Thanks! |
* Add Linux on the s390x architecture to runtimeGroups.props * Update generated files
Seems to work for me so far. Patch updated. |
Ah, good point! I'll need to rebuild the host SDK as well and retry. |
Give that a try without any changes (including this PR). If you have the fix for #50818 and build for |
This definitely is more easy on the eyes. I think we want this minimal version to work. We may hit some bumps, because this hasn't been used in practice yet. |
I've now confirmed the following:
If the latter is actually supposed to be working, I guess there's still a bug somewhere. Can you elaborate how this is supposed to work in detail? |
Can you elaborate on where you see those failures? Here's what I would expect to happen:
I suspect we're missing some connection along the way here. |
What I'm doing is more or less the following:
I am not (yet) using the If I do not have this patch applied, then I'm not seeing
What does |
@uweigand you can specify
@ericstj I think this means the PR works as expected, and it is probably good to merge? |
@ericstj is this good to merge? |
Apologies for the delay, I missed the earlier reply.
I think this means that the output RID is being set, after this I'd expect the s390x to show up in the
Given your process this makes sense. We only enable build time generation of the runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj Lines 20 to 21 in 7e65185
I think I determined another missing piece, which is that the shared-framework build is not consuming the generated runtime.json , which would cause tests to fail as was originally mentioned. I've opened #53550 for this and also mentioned the desire to support the non-source-build-new RID scenario.
Given the minimal impact, I'm OK merging it to unblock. I would really like us to be in the place where we don't need to do this for new distros / archs that aren't part of official build matrix. |
We didn't need to add the distros, which is already a huge improvement. 🎉 |
Thanks! |
Add all supported s390x Linux distributions to runtimeGroups.props
Update generated files and test cases