fix(build): run XKB test compiles chrooted into the image, surface xkbcomp errors #275

Merged
clawdie merged 1 commit from fix/xkb-smoke-compile-chroot into main 2026-07-19 13:03:09 +02:00
Owner

Root cause of the stage-5 XKB default keymap does not compile failure on valhala (reproduced live with stderr visible):

ld-elf.so.1: Shared object "libxkbfile.so.1" not found, required by "xkbcomp"

The XKB test compile ran the image's xkbcomp binary directly on the host, where the loader resolves shared libraries from the host's /usr/local/lib. valhala carries no X client libraries, so the binary never started — and >/dev/null 2>&1 rewrote the loader error into a bogus "does not compile". The keymap data itself is fine: every include the tests use (xfree86, aliases(qwerty), types/complete, compat/complete, pc/us/si/inet(evdev), geometry pc(pc105)) verified present with proper default sections in xkeyboard-config 2.48's pkg from the live catalog.

Fix:

  • Both test compiles now run chroot "${MOUNT_POINT}" /usr/local/bin/xkbcomp … — image binary + image libraries, and the X11/xkb symlink resolves natively inside the chroot (no _xkb_root re-anchoring needed for -R; it stays for the host-side dir checks).
  • Test files live in the image's /tmp (created + 1777'd earlier in this function) and are removed afterwards.
  • Compiler output is captured to ${CACHE_DIR}/xkb-test.log and printed with an xkbcomp: prefix on failure — the next drift shows its real face instead of a generic message.
  • TESTING.md's post-build /mnt test compile had the identical host-loader trap — switched to the same doas chroot /mnt … form.

This also makes the check verify what it always meant to verify: the image can compile its own keymaps, not the host can run image binaries.

Gates: ./scripts/check-format.sh green, sh -n build.sh clean.

🤖 Generated with Claude Code

Root cause of the stage-5 `XKB default keymap does not compile` failure on valhala (reproduced live with stderr visible): ``` ld-elf.so.1: Shared object "libxkbfile.so.1" not found, required by "xkbcomp" ``` The XKB test compile ran the **image's** xkbcomp binary directly on the **host**, where the loader resolves shared libraries from the host's `/usr/local/lib`. valhala carries no X client libraries, so the binary never started — and `>/dev/null 2>&1` rewrote the loader error into a bogus "does not compile". The keymap data itself is fine: every include the tests use (`xfree86`, `aliases(qwerty)`, `types/complete`, `compat/complete`, `pc`/`us`/`si`/`inet(evdev)`, `geometry pc(pc105)`) verified present with proper `default` sections in xkeyboard-config 2.48's pkg from the live catalog. Fix: - Both test compiles now run `chroot "${MOUNT_POINT}" /usr/local/bin/xkbcomp …` — image binary + image libraries, and the `X11/xkb` symlink resolves natively inside the chroot (no `_xkb_root` re-anchoring needed for `-R`; it stays for the host-side dir checks). - Test files live in the image's `/tmp` (created + 1777'd earlier in this function) and are removed afterwards. - Compiler output is captured to `${CACHE_DIR}/xkb-test.log` and printed with an `xkbcomp:` prefix on failure — the next drift shows its real face instead of a generic message. - TESTING.md's post-build `/mnt` test compile had the identical host-loader trap — switched to the same `doas chroot /mnt …` form. This also makes the check verify what it always meant to verify: *the image can compile its own keymaps*, not *the host can run image binaries*. Gates: `./scripts/check-format.sh` green, `sh -n build.sh` clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
clawdie force-pushed fix/xkb-smoke-compile-chroot from ee4ce4f319
All checks were successful
format-check / prettier (pull_request) Successful in 11s
to 3fc403863f
All checks were successful
format-check / prettier (pull_request) Successful in 11s
2026-07-19 10:39:47 +02:00
Compare
clawdie changed title from fix(build): run XKB smoke compiles chrooted into the image, surface xkbcomp errors to fix(build): run XKB test compiles chrooted into the image, surface xkbcomp errors 2026-07-19 10:39:56 +02:00
clawdie deleted branch fix/xkb-smoke-compile-chroot 2026-07-19 13:03:09 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
clawdie/clawdie-iso!275
No description provided.