From 9d13c06ffde1acec5b1a44631ee38f800eea9442 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Sun, 30 Aug 2026 02:21:56 +0800 Subject: [PATCH] 0.5.0 --- repin the C library, whose backends fixed a bounded transfer openkal-musl 0.9.0 answers `truncate(2)`, repins openkal-linux 0.7.1 and openkal-macos 0.6.1, and makes a build able to state which version of the C library it holds. WHAT A PROGRAM ABOVE THIS PACKAGE GETS. Two things that did not work now do, and neither is a C++ problem --- both are `std::filesystem` reaching a system call. `std::filesystem::copy_file` reported `Resource temporarily unavailable` for two ordinary files. libc++ opens a copy's source with `O_RDONLY | O_NONBLOCK | O_BINARY`, which on a kernel is meaningless for a regular file and is ignored; openkal-musl routes an `O_NONBLOCK` descriptor through the bounded-transfer path and expresses `copy_file_range` as a read/write loop, so every byte of a file copy went through it --- and the backends' `kal_timeout_read` decoded a borrowed `kal_stream` handle with the decoder for an OWNED one, waiting upon the descriptor below the one it then transferred upon. `EAGAIN` is not in libc++'s fallback list, so it fell back neither to `sendfile` nor to a stream copy and the error reached the caller verbatim. `std::filesystem::resize_file` worked for no path at all, because libc++ expresses it as the name-shaped `truncate` and only the descriptor-shaped one was answered. Both reported in mcpplibs/openkal-linux#13. AND A CONSUMER CAN NOW SAY WHAT IT BUILT. `OPENKAL_MUSL_TRACE=enosys` names the C library's version before the program runs, whether or not anything is missing, and `uname`'s release field carries it too. Two rounds of that issue were answered against the wrong version because neither existed. Also here: the two fetches of the installer retry transport failures. `--retry` covers a transient HTTP status and a timeout and does not cover `curl: (35) Recv failure: Connection reset by peer`, which is what a row of a sibling repository's matrix met today, thirteen seconds in, with nothing wrong in it. --- .github/workflows/ci.yml | 16 ++++++++++++++-- README.md | 2 +- mcpp.toml | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4507069..37d5271b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,13 @@ jobs: - name: Install xlings and mcpp run: | - curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \ + # --retry-all-errors and not --retry alone: the first covers a + # transient HTTP status and a timeout, and what this step meets is a + # failure of the transport. Observed in this ecosystem as + # `curl: (35) Recv failure: Connection reset by peer', thirteen + # seconds into a job, before anything was built. + curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 \ + https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \ | bash -s "$XLINGS_VERSION" echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" @@ -464,7 +470,13 @@ jobs: - name: Install xlings (Unix) if: runner.os != 'Windows' run: | - curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \ + # --retry-all-errors and not --retry alone: the first covers a + # transient HTTP status and a timeout, and what this step meets is a + # failure of the transport. Observed in this ecosystem as + # `curl: (35) Recv failure: Connection reset by peer', thirteen + # seconds into a job, before anything was built. + curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 \ + https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \ | bash -s "$XLINGS_VERSION" echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" diff --git a/README.md b/README.md index 2e159ef7..078a1c19 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ C library. ```toml [dependencies] -openkal-llvm-runtime = "0.4.0" +openkal-llvm-runtime = "0.5.0" ``` A C++ standard library is not portable in the way a program is. It is diff --git a/mcpp.toml b/mcpp.toml index fb552c9e..b809ec10 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,7 +1,7 @@ [package] namespace = "mcpplibs" name = "openkal-llvm-runtime" -version = "0.4.0" +version = "0.5.0" description = "LLVM's C++ runtime libraries — libc++, libc++abi and libunwind — configured for openkal-musl rather than for a host C library." license = "Apache-2.0" authors = ["mcpplibs"] @@ -208,7 +208,7 @@ sources = [ cflags = ["-DDISABLE_AARCH64_FMV=1"] [dependencies] -openkal-musl = "0.7.0" +openkal-musl = "0.9.0" [build] cxx_standard = "c++23"