mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-12 00:10:56 +02:00
f92364a002
CI on a headless ubuntu-24.04-arm runner caught what a desktop Pi could not: the AppImage only started on a machine that already had a full desktop stack installed. Three distinct causes, all from bundling Debian's builds of libraries that Debian builds for a co-versioned system, which is the opposite of an AppImage's situation. 1. Hard-linked backends. Debian's libSDL2 lists libpulse, libasound, libX11 and libwayland-client as DT_NEEDED rather than dlopening them, so the loader demanded all four at startup; the CI job failed with "libpulse.so.0 => not found". Debian's OpenAL does the same through libsndio, which itself hard-links libasound. Built from source with --enable-*-shared and ALSOFT_DLOPEN, both dlopen their backends, so the image now runs on a Wayland-only session, a KMSDRM handheld with no X server, or a box with ALSA and no PulseAudio. 2. A stray link. Debian's libtheoradec is linked against libcairo, which drags in X11, xcb, fontconfig and freetype for a video decoder. --disable-examples leaves it needing only libogg. 3. SONAME collision with the host. OpenAL dlopens ALSA, ALSA's config loads its PulseAudio hook plugin, and that plugin pulls the host's libsndfile into the process. libsndfile links libogg, libvorbis and libmpg123 -- the same three we bundle -- and since the loader resolves a SONAME once per process it bound to our bullseye copies. A bullseye libmpg123 has no mpg123_info2 (added in 1.32), so the plugin failed to relocate, ALSA config collapsed, and the game ran with no audio device at all. Building them current means our copies satisfy the host's libsndfile instead of starving it. The general rule, now stated as an assertion instead of a comment: never bundle a library the host's own stack may also load unless ours is at least as new as theirs. build_appimage.sh fails if any shipped object hard-requires anything beyond glibc, libstdc++ and the font stack, and CI re-checks it on the extracted artifact. Host requirements drop from "a working desktop" to glibc 2.29+, libstdc++, libfreetype6 and zlib. Bundled libraries drop from 13 to 10: libcairo, libpixman and libsndio are gone entirely. Verified on a Raspberry Pi 5 (trixie, Wayland): boots, imports, plays, and audio works -- SDL 2.30 now picks the native Wayland backend rather than falling back to XWayland as bullseye's 2.0.14 did. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
46 lines
2.2 KiB
Docker
46 lines
2.2 KiB
Docker
# Build environment for the aarch64 Linux AppImage.
|
|
#
|
|
# Debian bullseye on purpose: it ships glibc 2.31, the oldest runtime we
|
|
# promise to support. Everything linked here therefore runs on bullseye and
|
|
# every later distro (glibc is backward compatible, not forward), which is
|
|
# what makes the resulting AppImage portable across Raspberry Pi OS, Armbian,
|
|
# Ubuntu 20.04+, and the aarch64 handheld distros.
|
|
#
|
|
# This image is arch-native: build it on an aarch64 host (Raspberry Pi 5,
|
|
# ubuntu-24.04-arm runner, Apple Silicon Docker) — no qemu emulation.
|
|
FROM debian:bullseye
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# build-essential/autoconf: LÖVE 11.5's linux-src tarball is autotools.
|
|
# squashfs-tools: packs the AppDir into the AppImage payload.
|
|
#
|
|
# Note what is deliberately ABSENT: libsdl2-dev, libtheora-dev and
|
|
# libopenal-dev. All three are built from source instead (see common.sh for
|
|
# why), and having Debian's copies installed would let pkg-config hand LÖVE's
|
|
# configure the system ones and silently undo it.
|
|
#
|
|
# The remaining lib*-dev set is LÖVE's optional-module surface. A missing one
|
|
# does not fail configure, it silently drops a module (love.sound decoders,
|
|
# love.font, love.video), so they are pinned here deliberately and asserted
|
|
# after the build.
|
|
#
|
|
# The X11/Wayland/audio -dev packages are here for SDL2's *build*, not for
|
|
# runtime linkage: SDL detects each backend at compile time and then dlopens
|
|
# it, so these headers decide which backends exist at all while adding no
|
|
# DT_NEEDED entry to the shipped library.
|
|
RUN apt-get update -qq \
|
|
&& apt-get install -y --no-install-recommends \
|
|
build-essential pkg-config autoconf automake libtool cmake \
|
|
ca-certificates curl file xz-utils bzip2 zip unzip squashfs-tools \
|
|
libogg-dev libvorbis-dev \
|
|
libmodplug-dev libmpg123-dev libfreetype6-dev libluajit-5.1-dev \
|
|
zlib1g-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev \
|
|
libasound2-dev libpulse-dev libudev-dev libdbus-1-dev \
|
|
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev \
|
|
libxinerama-dev libxss-dev libxkbcommon-dev \
|
|
libwayland-dev wayland-protocols libdrm-dev libgbm-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /work
|