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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013kj58Jugkic783b8ZrtTVZ
This commit is contained in:
2026-09-05 15:19:35 +09:00
parent b7b291a3d5
commit 23ee20f9be
+14 -8
View File
@@ -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 Each service repo's `.cargo/config.toml` points at `aarch64-linux-gnu-gcc`, from
the `gcc-aarch64-linux-gnu` package. the `gcc-aarch64-linux-gnu` package.
⚠ **The cross sysroot's glibc is newer than the Orin's** — 2.43 against 2.35 — and ⚠ **The linker binds each symbol to the newest version present in the sysroot**,
a binary cannot use a symbol version the target lacks. What matters is not the so the cross sysroot (glibc 2.43) sets the floor, not the toolchain. Rust std
sysroot but the **highest version actually referenced**, currently 2.34, which is itself targets 2.17 — making the toolchain older changes nothing.
why the binaries run. The margin is one release.
A dependency reaching for a newer symbol breaks this at **runtime**, on the car, Currently the highest referenced version is **2.34**, below the Orin's 2.35. Every
as a loader error — the build succeeds. Check before deploying: 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 ```bash
objdump -T <binary> | grep -o 'GLIBC_[0-9.]*' | sort -Vu | tail -1 objdump -T <binary> | 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 At or below `GLIBC_2.35` it will run. Above it, the control is the **sysroot**:
container matching its release. build in a container supplying an older one — `cross` does this with the host's
own toolchain — or build on the Orin.
### Writing style ### Writing style