Skip to content

Conversation

@am11
Copy link
Member

@am11 am11 commented Dec 2, 2025

This matches the reality more accurately as zlib is built in-box and ICU is conditional for run-time.


Internal previews

📄 File 🔗 Preview link
docs/core/deploying/native-aot/index.md docs/core/deploying/native-aot/index

This matches the reality more accurately as zlib is built in-box and ICU is conditional for run-time.
@am11 am11 requested review from a team and adegeo as code owners December 2, 2025 19:14
@dotnetrepoman dotnetrepoman bot added this to the December 2025 milestone Dec 2, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-fundamentals/svc community-contribution Indicates PR is created by someone from the .NET community. labels Dec 2, 2025
@am11
Copy link
Member Author

am11 commented Dec 2, 2025

cc @jkotas, @MichalStrehovsky

sudo apk add clang build-base icu-dev
```

Run-time dependencies:
Copy link
Member

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:

Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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).

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants