-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -25,37 +25,82 @@ The Native AOT deployment model uses an ahead-of-time compiler to compile IL to | |||||
| - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. | ||||||
| - Alpine (3.15+) | ||||||
|
|
||||||
| Publish dependencies: | ||||||
|
|
||||||
| ```sh | ||||||
| sudo apk add clang build-base icu-dev | ||||||
| ``` | ||||||
|
|
||||||
| Run-time dependencies: | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.) |
||||||
|
|
||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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). |
||||||
| ```sh | ||||||
| sudo apk add clang build-base zlib-dev | ||||||
| sudo apk add 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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # [Fedora](#tab/linux-fedora) | ||||||
|
|
||||||
| - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. | ||||||
| - Fedora (39+) | ||||||
|
|
||||||
| Publish dependencies: | ||||||
|
|
||||||
| ```sh | ||||||
| sudo dnf install clang libicu-devel | ||||||
| ``` | ||||||
|
|
||||||
| Run-time dependencies: | ||||||
|
|
||||||
| ```sh | ||||||
| sudo dnf install clang zlib-devel zlib-ng-devel zlib-ng-compat-devel | ||||||
| sudo dnf install libicu | ||||||
| ``` | ||||||
|
|
||||||
| > [!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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # [RHEL](#tab/linux-rhel) | ||||||
|
|
||||||
| - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. | ||||||
| - RHEL (8+) | ||||||
|
|
||||||
| Publish dependencies: | ||||||
|
|
||||||
| ```sh | ||||||
| sudo dnf install clang libicu-devel | ||||||
| ``` | ||||||
|
|
||||||
| Run-time dependencies: | ||||||
|
|
||||||
| ```sh | ||||||
| sudo dnf install clang zlib-devel zlib-ng-devel zlib-ng-compat-devel | ||||||
| sudo dnf install libicu | ||||||
| ``` | ||||||
|
|
||||||
| > [!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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # [Ubuntu](#tab/linux-ubuntu) | ||||||
|
|
||||||
| - The compiler toolchain and developer packages for libraries that the .NET runtime depends on. | ||||||
| - Ubuntu (18.04+) | ||||||
|
|
||||||
| Publish dependencies: | ||||||
|
|
||||||
| ```sh | ||||||
| sudo apt-get install clang libicu-dev | ||||||
| ``` | ||||||
|
|
||||||
| Run-time dependencies: | ||||||
|
|
||||||
| ```sh | ||||||
| sudo apt-get install clang zlib1g-dev | ||||||
| sudo apt-get install libicuX | ||||||
| # replace X with the available version, e.g. libicu76 | ||||||
| ``` | ||||||
|
|
||||||
| > [!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. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| # [macOS](#tab/macOS) | ||||||
|
|
||||||
| The latest [Command Line Tools for XCode](https://developer.apple.com/download/). Supported on .NET 8 and later versions. | ||||||
|
|
||||||
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 publishwith 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-devsomewhere? 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-libson Alpine. I think the only reason we would need icu-dev is if we are usingStaticICULinkinghttps://github.com/dotnet/runtime/blob/088741956a4a9d15c4dcbbc81f8e7e25fc59c161/src/coreclr/nativeaot/docs/compiling.md#using-statically-linked-icu (which is an advanced scenario).