From 1a135d4e4c76765b54411fca2fcade18366ba4b9 Mon Sep 17 00:00:00 2001 From: Christian Wirth Date: Wed, 26 Feb 2025 17:32:28 +0100 Subject: [PATCH] suggest to use the next-to-be-released musl version --- .../build-static-and-mostly-static-executable.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/reference-manual/native-image/guides/build-static-and-mostly-static-executable.md b/docs/reference-manual/native-image/guides/build-static-and-mostly-static-executable.md index 6ce65ac6d6cc..33efe460dec6 100644 --- a/docs/reference-manual/native-image/guides/build-static-and-mostly-static-executable.md +++ b/docs/reference-manual/native-image/guides/build-static-and-mostly-static-executable.md @@ -32,20 +32,21 @@ The easiest way to install GraalVM is with [SDKMAN!](https://sdkman.io/jdks#graa For other installation options, visit the [Downloads section](https://www.graalvm.org/downloads/). To create statically linked applications with Native Image, you require a `musl` toolchain with the `zlib` library. -For the best compatibility, use [musl-1.2.4](https://musl.libc.org/releases/musl-1.2.4.tar.gz) or later. -We recommend building `musl` from [source](https://musl.libc.org/) as shown below: +Use the latest or a recent version of musl (all versions prior and including `1.2.5` are affected by [CVE-2025-26519](https://www.openwall.com/lists/musl/2025/02/13/1)). +The steps to building `musl` from [source](https://musl.libc.org/) are as shown below. +The example assumes you are using [musl-1.2.6](https://musl.libc.org/releases/musl-1.2.6.tar.gz). ```bash # Specify an installation directory for musl: export MUSL_HOME=$PWD/musl-toolchain # Download musl and zlib sources: -curl -O https://musl.libc.org/releases/musl-1.2.4.tar.gz +curl -O https://musl.libc.org/releases/musl-1.2.6.tar.gz curl -O https://zlib.net/fossils/zlib-1.2.13.tar.gz # Build musl from source -tar -xzvf musl-1.2.4.tar.gz -pushd musl-1.2.4 +tar -xzvf musl-1.2.6.tar.gz +pushd musl-1.2.6 ./configure --prefix=$MUSL_HOME --static # The next operation may require privileged access to system resources, so use sudo sudo make && make install