-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Revise NativeAOT deployment dependencies #50267
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
base: main
Are you sure you want to change the base?
Conversation
This matches the reality more accurately as zlib is built in-box and ICU is conditional for run-time.
| sudo apk add clang build-base icu-dev | ||
| ``` | ||
|
|
||
| Run-time dependencies: |
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 believe zlib-dev is needed for .NET 8. (.NET 8 is still supported.)
| ``` | ||
|
|
||
| Run-time dependencies: | ||
|
|
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.
The runtime dependencies should be same as the runtime dependencies for regular CoreCLR w/ JIT. Is there a doc that we can link to instead?
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 have found this doc https://learn.microsoft.com/dotnet/core/install/linux-alpine?tabs=dotnet10#dependencies. For AOT apps, we don't need libgcc and libstdc++ is optional; which gets installed with libicu (as it uses C++ runtime features like RTTI with dynamic_cast: https://unicode-org.atlassian.net/browse/ICU-22248).
| Publish dependencies: | ||
|
|
||
| ```sh | ||
| sudo apk add clang build-base icu-dev |
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.
Does publishing really need icu-dev? We should be loading ICU dynamically.
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.
It is used to run dotnet publish with fresh install (via dotnet install script) in container.
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 should only need ICU (the one without the -dev suffix) as a runtime dependency. We should not need icu-dev.
Or are you seeing that we need icu-dev somewhere? Where does the reference come from?
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.
You are right. We only need icu-libs on Alpine. I think the only reason we would need icu-dev is if we are using StaticICULinking https://github.com/dotnet/runtime/blob/088741956a4a9d15c4dcbbc81f8e7e25fc59c161/src/coreclr/nativeaot/docs/compiling.md#using-statically-linked-icu (which is an advanced scenario).
| sudo apk add clang build-base icu-dev | |
| sudo apk add clang build-base icu-libs |
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The `icu-libs` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. |
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.
| > The `icu-libs` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. | |
| > The `icu-libs` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](../../runtime-config/globalization.md), runtime `libicu` might not be needed. |
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The `libicu` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. |
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.
| > The `libicu` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. | |
| > The `icu-libs` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](../../runtime-config/globalization.md), runtime `libicu` might not be needed. |
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The `libicu-devel` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. |
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.
| > The `libicu-devel` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. | |
| > The `icu-libs` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](../../runtime-config/globalization.md), runtime `libicu` might not be needed. |
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > The `libicu` library is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. |
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.
| > The `libicu` library is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](https://learn.microsoft.com/dotnet/core/runtime-config/globalization), runtime `libicu` may not be needed. | |
| > The `icu-libs` package is only required at runtime if globalization is enabled. If you configure `InvariantGlobalization` or similar [globalization settings](../../runtime-config/globalization.md), runtime `libicu` might not be needed. |
This matches the reality more accurately as zlib is built in-box and ICU is conditional for run-time.
Internal previews