-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Publishing for linux-bionix-x64 using NativeAOT fails #95223
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDescriptionPublishing a .net class library with the linux-bionic-x64 rid using NativeAOT fails with a clang error. Publishing with linux-bionic-arm64 works fine. The following is the command output with both targets;
A reproduction can be found here, https://github.com/emmauss/natTest . Reproduction Steps
Expected behaviorPublishing with linux-bionic-x64 should succeed like linux-bionic-arm64 does. Actual behaviorclang fails with this error;
Regression?No response Known WorkaroundsNo response ConfigurationOS: Windows 11 x86-64 Other informationNo response
|
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsDescriptionPublishing a .net class library with the linux-bionic-x64 rid using NativeAOT fails with a clang error. Publishing with linux-bionic-arm64 works fine. The following is the command output with both targets;
A reproduction can be found here, https://github.com/emmauss/natTest . Reproduction Steps
Expected behaviorPublishing with linux-bionic-x64 should succeed like linux-bionic-arm64 does. Actual behaviorclang fails with this error;
Regression?No response Known WorkaroundsNo response ConfigurationOS: Windows 11 x86-64 Other informationNo response
|
I think Possible fix for upstream #95312 |
It will only get you one step further to hit #93942. |
Fixes dotnet#93942. Works around dotnet#95223 (a better but more risky fix is in dotnet#95312, so I'm not going to resolve that with this PR). The first issue is that we don't consider x64 Windows (or x64 Linux) to x64 Bionic build a crossbuild. The crossbuild detection only looks at architecture, not at the OS. The fix is very conservative so that we can backport to 8.0. Bionic is always a crossbuild. The second part is a port of dotnet/corert#8323 to x64. It is a lot less work than on arm64 because x64 Linux already has to assume `INLINE_GETTHREAD` could be a call so everything is setup for it. I tested this all on a x64 Bionic hello world. I also ran all of smoke tests on x64 Linux with `FEATURE_EMULATED_TLS` enabled. All of this looks very non-risky so I'm going to ask for a backport.
Fixes #93942. Works around #95223 (a better but more risky fix is in #95312, so I'm not going to resolve that with this PR). The first issue is that we don't consider x64 Windows (or x64 Linux) to x64 Bionic build a crossbuild. The crossbuild detection only looks at architecture, not at the OS. The fix is very conservative so that we can backport to 8.0. Bionic is always a crossbuild. The second part is a port of dotnet/corert#8323 to x64. It is a lot less work than on arm64 because x64 Linux already has to assume `INLINE_GETTHREAD` could be a call so everything is setup for it. I tested this all on a x64 Bionic hello world. I also ran all of smoke tests on x64 Linux with `FEATURE_EMULATED_TLS` enabled. All of this looks very non-risky so I'm going to ask for a backport.
Fixes #93942. Works around #95223 (a better but more risky fix is in #95312, so I'm not going to resolve that with this PR). The first issue is that we don't consider x64 Windows (or x64 Linux) to x64 Bionic build a crossbuild. The crossbuild detection only looks at architecture, not at the OS. The fix is very conservative so that we can backport to 8.0. Bionic is always a crossbuild. The second part is a port of dotnet/corert#8323 to x64. It is a lot less work than on arm64 because x64 Linux already has to assume `INLINE_GETTHREAD` could be a call so everything is setup for it. I tested this all on a x64 Bionic hello world. I also ran all of smoke tests on x64 Linux with `FEATURE_EMULATED_TLS` enabled. All of this looks very non-risky so I'm going to ask for a backport.
This is fixed (and the other bug too) in the latest .NET 9 builds. I'm trying to get this backported to 8.0. If #95382 merges, this should be available in the February .NET 8 servicing release. |
Description
Publishing a .net class library with the linux-bionic-x64 rid using NativeAOT fails with a clang error. Publishing with linux-bionic-arm64 works fine. The following is the command output with both targets;
A reproduction can be found here, https://github.com/emmauss/natTest .
Reproduction Steps
set path=C:\Android\android-sdk\ndk\25.1.8937393\toolchains\llvm\prebuilt\windows-x86_64\bin;%path%
dotnet publish . -r linux-bionic-x64 -p:DisableUnsupportedError=true -p:PublishAotUsingRuntimePack=true
Expected behavior
Publishing with linux-bionic-x64 should succeed like linux-bionic-arm64 does.
Actual behavior
clang fails with this error;
Regression?
No response
Known Workarounds
No response
Configuration
OS: Windows 11 x86-64
.Net Version: 8.0.0 Release
Other information
No response
The text was updated successfully, but these errors were encountered: