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

Make Source-Build Portable Build Compatible #4418

Open
ellahathaway opened this issue May 22, 2024 · 4 comments
Open

Make Source-Build Portable Build Compatible #4418

ellahathaway opened this issue May 22, 2024 · 4 comments
Labels
area-upstream-fix Needs a change in a contributing repo

Comments

@ellahathaway
Copy link
Member

Based on dotnet/sdk#40843, it's clear that while the VMR is configured to be portable, source build does not work in a portable state due to bugs.

For example, while certain OSs build successfully with PortableBuild=true (centos9 for example), the produced SDK does not work. An example is the following run of the scenario tests with a source-build SDK that was built using the PortableBuild=true property:

System.InvalidOperationException : Failed to execute /vmr/artifacts/obj/extracted-dotnet-sdk/dotnet new console --name SdkTemplateTestsComplex_Console_CSharp --output /vmr/artifacts/scenario-tests/artifacts/SdkTemplateTestsComplex_Console_CSharp --language "C#"
    Exit code: 145
    9.0.100-preview.5.24266.1 [/vmr/artifacts/obj/extracted-dotnet-sdk/sdk]
    The command could not be loaded, possibly because:
      * You intended to execute a .NET application:
          The application 'new' does not exist.
      * You intended to execute a .NET SDK command:
          A compatible .NET SDK was not found.

Another example of source-build being portable build incompatible is the fact that aspnetcore fails to build on alpine:

/vmr/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj : error NU1100: Unable to resolve 'Microsoft.NETCore.App.Crossgen2.linux-x64 (>= 9.0.0-preview.5.24262.2)' for 'net9.0'. PackageSourceMapping is enabled, the following source(s) were not considered: prebuilt, previously-source-built, reference-packages, source-built-command-line-api, source-built-emsdk, source-built-msbuild, source-built-nuget-client, source-built-roslyn, source-built-roslyn-analyzers, source-built-runtime, source-built-source-build-externals, source-built-symreader, source-built-transport-arcade, source-built-transport-cecil, source-built-transport-emsdk, source-built-transport-msbuild, source-built-transport-roslyn, source-built-transport-runtime, source-built-transport-xdt. [/vmr/.dotnet/sdk/9.0.100-preview.5.24257.1/NuGet.targets]

In the above error message, aspnetcore fails to build because it is looking for the linux-x64 version of crossgen. Earlier, this package was built and outputted as Microsoft.NETCore.App.Crossgen2.linux-musl-x64. See dotnet/sdk#40843 (comment)

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.

@MichaelSimons
Copy link
Member

Is this a duplicate of #2932?

@ellahathaway
Copy link
Member Author

Is this a duplicate of #2932?

It's similar/has the same end goal. I think the difference is that as of the creation of the current issue, we have the ability to "technically" build source-build with a portable RID/portable build property set, but the build itself is not actually portable due to bugs. Not sure if that was possible when Rich created the other issue?

@MichaelSimons MichaelSimons added area-upstream-fix Needs a change in a contributing repo and removed untriaged labels May 23, 2024
@omajid
Copy link
Member

omajid commented May 23, 2024

See dotnet/installer#15163 (comment) for a fix that Nix folks used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-upstream-fix Needs a change in a contributing repo
Projects
Status: 10.0
Development

No branches or pull requests

3 participants