dotnet / source-build

A repository to track efforts to produce a source tarball of the .NET Core SDK and all its components
MIT License
265 stars 132 forks source link

vmr main fails to build with --use-mono-runtime #3433

Closed tmds closed 1 year ago

tmds commented 1 year ago

The build fails with:

/home/tester/dotnet/src/installer/artifacts/source-build/self/src/src/redist/targets/GenerateLayout.targets(562,5): error MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "/home/tester/dotnet/src/installer/artifacts/source-build/self/src/artifacts/bin/redist/Release/dotnet/shared/Microsoft.NETCore.App/8.0.0-preview.5.23252.13/System.Private.CoreLib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. [/home/tester/dotnet/src/installer/artifacts/source-build/self/src/src/redist/redist.csproj] /home/tester/dotnet/src/installer/artifacts/source-build/self/src/src/redist/targets/GenerateLayout.targets(562,5): error MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "/home/tester/dotnet/src/installer/artifacts/source-build/self/src/artifacts/bin/redist/Release/dotnet/shared/Microsoft.NETCore.App/8.0.0-preview.5.23252.13/System.Private.CoreLib.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. [/home/tester/dotnet/src/installer/artifacts/source-build/self/src/src/redist/redist.csproj]

cc @MichaelSimons @omajid

dotnet-issue-labeler[bot] commented 1 year ago

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 commented 1 year ago

@uweigand have you seen this issue?

The error message comes up in this PR: https://github.com/dotnet/installer/pull/15693. @rainersigwald @lewing any insights? suggestions how to fix this?

uweigand commented 1 year ago

@tmds no I haven't seen this. But I also haven't really tried to build an Intel Mono runtime ... (I don't think this error could apply on Z, because our reference runtime libraries also are platform-independent - we don't even have any DLL binary marker for Z.)

tmds commented 1 year ago

We build the Intel Mono runtime in our CI, but not daily. It seems to have regressed in the past two weeks.

rainersigwald commented 1 year ago

Does the VMR have the equivalent of https://github.com/dotnet/installer/pull/15693/commits/920639343ee88cd05b5e63b211163e274a0a6072? I don't know how to check yet :)

premun commented 1 year ago

@rainersigwald the list of commits the VMR has is in this file - https://github.com/dotnet/dotnet/blob/e0652457616209be3c45841d078021d6263a9d30/src/source-manifest.json#L61

rainersigwald commented 1 year ago

Hmm, that suggests it should have the property. Is there a way to get a binlog of the failure? My next question is "is it passed where we expect it to be?"

MichaelSimons commented 1 year ago

@tmds - do you have a binlog you could share? If not, consider updating https://github.com/dotnet/installer/pull/16357 to include the new leg in PR validation temporarily until we get the leg passing. We can then grab the binlog from there.

tmds commented 1 year ago

Which of these do you need?

