Skip to content

Commit 987032f

Browse files
authored
0.5.0 --- repin the C library, whose backends fixed a bounded transfer (#11)
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.
1 parent cd719e6 commit 987032f

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ jobs:
4646

4747
- name: Install xlings and mcpp
4848
run: |
49-
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
49+
# --retry-all-errors and not --retry alone: the first covers a
50+
# transient HTTP status and a timeout, and what this step meets is a
51+
# failure of the transport. Observed in this ecosystem as
52+
# `curl: (35) Recv failure: Connection reset by peer', thirteen
53+
# seconds into a job, before anything was built.
54+
curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 \
55+
https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
5056
| bash -s "$XLINGS_VERSION"
5157
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
5258
@@ -464,7 +470,13 @@ jobs:
464470
- name: Install xlings (Unix)
465471
if: runner.os != 'Windows'
466472
run: |
467-
curl -fsSL https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
473+
# --retry-all-errors and not --retry alone: the first covers a
474+
# transient HTTP status and a timeout, and what this step meets is a
475+
# failure of the transport. Observed in this ecosystem as
476+
# `curl: (35) Recv failure: Connection reset by peer', thirteen
477+
# seconds into a job, before anything was built.
478+
curl -fsSL --retry 3 --retry-all-errors --retry-delay 2 \
479+
https://raw.githubusercontent.com/openxlings/xlings/main/tools/other/quick_install.sh \
468480
| bash -s "$XLINGS_VERSION"
469481
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
470482

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ C library.
66

77
```toml
88
[dependencies]
9-
openkal-llvm-runtime = "0.4.0"
9+
openkal-llvm-runtime = "0.5.0"
1010
```
1111

1212
A C++ standard library is not portable in the way a program is. It is

mcpp.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
namespace = "mcpplibs"
33
name = "openkal-llvm-runtime"
4-
version = "0.4.0"
4+
version = "0.5.0"
55
description = "LLVM's C++ runtime libraries — libc++, libc++abi and libunwind — configured for openkal-musl rather than for a host C library."
66
license = "Apache-2.0"
77
authors = ["mcpplibs"]
@@ -208,7 +208,7 @@ sources = [
208208
cflags = ["-DDISABLE_AARCH64_FMV=1"]
209209

210210
[dependencies]
211-
openkal-musl = "0.7.0"
211+
openkal-musl = "0.9.0"
212212

213213
[build]
214214
cxx_standard = "c++23"

0 commit comments

Comments
 (0)