-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Build integration support for Bionic in NativeAOT #87595
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
Conversation
Doesn't actually work E2E because the inline threadstatics work broke our Android support (the one added in dotnet/corert#8323). ``` C:\Users\michals\.nuget\packages\microsoft.netcore.app.runtime.nativeaot.linux-bionic-arm64\8.0.0-preview.6.23307.4/r untimes/linux-bionic-arm64/\native\libRuntime.WorkstationGC.a(MiscStubs.S.o): In function `RhpGetInlinedThreadStaticB ase': /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics' /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics' /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics' /__w/1/s/src/coreclr/nativeaot/Runtime/arm64/MiscStubs.S:12: undefined reference to `tls_InlinedThreadStatics' ```
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsDoesn't actually work E2E because the inline threadstatics work broke our Android support (the Android support code added in dotnet/corert#8323). The general instructions on Bionic once all of the PRs merge:
This is of course blocked on the TLS issue. The fix is probably along the lines of #77475 but because #87148 is in flight, I don't know what to do about it. I was hoping this would be previewable in .NET 8 Preview 6. Cc @dotnet/ilc-contrib
|
| <Exec Command="command -v "$(CppLinker)"" IgnoreExitCode="true" StandardOutputImportance="Low"> | ||
| <PropertyGroup> | ||
| <_CommandProbe>command -v</_CommandProbe> | ||
| <_CommandProbe Condition="$([MSBuild]::IsOSPlatform('Windows'))">where</_CommandProbe> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not used on Windows, right? (i.e. we don't support cross-OS publishing in cross build mode)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the above dotnet publish -r linux-bionic-arm64 /p:DisableUnsupportedError=true /p:PublishAotUsingRuntimePack=true with this on Windows. Worked fine with this change.
| <NetCoreAppNativeLibrary Include="System.Globalization.Native" Condition="'$(StaticICULinking)' != 'true' and '$(InvariantGlobalization)' != 'true'" /> | ||
| <NetCoreAppNativeLibrary Include="System.IO.Compression.Native" /> | ||
| <NetCoreAppNativeLibrary Include="System.Net.Security.Native" /> | ||
| <NetCoreAppNativeLibrary Include="System.Net.Security.Native" Condition="'$(_linuxLibcFlavor)' != 'bionic'" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am reading the correctly, uses of System.Net.Security.Native are not ifdefed out for linux-bionic in
| <UseManagedNtlm Condition="'$(TargetPlatformIdentifier)' == 'android' or '$(TargetPlatformIdentifier)' == 'tvos'">true</UseManagedNtlm> |
Do we need a matching fix in the libraries too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. Looking at the latest Bionic Mono build, we're not building this library there either so this can't be a NativeAOT specific problem, if it is a problem:
2023-06-16T01:47:31.0970341Z Install the project...
2023-06-16T01:47:31.1000197Z -- Install configuration: "RELEASE"
2023-06-16T01:47:31.1000861Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.IO.Compression.Native.so.dbg
2023-06-16T01:47:31.1019420Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.IO.Compression.Native.so
2023-06-16T01:47:31.1028723Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.IO.Compression.Native.a
2023-06-16T01:47:31.1064467Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Native.so.dbg
2023-06-16T01:47:31.1070650Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Native.so
2023-06-16T01:47:31.1074222Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Native.a
2023-06-16T01:47:31.1085002Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Globalization.Native.so.dbg
2023-06-16T01:47:31.1089764Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Globalization.Native.so
2023-06-16T01:47:31.1092925Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Globalization.Native.a
2023-06-16T01:47:31.1101678Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Security.Cryptography.Native.OpenSsl.so.dbg
2023-06-16T01:47:31.1107872Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Security.Cryptography.Native.OpenSsl.so
2023-06-16T01:47:31.1114082Z -- Installing: /__w/1/s/artifacts/bin/native/net8.0-linux-Release-arm64/./libSystem.Security.Cryptography.Native.OpenSsl.a
2023-06-16T01:47:31.1130823Z /__w/1/s/src/native/libs
I currently can't even test this enough to run a hello world so I'm not able to answer this question. It won't be much worse than Mono-Bionic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to open an issue on it since it looks like a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #87665. It looks like System.Net.Security tests are disabled on Bionic due to "Timeout on Helix, cannot repro locally".
You can also disable TLS inlining for Bionic in the ILC. |
Contributes to #87340.
Doesn't actually work E2E because the inline threadstatics work broke our Android support (the Android support code added in dotnet/corert#8323).
The general instructions on Bionic once all of the PRs merge:
dotnet publish -r linux-bionic-arm64 /p:DisableUnsupportedError=true /p:PublishAotUsingRuntimePack=trueThis is of course blocked on the TLS issue. The fix is probably along the lines of #77475 but because #87148 is in flight, I don't know what to do about it. I was hoping this would be previewable in .NET 8 Preview 6.
Cc @dotnet/ilc-contrib