-
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
Unable to compile mono arm64 with clang12 #84503
Comments
Tagging subscribers to this area: @hoyosjs Issue DetailsSee build failure in https://dev.azure.com/dnceng-public/public/_build/results?buildId=231491&view=logs&jobId=fc4a8644-4c6a-5833-fe7a-25aca425d858&j=14eb0ddd-87f8-595e-102b-e1af7724045a&t=726d924a-e961-5f2c-8a5f-9886acc5d601, which uses CBL-mariner build images that have clang 12.0.1.
Looks like it may be the same as https://bugs.llvm.org/show_bug.cgi?id=50611, which suggests that it could be bad code produced by an old gcc used to compile LLVM. If this is the same issue, we may be able to fix it by building LLVM on the mariner images with a newer gcc, or using clang. This may also go away when we upgrade to LLVM 16 (dotnet/dotnet-buildtools-prereqs-docker#840), but if the issue is bad codegen in old versions of gcc, we should probably change how we build LLVM anyway. I intend to keep the failing leg (mono arm64 product build) on the old build images as part of #84148, and I'll use this issue to track moving that build leg to the mariner images.
|
I wasn't able to reproduce the issue with llvm 16, or with llvm 12.0.1 compiled using clang 12.0.1 (instead of gcc 11.2.0 that was used when I hit the issue). |
This changes the linux builds to use the new CBL-mariner build images. All of these builds are now cross-builds with a rootfs (including x64, and x64 musl). - The new images intentionally don't have binutils, so our build jobs have been updated to use llvm-based tools. This includes lld when we run nativeaot over our tests. This leads to a slight size regression, I believe due to ILCompiler not supporting `--gc-sections` with lld. - This change turns off PGO optimization because it was hitting a compiler crash when consuming and old version of profile data produced by clang9 instrumented builds (https://bugzilla.redhat.com/show_bug.cgi?id=1827282). The intention is to quickly flow the change into our optimization repo, then collect and ingest the new data so we can turn optimization back on. - The Mono LLVMAot test build is kept on the old build images, because they run the aot compiler which depends on binutils. We can probably move it to the same plan as the other legs, but I'm not familiar with the context here. cc @akoeplinger. We would at least need to fix `AS_NAME` here: https://github.com/dotnet/runtime/blob/1d2cd206f40306cbf06f3e2676e7cfa301077285/src/mono/mono/mini/aot-compiler.c#L13030 - Mono arm64 product build is kept on the old images due to #84503. - Includes a temporary revert of d80a584 which requires LLVM 13. - Sets arch for mono build, because our source-built LLVM doesn't target armv7a by default. Possibly related to https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/commit/b7363248b115339c4fb838fcd3ae43671eedae0a - Allow text relocations. The lld defaults differ from ld, which will add text relocations on demand by default. See https://maskray.me/blog/2020-12-19-lld-and-gnu-linker-incompatibilities --------- Co-authored-by: Jan Vorlicek <[email protected]> Co-authored-by: Adeel Mujahid <[email protected]> Co-authored-by: Jeremy Koritzinsky <[email protected]> Co-authored-by: Alexander Köplinger <[email protected]>
Fixed in #84851. |
See build failure in https://dev.azure.com/dnceng-public/public/_build/results?buildId=231491&view=logs&jobId=fc4a8644-4c6a-5833-fe7a-25aca425d858&j=14eb0ddd-87f8-595e-102b-e1af7724045a&t=726d924a-e961-5f2c-8a5f-9886acc5d601, which uses CBL-mariner build images that have clang 12.0.1.
Looks like it may be the same as https://bugs.llvm.org/show_bug.cgi?id=50611, which suggests that it could be bad code produced by an old gcc used to compile LLVM. If this is the same issue, we may be able to fix it by building LLVM on the mariner images with a newer gcc, or using clang. This may also go away when we upgrade to LLVM 16 (dotnet/dotnet-buildtools-prereqs-docker#840), but if the issue is bad codegen in old versions of gcc, we should probably change how we build LLVM anyway.
I intend to keep the failing leg (mono arm64 product build) on the old build images as part of #84148, and I'll use this issue to track moving that build leg to the mariner images.
The text was updated successfully, but these errors were encountered: