-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Cannot build runtime on s390x: The "ApiCompatTask" task failed unexpectedly. #68266
Comments
Tagging subscribers to this area: @dotnet/area-system-drawing Issue DetailsDescriptionFor some weeks it's no longer possible to build the master branch on s390x due to an ApiCompatTask failure. Reproduction StepsOn an s390x machine:
Expected behaviorThe build succeeds. Actual behaviorThe build fails with:
Regression?Yes. Started with 2575ce5. Known WorkaroundsCross-building from x86_64 still works. Configuration
Other informationNo response
|
CC @ViktorHofer |
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsDescriptionFor some weeks it's no longer possible to build the master branch on s390x due to an ApiCompatTask failure. Reproduction StepsOn an s390x machine:
Expected behaviorThe build succeeds. Actual behaviorThe build fails with:
Regression?Yes. Started with 2575ce5. Known WorkaroundsCross-building from x86_64 still works. Configuration
Other informationNo response
|
The dependency on Microsoft.Cci didn't change with 2575ce5 but ApiCompat previously ran out-of-proc and now runs in-proc as an msbuild task. Could that explain why this suddenly popped up? Any idea why this is only happening on s390x? As a workaround, you can specify |
This issue has been marked |
This looks like a bug in the Mono runtime that ApiCompat happened to hit. |
Tagging subscribers to this area: Issue DetailsDescriptionFor some weeks it's no longer possible to build the master branch on s390x due to an ApiCompatTask failure. Reproduction StepsOn an s390x machine:
Expected behaviorThe build succeeds. Actual behaviorThe build fails with:
Regression?Yes. Started with 2575ce5. Known WorkaroundsCross-building from x86_64 still works. Configuration
Other informationNo response
|
@jkotas just curious, how did you come to that conclusion? Did you repro the issue locally? |
I did not repro the issue locally. The key difference between Linux x64 hosted and Linux s390x build is that the Linux x64 hosted build is using CoreCLR and the Linux s390x build is using Mono. If something works fine in Linux x64 hosted and fails in Linux s390x hosted build, it is most likely a Mono bug. It may be worth it to try building on Linux x64 with CoreCLR overridden with Mono. It should fail as well if my theory is correct. |
The x86_64 build with |
…#68266) Running ApiCompat task under Mono fails with: Could not load type System.Collections.Generic.IEqualityComparer`1[[Microsoft.Cci.ITypeReference, Microsoft.Cci ... The reason is that cattr_type_from_name() uses a default ACL instead of the image's one. This is important, because ExportCciSettings.Settings field has the [Export(typeof(IEqualityComparer<ITypeReference>))] custom attribute [1], where ITypeReference comes from the Microsoft.Cci assembly. ApiCompat task runs under MSBuild, which provides its own MSBuildLoadContext ALC. Microsoft.Cci is supposed to be found using this ALC, not the default one. [1] https://github.com/dotnet/arcade/blob/8f311fed1f2acf0ecfdfcecbc7a9fa871ed634cc/src/Microsoft.DotNet.ApiCompat/src/Microsoft.DotNet.ApiCompat.Core/ExportCciSettings.cs#L28
After all, this is a Mono vs CoreCLR issue. |
#70346) * [custom_attrs] Use the image's ALC instead of the default one (#68266) Running ApiCompat task under Mono fails with: Could not load type System.Collections.Generic.IEqualityComparer`1[[Microsoft.Cci.ITypeReference, Microsoft.Cci ... The reason is that cattr_type_from_name() uses a default ACL instead of the image's one. This is important, because ExportCciSettings.Settings field has the [Export(typeof(IEqualityComparer<ITypeReference>))] custom attribute [1], where ITypeReference comes from the Microsoft.Cci assembly. ApiCompat task runs under MSBuild, which provides its own MSBuildLoadContext ALC. Microsoft.Cci is supposed to be found using this ALC, not the default one. [1] https://github.com/dotnet/arcade/blob/8f311fed1f2acf0ecfdfcecbc7a9fa871ed634cc/src/Microsoft.DotNet.ApiCompat/src/Microsoft.DotNet.ApiCompat.Core/ExportCciSettings.cs#L28 * [sre] Set the ALC for the dynamic image Don't leave it NULL Co-authored-by: Aleksey Kliger <[email protected]>
Fixed by #70346 |
Description
For some weeks it's no longer possible to build the master branch on s390x due to an ApiCompatTask failure.
It seems that this task depends on some DLLs (e.g.
Microsoft.Cci.dll
) that cannot be loaded on s390x.Reproduction Steps
On an s390x machine:
./build.sh
Expected behavior
The build succeeds.
Actual behavior
The build fails with:
Regression?
Yes. Started with 2575ce5.
Known Workarounds
Cross-building from x86_64 still works.
Configuration
Other information
No response
The text was updated successfully, but these errors were encountered: