From 23ee20f9be23e0a44534df81c7a856173e1f617b Mon Sep 17 00:00:00 2001 From: Mikkeli Date: Sat, 5 Sep 2026 15:19:35 +0900 Subject: [PATCH] Correct the glibc constraint: the sysroot sets the floor, not the toolchain Rust std targets 2.17. Everything above 2.30 comes from glibc 2.34's libpthread/libdl merge re-versioning moved symbols, which makes the ceiling stable rather than a one-release margin. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_013kj58Jugkic783b8ZrtTVZ --- docs/REPOS.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/REPOS.md b/docs/REPOS.md index 39e257e..a5e3493 100644 --- a/docs/REPOS.md +++ b/docs/REPOS.md @@ -154,20 +154,26 @@ cargo build --release --target aarch64-unknown-linux-gnu Each service repo's `.cargo/config.toml` points at `aarch64-linux-gnu-gcc`, from the `gcc-aarch64-linux-gnu` package. -⚠ **The cross sysroot's glibc is newer than the Orin's** — 2.43 against 2.35 — and -a binary cannot use a symbol version the target lacks. What matters is not the -sysroot but the **highest version actually referenced**, currently 2.34, which is -why the binaries run. The margin is one release. +⚠ **The linker binds each symbol to the newest version present in the sysroot**, +so the cross sysroot (glibc 2.43) sets the floor, not the toolchain. Rust std +itself targets 2.17 — making the toolchain older changes nothing. -A dependency reaching for a newer symbol breaks this at **runtime**, on the car, -as a loader error — the build succeeds. Check before deploying: +Currently the highest referenced version is **2.34**, below the Orin's 2.35. Every +symbol above 2.30 comes from one event: glibc 2.34 merged `libpthread` and +`libdl` into `libc` and re-versioned the moved symbols (`__libc_start_main`, the +`pthread_*` family). Re-versioning is rare, so this ceiling is stable — exceeding +it would take a **dependency** calling a glibc function introduced after 2.35. + +That failure lands at **runtime**, on the car, as a loader error; the build +succeeds. Check before deploying: ```bash objdump -T | grep -o 'GLIBC_[0-9.]*' | sort -Vu | tail -1 ``` -At or below `GLIBC_2.35` it will run. Above it, build on the Orin or in a -container matching its release. +At or below `GLIBC_2.35` it will run. Above it, the control is the **sysroot**: +build in a container supplying an older one — `cross` does this with the host's +own toolchain — or build on the Orin. ### Writing style