Skip to content

fix: build x264 from source in rpm-builder to resolve x264-sys bindgen failure on Fedora - #1

Draft
swedishborgie with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job
Draft

fix: build x264 from source in rpm-builder to resolve x264-sys bindgen failure on Fedora#1
swedishborgie with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown

RPMFusion's x264-devel package produces headers where bindgen generates x264_param_t as an opaque 1-byte placeholder instead of the full struct, causing a compile-time size assertion overflow (1_usize - 1024_usize) in x264-sys 0.2.x during the Fedora RPM build.

Changes

  • docker/Dockerfile.packages (rpm-builder stage)
    • Removed x264-devel from the dnf install list
    • Added a step to clone x264 from VideoLAN's stable branch and build/install from source (--enable-shared --disable-cli --prefix=/usr --libdir=/usr/lib64), which exposes a fully-defined x264_param_t that satisfies the x264-sys size assertions
RUN git clone --depth 1 https://code.videolan.org/videolan/x264.git /tmp/x264 \
    && cd /tmp/x264 \
    && ./configure --enable-shared --disable-cli --prefix=/usr --libdir=/usr/lib64 \
    && make -j"$(nproc)" install \
    && ldconfig \
    && rm -rf /tmp/x264

The VideoLAN source with default configure flags produces headers where x264_param_t is fully defined, so bindgen generates a complete Rust struct and the size_of assertion resolves correctly.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Fedora Package fix: build x264 from source in rpm-builder to resolve x264-sys bindgen failure on Fedora Jun 15, 2026
Copilot AI requested a review from swedishborgie June 15, 2026 22:09
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