Skip to content

Portable statically linked Linux binary (2.0.1) - #10

Merged
lowlevelmetal merged 3 commits into
mainfrom
portable-binary
Oct 1, 2026
Merged

lowlevelmetal merged 3 commits into
mainfrom
portable-binary

Conversation

@lowlevelmetal

Copy link
Copy Markdown
Owner

Summary

  • Prebuilt binary: releases can include one that runs on any x86-64 Linux with glibc ≥ 2.31 (Ubuntu 20.04, Debian 11, RHEL 9, Fedora, Arch and later).
  • What's linked statically: FFmpeg 9.0.2 with dav1d, Mbed TLS, libva/libdrm, nv-codec-headers and zlib, plus libstdc++/libgcc/libatomic. Only glibc stays dynamic, because the NDI runtime is loaded with dlopen.
  • What's included:
    • software decoding of all common codecs, AV1 included;
    • VAAPI hardware decoding, using the system's drivers through a statically linked libva;
    • NVDEC/CUDA hardware decoding, with the NVIDIA libraries loaded at runtime;
    • HTTPS and other network inputs;
    • V4L2 capture.
  • What's not included: X11 screen capture and ALSA/PulseAudio input. These need system libraries, so users who want them build from source.
  • Build pieces:
    • packaging/build-static-deps.sh builds the libraries from SHA-256-pinned sources.
    • -DNDISTREAMER_STATIC=ON links them in.
    • packaging/package.sh checks the binary only needs glibc, then creates the archive with third-party notices, license texts, and a tarball of the exact third-party sources (LGPLv3 compliance).
  • Release workflow (.github/workflows/release.yml): builds the binary in an Ubuntu 20.04 container, runs the test suite against it, smoke-tests it on Ubuntu 20.04, Debian 11, Rocky Linux 9, Fedora and Arch, and attaches it to published releases. On this PR it builds and tests without publishing.
  • HTTPS fix: FFmpeg built with Mbed TLS has no default CA store, so ndistreamer now points it at the system CA bundle unless -o ca_file=... is given.
  • Version: bumped to 2.0.1.

Testing

  • Locally, the static build passes the suite: 86 tests pass, and the 2 that need x264/LAME-encoded clips are skipped because the static FFmpeg has those encoders disabled.
  • In the static build:
    • readelf shows only libc, libm and ld-linux are needed;
    • VAAPI decoding works on an AMD GPU;
    • HTTPS streaming works.
  • The regular dynamic build still passes 88/88, including the real-NDI ABI and end-to-end tests.

🤖 Generated with Claude Code

castusmatt and others added 3 commits September 30, 2026 21:45
Releases can now ship a prebuilt binary that runs on any x86-64 Linux
with glibc 2.31 or newer.

- packaging/build-static-deps.sh builds FFmpeg 9.0 and its libraries
  (dav1d, Mbed TLS, libva, libdrm, nv-codec-headers, zlib) as static
  libraries from checksummed sources, and collects their licenses.
- -DNDISTREAMER_STATIC=ON links them, together with libstdc++, libgcc
  and libatomic, so only glibc stays dynamic. glibc has to stay dynamic
  because the NDI runtime is loaded with dlopen.
- packaging/package.sh checks that only glibc is needed, then builds the
  release archive with third-party notices, license texts and a tarball
  of the exact third-party sources (LGPLv3 for FFmpeg).
- The release workflow builds the binary in an Ubuntu 20.04 container,
  runs the test suite against it, smoke-tests it on Ubuntu, Debian,
  Rocky Linux, Fedora and Arch, and attaches it to the release.
- FFmpeg built with Mbed TLS has no default CA store, so HTTPS inputs
  now use the system CA bundle unless -o ca_file is given.

Bumps the version to 2.0.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FFmpeg 9's x86 assembly does not assemble with nasm 2.14 (Ubuntu
20.04), so build-static-deps.sh now builds a pinned nasm 2.16.03 first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Debian 11 is end-of-life and its security mirror no longer serves the
packages the test installs. Ubuntu 20.04 still covers the glibc 2.31
baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lowlevelmetal
lowlevelmetal merged commit e1533a5 into main Oct 1, 2026
10 checks passed
lowlevelmetal added a commit that referenced this pull request Oct 3, 2026
Portable statically linked Linux binary (2.0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants