mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-07-12 18:19:42 -07:00
1175e2b5a9
PortMaster runtimes failed to launch: love_11.5's love.aarch64 died with "error while loading shared libraries: libtheoradec.so.1: cannot open shared object file" (caught live over SSH while a port was launched). Root cause: ArchR keeps the ~50 PortMaster compat libraries (older Debian-11-era SONAMEs: libtheoradec.so.1, libavcodec.so.58, libwebp.so.6, libx264.so.160, etc.) under /usr/lib/compat to stay out of the base system, and the image ships NO ld.so.cache. glibc's dynamic linker therefore only searches the hardcoded /usr/lib + /lib plus LD_LIBRARY_PATH, so /usr/lib/compat is invisible to anything that does not explicitly prepend it. control.txt does set LD_LIBRARY_PATH=/usr/lib/compat, but the per-runtime invocation overwrites it, dropping compat for binaries like love.aarch64. docs/PortMaster_CFW.md is explicit on the fix: "add these older .so symlinks alongside [the newer versions]" and "Keep [libtheoradec] at standard versions." So we expose the compat SONAMEs in the default path. New archr-compat-symlinks script + archr-compat-libs.service oneshot (ordered Before=archr-autostart so it runs before any port launches): walks /usr/lib/compat (and /usr/lib32/compat) and symlinks each SONAME into /usr/lib, but ONLY when the base system does not already provide that exact name, so real libraries (libogg.so.0, libvorbis.so.0, ...) are never shadowed. Idempotent via the `[ -e ]` guard; the writable ext4 rootfs keeps the links so later boots are no-ops. Verified live on the R36S: 46 compat-only SONAMEs linked into /usr/lib, libtheoradec.so.1 now resolvable, libogg.so.0 left untouched (still the real /usr/lib/libogg.so.0.8.6).