Skip to content
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

Missing Microsoft.DotNet.ILCompiler package on s390x #3076

Closed
uweigand opened this issue Oct 17, 2022 · 6 comments · Fixed by dotnet/sdk#28674
Closed

Missing Microsoft.DotNet.ILCompiler package on s390x #3076

uweigand opened this issue Oct 17, 2022 · 6 comments · Fixed by dotnet/sdk#28674
Labels
area-build Improvements in source-build's own build process

Comments

@uweigand
Copy link

When running an iterated source-build on s390x (i.e. using the output of the previous source-build as input set of package instead of the tarball), building the SDK fails due to a missing package Microsoft.DotNet.ILCompiler.

On Intel, this package is generated by the runtime repository, but on s390x this does not happen due to a check in eng/Subsets.props:

        <ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and '$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)\pkg\projects\nativeaot-packages.proj" Category="packs" />

Both the NativeAotSupported check and the RuntimeFlavor check fail on s390x.

Fixing this in the runtime build seems non-trivial since the actual artifacts to be packaged in that package are only created as part of the CoreCLR build, which doesn't happen on s390x.

Also, given that this package - while it itself seems to be platform-agnostic - simply adds support to the SDK to pull in various other packages needed for the NativeAOT build, and those are not available on s390x either, it seems this package shouldn't be really needed on s390x. We accept that the NativeAOT feature will not be available on the platform.

I thought this would be a simple matter of making the Microsoft.DotNet.ILCompiler line in src/Layout/redist/targets/BundledSdks.targets in the SDK repo conditional on the platform. But it turns out this isn't easily possible as the SDK repo build as part of the source-build process doesn't appear to even be aware which platform is being targeted. None of the Architecture, TargetRid or Platform properties (or any other property I could identify) are set to indicate a s390x target architecture.

We could disable the line for building with source-build generally, but I understand this is undesirable, as there is supposed to be NativeAOT support on Intel (even though the compiler packages aren't build with source-build, they would be pulled in from nuget at runtime if the SDK support is available).

@crummel any suggestions on how to best address this problem?

FYI - @tmds @omajid @janani66

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@tmds
Copy link
Member

tmds commented Oct 18, 2022

None of the Architecture, TargetRid or Platform properties (or any other property I could identify) are set to indicate a s390x target architecture.

I built .NET from source last week for x64 using mono runtime. I had to apply some simple patches here and there.
From that, I think it would be good if we have a single way of passing the build is with mono runtime to the repositories from source-build.

Suggestion for name: '$(UseMonoRuntime)' == 'true'.

For separate repo builds, the repositories can still set this to true, for example when the see the architecture is s390x.

@crummel @MichaelSimons how does that sound?

I can look into implementing this.

@janani66
Copy link

Same issue is being faced on the ppc64le source-build

@MichaelSimons
Copy link
Member

@MichaelSimons how does that sound?

I am in favor of that.

@MichaelSimons MichaelSimons added area-build Improvements in source-build's own build process and removed untriaged labels Oct 20, 2022
@MichaelSimons MichaelSimons moved this to Servicing On Deck in .NET Source Build Oct 20, 2022
@MichaelSimons MichaelSimons moved this from Servicing On Deck to Blocked in .NET Source Build Dec 12, 2022
@MichaelSimons MichaelSimons moved this from Blocked to Servicing On Deck in .NET Source Build Dec 12, 2022
@crummel
Copy link
Contributor

crummel commented Mar 8, 2023

@janani66 @tmds @uweigand Is there any remaining work here or can this be closed?

@crummel
Copy link
Contributor

crummel commented Mar 21, 2023

Closing as I believe this has been resolved, feel free to reopen if not.

@crummel crummel closed this as completed Mar 21, 2023
@github-project-automation github-project-automation bot moved this from Servicing On Deck to Done in .NET Source Build Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-build Improvements in source-build's own build process
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants