Repository navigation
build-aux: Bundle all of glibc in the AppImage, not just what OBS links - #499
Merged
Merged
Conversation
Member
|
Demonstrated RED→GREEN in CI. I pushed the RED commit 229ac73 alone to a temporary branch and dispatched appimage.yaml (run 38367442507):
|
… link (RED)
The AppImage bundles glibc (libc.so.6, libm.so.6, the loader) but only
the parts of it that OBS itself links. The host's GPU drivers are loaded
into OBS with that bundled loader and libc, and they link more of glibc:
the NVIDIA driver's libcuda and libEGL_nvidia need librt.so.1,
libpthread.so.0 and libdl.so.2. Those then resolve to the host's copies,
which belong to the host's glibc and need private symbols of its version.
On a host with a newer glibc than the bundled one, libcuda fails to load
("undefined symbol: __pointer_chk_guard, version GLIBC_PRIVATE"),
obs-nvenc-test reports reason=cuda_lib and NVENC is missing from the
encoder list, while a distribution build of OBS works on the same GPU.
The bundle scenario now resolves each glibc library a host driver may
link (libm, libmvec, librt, libpthread, libdl, libutil, libanl,
libresolv, libnss_files, libnss_dns) through obs's RPATH, as a driver's
DT_NEEDED entry would, with the bundled loader and LD_BIND_NOW, and fails
unless it comes from the AppImage and binds. On the current continuous
AppImage it fails for librt, libpthread, libdl, libutil and libanl.
Refs obs-rust#498.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ks (GREEN)
The AppImage bundles glibc and its loader so it runs on distributions
older than the build host, but assemble-appdir.sh took only the parts of
glibc in OBS's own library closure: libc.so.6, libm.so.6, libmvec.so.1,
plus the NSS and resolver libraries it copies by name. The host's GPU
drivers are loaded into OBS on that bundled loader and libc, and they
link more of glibc: the NVIDIA driver's libcuda, libEGL_nvidia and
libGLX_nvidia need librt.so.1, libpthread.so.0 and libdl.so.2. Those
were found on the host, belong to the host's glibc and need its private
symbols. On a host with a newer glibc than the build host's, libcuda
fails to load ("/usr/lib/librt.so.1: undefined symbol:
__pointer_chk_guard, version GLIBC_PRIVATE"), obs-nvenc-test reports
reason=cuda_lib, and NVENC is missing from the encoder list; a profile
set to NVENC opens with a "Missing Encoders" dialog on every start.
After the library closure, bundle every shared library of the package
that owns the bundled libc.so.6 (libc6 on the Ubuntu build host), so the
whole of glibc comes from one build. libthread_db is left out: it is a
debugger plugin whose ps_* symbols the debugger provides. The build fails
if no package owns libc.so.6 rather than shipping a partial glibc again.
The AppImage packaging is by probonopd (1da5903, 1af9eaa).
Fixes obs-rust#498.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Local-Gate: v1 tree=abfee81918dc83b66e26f06df7af22d8c73d30bb secs=473 lanes=lint:run,rust-test:run,tier2-linux:run
Ci-Attestation: {"at":1791880789,"gate":"rust/all/fmt","host":"linux-x86_64","key":"51480a1aeba7790e90dd0b64910899c2e09a86b486058b754b464c908d350b0f","lane":"lint","parents":["118a99a7a9d1914679fd0f8a0985f22cde05af08"],"secs":177,"stamp":"d97b9fc84ac877fec7618124a0b67284","tree":"abfee81918dc83b66e26f06df7af22d8c73d30bb","v":1,"via":"run"}
Ci-Attestation: {"at":1791880789,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"51480a1aeba7790e90dd0b64910899c2e09a86b486058b754b464c908d350b0f","lane":"lint","parents":["118a99a7a9d1914679fd0f8a0985f22cde05af08"],"secs":177,"stamp":"0215b0eedc0dd3bacb687d332cbf7393","tree":"abfee81918dc83b66e26f06df7af22d8c73d30bb","v":1,"via":"run"}
Ci-Attestation: {"at":1791880789,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"6b5c8b344ce63c72bdcea24b84115574362e794ebf62668eac02855dd217cdb7","lane":"rust-test","parents":["118a99a7a9d1914679fd0f8a0985f22cde05af08"],"secs":217,"stamp":"4718678d85805bf763ce1feb08d13aff","tree":"abfee81918dc83b66e26f06df7af22d8c73d30bb","v":1,"via":"run"}
Ci-Attestation: {"at":1791880789,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"d62aa9e429cfdf7bf7d551ea318fe4b3d0675acd4a357f78986566c016bf8aee","lane":"tier2-linux","parents":["118a99a7a9d1914679fd0f8a0985f22cde05af08"],"secs":79,"stamp":"487e53d847624063d8040c97534d93dd","tree":"abfee81918dc83b66e26f06df7af22d8c73d30bb","v":1,"via":"run"}
Member
|
Rebased on master, local gate passed; pushed as c9fbdb3. Merging once CI is green. |
zackees
force-pushed
the
fix/appimage-glibc-companions
branch
from
October 13, 2026 08:39
d9e60ae to
c9fbdb3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The AppImage now bundles all of glibc, not just the parts OBS links. NVIDIA's
libcudaloads again on hosts with a newer glibc than the build host's, so NVENC is back.assemble-appdir.shbundles glibc and its loader, so everything in the AppImage runs on glibc 2.43. It took only the glibc libraries in OBS's own closure:libc.so.6,libm.so.6,libmvec.so.1, pluslibresolvand the NSS libraries it copies by name.libcuda.so.1,libEGL_nvidia.so.0andlibGLX_nvidia.so.0needlibrt.so.1,libpthread.so.0andlibdl.so.2. None of those were in the AppImage, so they came from the host. The host's copies use private symbols of the host's glibc. On glibc 2.44,librt.so.1fails withundefined symbol: __pointer_chk_guard, version GLIBC_PRIVATE,obs-nvenc-testreportsreason=cuda_lib, andobs-nvenc.soregisters no encoders.assemble-appdir.shnow copies every shared library of the package that owns the bundledlibc.so.6(libc6on the Ubuntu 26.04 build host):librt,libpthread,libdl,libutil,libanl,libnsl,libBrokenLocale,libc_malloc_debug,libmemusage,libpcprofile, and the rest of NSS.libthread_dbis left out because it is a debugger plugin and the debugger provides itsps_*symbols. The list comes from the package's file list, not a hand-kept list, so all of glibc comes from one build. If no package ownslibc.so.6, the build fails instead of shipping part of glibc again.build-aux: Test that the AppImage bundles the glibc libraries drivers link (RED): thebundlescenario oftest-appimage.shruns in CI's stock Debian 13, Ubuntu 22.04 and Fedora containers. Whenlibc.so.6is bundled, it resolves each glibc library a host driver may link (libm,libmvec,librt,libpthread,libdl,libutil,libanl,libresolv,libnss_files,libnss_dns). It usesLD_PRELOADby name onobswith the bundled loader andLD_BIND_NOW, which takes the same route through obs's RPATH as a driver'sDT_NEEDEDentry. It fails unless each library comes from the AppImage and binds.build-aux: Bundle all of glibc in the AppImage, not just what OBS links (GREEN): the fix.Motivation and Context
Fixes #498. On NVIDIA systems the AppImage has no NVENC. A profile set to NVENC opens with a "Missing Encoders" dialog (
ffmpeg_nvenc,Module "obs-nvenc" not loaded) on every start. A distribution build of OBS on the same GPU works. This affects v0.1.0-beta.20261012 and the currentcontinuousAppImage.The AppImage packaging, including the decision to bundle glibc, is by probonopd (1da5903, 1af9eaa).
Why this one: NVENC is the encoder most NVIDIA users record and stream with, and the AppImage is the one Linux build meant to run anywhere. Every NVIDIA user on a current rolling distribution loses hardware encoding without any message beyond the log.
How Has This Been Tested?
The fixed AppImage is a simulation, not a full CI build. I took the released AppDir (33.0.0-beta6-799-gd711a972c) and, in an
ubuntu:26.04container, ran this branch's new glibc step fromassemble-appdir.shand thenset-runpaths.sh, as the build does. That container haslibc62.43-2ubuntu2.4, the same version as the release's glibc. I packed the result with the workflow's pinned appimagetool 1.9.1. The step added 12 libraries. This PR's AppImage workflow run builds it for real.On an RTX 2070 desktop (NVIDIA 610.57.04, host glibc 2.44), headless (private Xvfb, private D-Bus, private home, OBS with
--multi):obs-nvenc-test:Cannot load libcuda.so.1,reason=cuda_lib,nvenc_supported=false.driver_ver=610.57.04,cuda_ver=13.30,nvenc_ver=13.1,latest_architecture_name=Turing,nvenc_supported=true, with H.264 and HEVC supported.nvenc), recording started over obs-websocket for 10 s:ffmpeg_nvenc,plugin_not_loaded), obs-websocket answers 207 "not ready", and nothing is recorded.obs_nvenc_h264_texandobs_nvenc_hevc_texregistered,[obs-nvenc: 'simple_video_recording']created, 293 frames output. ffprobe:stream|codec_name=h264|profile=High|width=1280|height=720|r_frame_rate=30/1,format|format_name=matroska,webm|duration=9.766000, 292 frames decoded. Xvfb's GL is software, so obs-nvenc used its non-texture path (falling back to non-texture encoder).DT_NEEDEDlibrt.so.1,libpthread.so.0andlibdl.so.2and no RPATH, preloaded intoobswith the bundled loader andLD_BIND_NOW:/usr/lib/librt.so.1,undefined symbol: __pointer_chk_guard.libcuda.so.1,libEGL_nvidia.so.0andlibGLX_nvidia.so.0gives 1 undefined symbol each in the release and 0 in the fixed AppImage.CI's test script (
test-appimage.sh) in the same stock containers CI uses:bundlewith the RED test:librt,libpthread,libdl,libutilandlibanlas taken from the container.LD_BIND_NOW). A first version also bundledlibthread_db, and this check caught it (undefinedps_*symbols), so it is left out.first-startandprobes, fixed AppImage: passed on all three.saved-profile, fixed AppImage, Debian 13: passed.verify-recording.sh: 14 s, 320x240, 419 frames, 0 freezes in the screen and camera regions, 440 Hz tone throughout.No regression on AMD (an integrated Radeon GPU, Mesa radeonsi, host glibc 2.44):
VAAPI: Failed to initialize display). The bundled libva can't load the host driver; that is a separate, known issue.ffmpeg_vaapi: ffprobecodec_name=h264|profile=High|width=1280|height=720, 9.98 s, 299 frames. The release gives the same result.Not tested:
libEGL_nvidiaandlibGLX_nvidianow bind.libc62.43-2ubuntu2.4. The release'slibc.so.6comes from the CI runner and has the same version but a different build ID. In a real build, all of them come from the build host's onelibc6.ci/local_gate.pywas not run; the change is limited to the AppImage scripts.Types of changes
Checklist:
🤖 Generated with Claude Code