fix(build): set LD_LIBRARY_PATH for chrooted xkbcomp — fresh image has no ld-elf.so.hints #277
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/xkb-chroot-ldpath"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #275, which did its job: the same loader error reappeared but this time surfaced honestly (
xkbcomp: ld-elf.so.1: Shared object "libxkbfile.so.1" not found) — from inside the chroot.Root cause, one layer deeper: a freshly assembled image has no
/var/run/ld-elf.so.hints(ldconfig runs at boot via rc, which has never happened), and FreeBSD's rtld does not search/usr/local/libwithout the hints file. The image's X libraries are present on disk but invisible to the loader until first boot — chroot or not.Fix: wrap both chrooted xkbcomp invocations with
/usr/bin/env LD_LIBRARY_PATH=/usr/local/lib. Chosen over runningchroot ldconfigbecause it leaves zero residue in the image (no generated hints file to ship). TESTING.md's post-build check gets the identical wrap.Premise check before merge (pool still mounted on valhala):
ls tmp/cache/mnt/usr/local/lib/libxkbfile* tmp/cache/mnt/var/run/ld-elf.so.hints— expected: library present, hints file absent. If the library is MISSING instead, this is a pkg dependency gap, not a loader-path issue, and this PR alone won't fix it.Gates:
./scripts/check-format.shgreen,sh -n build.shclean.🤖 Generated with Claude Code