Repository navigation
appimage: Build on a glibc 2.28 base and stop bundling glibc - #927
Conversation
….28 (RED) check-glibc-floor.sh reads each AppDir ELF file's required GLIBC_ versions and fails above the floor. assemble-appdir.sh runs it. Today's Ubuntu 26.04 build fails: 243 of 673 ELF files need more than 2.28 (up to 2.43). Also create .apt-cache/partial before running steps: with --skip-deps (the bosn task) nothing else did, and the libavutil step's apt-get failed. Refs #926
…flight for required ones host-libs.json lists every library the AppImage takes from the host, as required or optional, with the symbols a candidate must have and install hints per distribution. hostlib.c finds a host copy ($OBS_HOSTLIB_<NAME>, the ldconfig cache, /run/opengl-driver/lib and the standard directories), refusing ones that do not load, lack the symbols or are inside the AppImage, and keeps every rejection with its reason (OBS_HOSTLIB_DEBUG=1). build.py generates an Implib.so shim (libobs-<name>.so.N) for each optional library the bundle links, covering exactly the symbols it imports, and switches the consumers to it. Without a host copy the shim's functions are type-exact stubs (decltype of the library's declarations) that fail cleanly, so a host without libva gets OBS without VA-API instead of no OBS. obs-hostlib-check, run before OBS, exits 127 naming any missing required library, with a dialog when there is no terminal. test-hostlib.sh covers: host copy found, no copy (stubs), a candidate that does not load, a copy inside the AppImage, one lacking symbols, and the preflight with and without libEGL. All pass on manylinux_2_28. Refs #959
build-aux/appimage/manylinux/ builds the libraries the Ubuntu build took from apt: the FFmpeg stack with obs-deps' pins, PipeWire 1.2.7 and the header libraries into /opt/obs-deps, and Qt 6.11.1 (the version obs-deps ships for Windows and macOS) into /opt/obs-deps/qt6. build.py --base manylinux skips the apt and libavutil steps, and bosn runs it as the appimage-228 task. assemble-appdir.sh bundles glibc only when the build host's is newer than the 2.28 floor: on the manylinux base, glibc and the C++ runtime come from the host, with no loader copy in /tmp and no interpreter patching. AppRun and test-appimage.sh handle both kinds of AppImage. check-glibc-floor.sh also checks GLIBCXX_3.4.25 and CXXABI_1.3.11 (RHEL 8's libstdc++). fetch-deps.py and pack-deps.py are the consumer and producer for the prebuilt dependencies in obs-rust/obs-studio-libs (#525). Refs #926
…ict lint assemble-appdir.sh builds the shims and obs-hostlib-check after the library closure; AppRun runs the preflight before OBS. hostlib/build.py parses host-libs.json eagerly into dataclasses, and ci/test_no_dict_access.py fails on dictionary access outside parse_* functions in that code. fetch-deps.py and pack-deps.py are dropped: the obs-studio-libs CLI (obs-rust/obs-studio-libs) packs, catalogs and fetches. Refs #926, #959
|
Pushed 5fdfbd4: Verified in the pinned manylinux_2_28 image: the script runs in about 60 s including the dnf zstd install and a 22 MB download. The Qt layer drops from a full qtbase, qtsvg and qtwayland compile to about 1 min. I did not time the old compile. The Qt layer had to be rebuilt on any Dockerfile or earlier-layer change, so that saving applies to every cold image build. CI had not yet run on this push when I posted. |
…libs
The AppImage now builds in manylinux_2_28 (AlmaLinux 8, exactly glibc 2.28)
and bundles no glibc: check-glibc-floor passes (239 ELF files, none above
GLIBC_2.28 / GLIBCXX_3.4.25; 243 failed it in the RED commit). No /tmp loader,
no interpreter patching: OBS runs on the host's /lib64/ld-linux-x86-64.so.2.
97.5 MB and 143 bundled libraries, from 139 MB and 273.
Dependencies: the build image compiles nothing but OBS. Qt 6.11.1, FFmpeg
8.1.2 and its codecs, PipeWire 1.2.7, GLib 2.80.5, fdk-aac, qrcodegen and
header libraries are fetched from obs-rust/obs-studio-libs (deps.lock.json,
sha256-pinned, plain HTTPS from its root manifest.json).
Fixes the 2.28 base exposed:
- cmake/linux/compilerconfig.cmake: compile with -fPIC and link as PIE,
including at the LTO link. A non-PIE (or -fPIE) OBS got copy relocations
of Qt's data (QCoreApplication::staticMetaObject, ...), so Qt and OBS used
different copies: "signal not found", then qGuiApp == nullptr at startup.
RHEL's GCC does not default to PIE, and this Qt uses reduce-relocations.
- obs-nvenc-test and decklink link Threads / ${CMAKE_DL_LIBS}: before glibc
2.34 pthread_* and dl* are in libpthread and libdl.
- assemble-appdir.sh: Qt's plugin directory comes from qtpaths6, never a
file-system search (AlmaLinux's Qt 5 plugins matched first); the image's
LD_LIBRARY_PATH is prepended, not replaced; Qt's GTK 3 theme is dropped.
- check-appdir.sh checks gconv only when glibc is bundled.
- hostlib: a library may list several headers (va/va_str.h); the preflight is PIE.
- build.py --base manylinux refuses to build unless glibc is exactly 2.28.
Verified on NixOS 26.05 (RTX 3060, Wayland) with a plain appimageTools
wrapper and no driver-path workaround: Qt 6.11.1, NVIDIA GL adapter, 30 fps,
0 skipped frames, ~2-5 ms render. libva is absent there: the shim reports
VA-API unavailable and OBS starts (#959).
Closes #926
appimage.yaml builds build-aux/appimage/manylinux/Dockerfile (AlmaLinux 8 plus the prebuilt dependencies from obs-studio-libs) and runs every build.py step in it with --base manylinux, through manylinux/run.sh (workspace, runner temp and cargo registry mounted at their own paths). The apt and libavutil steps and the apt cache are gone. The test helpers are built in the same image, so they run on the old hosts the AppImage now supports. Refs #926
…from obs-studio-libs deps.lock.json matched the repository's *.lock.json ignore rule and was never committed, so CI's image build could not find it: un-ignore that one file. The build tools now come from obs-rust/obs-studio-libs too: uv (the image fetches it first, pinned by sha256, since it runs the fetch), and Implib.so and appimagetool through deps.lock.json into /opt/obs-deps. hostlib/build.py and the appimage step use those copies on the glibc 2.28 base; the Ubuntu base still downloads them. AlmaLinux 8's tar has no --zstd: pipe through zstd. Refs #926
…--version output (obs-rust#1043) Since the glibc 2.28 base (obs-rust#927) the loader warns "libobs-va.so.2: no version information available" before --version's output. The checks required the whole stdout+stderr capture to start with OBS-Studio-Rust, so every distro test failed ("built with ENABLE_RUST_LIBOBS but does not report OBS-Studio-Rust") and, past that, the Rust/upstream path switch picked the upstream layout. app_version_line() takes the first line naming OBS; the three checks use it. Reproduced and verified under bosn on debian:trixie-slim with the AppImage from run 38869769545.
…dir floor (obs-rust#1134) (obs-rust#2680) * test(appimage): check-appdir pins one libvpx, at least 1.17.0 RED on master: check_appdir.py has no libvpx check at all, so each of these fails - no libvpx found (0 != 1), two copies accepted, a 1.14.1 bundle accepted, and a second soname referenced by another library accepted. * appimage: libvpx 1.17.0 from the ffmpeg r6 artifact, with a check-appdir floor (obs-rust#1134) The AppImage's FFmpeg artifact pinned libvpx 1.14.1, older than the 1.16.0 the released AppImage had before obs-rust#927/obs-rust#1047 moved it here, and 1.17.0 has public fixes on both paths OBS reaches libvpx (alpha-WebM decode via the forced decoder, libvpx-vp8/vp9 in Custom FFmpeg Output). The r6 rebuild of ffmpeg 8.1.3 carries it (obs-rust/obs-studio-libs#20); the lock pins that artifact by flavor r6 and sha256. check-appdir now fails the build when the AppImage bundles no libvpx, two of them, one older than 1.17.0, or when another bundled library asks for a different libvpx soname than the one bundled (the .so.9 -> .so.12 move). --------- Co-authored-by: zackees <[email protected]>
Closes #926.
RED (064caad):
check-glibc-floor.sh, run byassemble-appdir.sh, fails the build when any AppDir ELF file requires aGLIBC_version above 2.28. On today's Ubuntu 26.04 build, 243 of 673 ELF files fail it (up to 2.43).GREEN, to follow: build on a
manylinux_2_28(AlmaLinux 8) base, with Qt 6.10 and the bundled libraries built from source, then drop the bundled glibc and the/tmploader. See the plan in #926.Also fixes a bug in #901's bosn task: with
--skip-deps, nothing created.apt-cache/partial, so the libavutil step failed.