./src/arcade/artifacts/buildLogs/log/Release/ToolsetRestore.binlog
./src/arcade/artifacts/buildLogs/log/Release/Build.binlog
./src/arcade/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/aspnetcore/artifacts/buildLogs/log/Release/Build.binlog
./src/aspnetcore/artifacts/buildLogs/source-build/self/src/artifacts/log/Debug/Build.repotasks.binlog
./src/aspnetcore/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/cecil/artifacts/buildLogs/log/Release/Build.binlog
./src/cecil/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/command-line-api/artifacts/buildLogs/log/Release/Build.binlog
./src/command-line-api/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/deployment-tools/artifacts/buildLogs/log/Release/Build.binlog
./src/deployment-tools/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/diagnostics/artifacts/buildLogs/log/Release/Build.binlog
./src/diagnostics/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/emsdk/artifacts/buildLogs/log/Release/Build.binlog
./src/emsdk/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/format/artifacts/buildLogs/log/Release/Build.binlog
./src/format/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/fsharp/artifacts/buildLogs/log/Release/Build.binlog
./src/fsharp/artifacts/buildLogs/source-build/self/src/artifacts/log/Debug/Build.binlog+.lex.binlog
./src/fsharp/artifacts/buildLogs/source-build/self/src/artifacts/log/Debug/Build.binlog+.bootstrap.binlog
./src/fsharp/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/installer/artifacts/log/Release/Build.binlog
./src/installer/artifacts/source-build/self/src/artifacts/sourcebuild.binlog
./src/msbuild/artifacts/buildLogs/log/Release/Build.binlog
./src/msbuild/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/nuget-client/artifacts/buildLogs/source-build/self/log/source-build.binlog
./src/razor/artifacts/buildLogs/log/Release/Build.binlog
./src/razor/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/roslyn-analyzers/artifacts/buildLogs/log/Release/Build.binlog
./src/roslyn-analyzers/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/roslyn/artifacts/buildLogs/log/Release/Build.binlog
./src/roslyn/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/runtime/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/runtime/artifacts/buildLogs/log/Release/Build.binlog
./src/sdk/artifacts/buildLogs/log/Release/Build.binlog
./src/sdk/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/application-insights/build.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/application-insights/pack.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/application-insights/restore.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/azure-activedirectory-identitymodel-extensions-for-dotnet/build.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/azure-activedirectory-identitymodel-extensions-for-dotnet/pack_Abstractions.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/azure-activedirectory-identitymodel-extensions-for-dotnet/pack_Logging.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/azure-activedirectory-identitymodel-extensions-for-dotnet/pack_JsonWebTokens.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/azure-activedirectory-identitymodel-extensions-for-dotnet/pack_TokensJwt.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/azure-activedirectory-identitymodel-extensions-for-dotnet/pack_Tokens.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/azure-activedirectory-identitymodel-extensions-for-dotnet/restore.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/cssparser/pack.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/cssparser/restore.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/cssparser/build.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/docker-creds-provider/restore.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/docker-creds-provider/pack.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/docker-creds-provider/build.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/humanizer/restore.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/humanizer/pack.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/humanizer/build.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/MSBuildLocator/build.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/MSBuildLocator/pack.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/MSBuildLocator/restore.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/netcorecli-fsc/msbuild.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/newtonsoft-json/restore.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/newtonsoft-json/build.binlog
./src/source-build-externals/artifacts/buildLogs/source-build/self/src/src/newtonsoft-json/pack.binlog
./src/source-build-externals/artifacts/buildLogs/log/Release/Build.binlog
./src/source-build-reference-packages/artifacts/buildLogs/log/Release/ToolsetRestore.binlog
./src/source-build-reference-packages/artifacts/buildLogs/log/Release/Build.binlog
./src/source-build-reference-packages/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/source-build-reference-packages/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild-dependency-projects.binlog
./src/sourcelink/artifacts/buildLogs/log/Release/Build.binlog
./src/sourcelink/artifacts/buildLogs/log/Release/ToolsetRestore.binlog
./src/sourcelink/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/symreader/artifacts/buildLogs/log/Release/Build.binlog
./src/symreader/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/templating/artifacts/buildLogs/log/Release/Build.binlog
./src/templating/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/test-templates/artifacts/buildLogs/log/Release/Build.binlog
./src/test-templates/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/vstest/artifacts/buildLogs/log/Release/Build.binlog
./src/vstest/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/xdt/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./src/xdt/artifacts/buildLogs/log/Release/Build.binlog
./src/xliff-tasks/artifacts/buildLogs/log/Release/Build.binlog
./src/xliff-tasks/artifacts/buildLogs/source-build/self/src/artifacts/sourcebuild.binlog
./artifacts/log/Debug/BuildXPlatTasks_0510190739.binlog
./artifacts/log/Debug/Build_0510190739.binlog
./artifacts/prep/bootstrap.binlog
lewing commented 1 year ago

cc @akoeplinger @directhex

tmds commented 1 year ago

@tmds - do you have a binlog you could share? If not, consider updating https://github.com/dotnet/installer/pull/16357 to include the new leg in PR validation temporarily until we get the leg passing. We can then grab the binlog from there.

I've updated the PR. Here is the Mono leg: https://github.com/dotnet/installer/pull/16357/checks?check_run_id=13382212571.

rainersigwald commented 1 year ago
nagilson commented 1 year ago

@rainersigwald's suggestion to follow https://github.com/dotnet/installer/commit/920639343ee88cd05b5e63b211163e274a0a6072 and add ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch to your projects seems valid to me 🤷

tmds commented 1 year ago

My next question is "is it passed where we expect it to be?

It wasn't. Fixed by: https://github.com/dotnet/installer/pull/16368.

With that change, the mono build passes.