Prebuilt FFmpeg archive is pinned to libx264 ABI 163 and fails to link on rolling distros (system x264 is 165)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- build-system
Research direction
Start by reading the ffmpeg-sys-fframes prebuilt archive setup and its README note that external codec libraries come from the system; the issue does not name source files or tests. Compare the archive’s expected x264 ABI with the system ABI and investigate the suggested rebuild, documentation, or linking changes. Done means the default build links successfully on systems with newer x264, or the limitation and workaround are clearly documented.
Written by the indexing model from the issue text.
Description
Summary
On x86_64 Linux, a freshly generated project fails to link with the default h264 feature enabled:
rust-lld: error: undefined symbol: x264_encoder_open_163
>>> referenced by libx264.c:1406 (libavcodec/libx264.c:1406)
>>> libx264.o:(X264_init) in archive .../libffmpeg_sys_fframes-....rlib
>>> did you mean: x264_encoder_open_165
>>> defined in: /usr/lib/libx264.so
The prebuilt FFmpeg archive is compiled against libx264 ABI 163, but -lx264 is resolved from the system, which on a rolling distro may already be ABI 165. Because x264 bakes its ABI version into the exported symbol name, the mismatch is a hard link error, and there is no user-side knob to resolve it — the prebuilt archive is simply older than the current system x264.
Environment
| OS | Arch Linux (rolling) |
| rustc | 1.97.1 |
| fframes | 1.2.0 |
| cargo-fframes | 1.2.0 |
| ffmpeg-sys-fframes | 9.0.0 (prebuilt tag binaries-9.0.0) |
| system x264 | x264 3:0.165.r3222.b35605a-2 → X264_BUILD 165 |
| system ffmpeg | ffmpeg 2:9.0.2-2 |
Steps to reproduce
cargo install --locked cargo-fframes --git https://github.com/dmtrKovalenko/fframes
cargo fframes new hello-world \
--template single-scene \
--format landscape \
--backend skia-vulkan \
--title "Hello"
cd hello-world
cargo build --release
Expected
The project links, and render writes out.mp4.
Actual
Link failure:
error: linking with `cc` failed: exit status: 1
= note: rust-lld: error: undefined symbol: x264_encoder_open_163
>>> referenced by libx264.c:1406 (libavcodec/libx264.c:1406)
>>> libx264.o:(X264_init) in archive /…/libffmpeg_sys_fframes-e6f133740cb79c29.rlib
>>> did you mean: x264_encoder_open_165
>>> defined in: /usr/lib/libx264.so
collect2: error: ld returned 1 exit status
Note that the final link line contains both the prebuilt search path (.../ffmpeg-sys-fframes-.../out/dist/lib) and -lx264, which resolves to /usr/lib/libx264.so.
Root cause
ffmpeg-sys-fframes downloads a prebuilt FFmpeg archive, and its README states that external codec libraries are still taken from the system:
"External codec libraries (x264, x265) still come from the system."
The downloaded archive's own extralibs.txt confirms it was built expecting the system x264:
EXTRALIBS-avcodec=-pthread -lm -latomic -lx264
However, that archive was compiled against x264 headers where X264_BUILD was 163, while x264 encodes its ABI version into the symbol name (x264_encoder_open_<X264_BUILD>). Linking it against a system x264 built as 165 therefore cannot succeed.
Evidence from the affected machine:
$ grep -E '^#define X264_BUILD' /usr/include/x264.h
#define X264_BUILD 165
$ nm -D --defined-only /usr/lib/libx264.so | grep x264_encoder_open
x264_encoder_open_165
Because x264's ABI moved from 163 → 165, any rolling distro whose x264 has been rebuilt past 163 is broken on the prebuilt path. This is a timing problem between the archive and the distro, not a user misconfiguration.
Workaround
Disable the h264 feature so the build uses the prebuilt archive without x264 (the release ships both variants — e.g. …-gpl-swresample-swscale-x264.tar.gz and …-swresample-swscale.tar.gz), then select an encoder that does not depend on an external library:
Cargo.toml: remove the[target.'cfg(not(windows))'.dependencies]block (features = ["h264", "libav-agree-gpl"])src/main.rs:preferred_encoder: Some("libx264")→Some("mpeg4")
This builds and renders successfully, but forces MPEG-4 Part 2 output instead of H.264 (larger files, lower quality per bit).
The documented escape hatch also works, at the cost of a long source build: FFMPEG_FORCE_BUILD=1 compiles FFmpeg against the system x264. On Linux that additionally requires nasm/yasm to be installed.
Suggested fixes
- Rebuild and republish the prebuilt archives against the current x264 ABI, and/or document which x264 ABI each archive was built against.
- Add a Linux troubleshooting note: a system x264 newer than the archive's ABI breaks the link, and
FFMPEG_FORCE_BUILD=1is the escape hatch. - Consider not linking x264 from the system by default, so the prebuilt archive is self-contained and rolling-distro ABI bumps cannot break it.
Happy to test a republished archive on Arch Linux if that helps.
- Dominant language
- Rust
- Stars
- 3.3k
- Forks
- 118
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dmtrKovalenko/fframes
-
Frame::second_to_frame truncates f32 product, causing periodic off-by-one framesPossibly taken @ShamanicArts claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
dmtrKovalenko/fframes#296 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
dmtrKovalenko/fframes#280 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
dmtrKovalenko/fframes#277 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
dmtrKovalenko/fframes#273 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
dmtrKovalenko/fframes#260 · 1 comment ·
Maintainers usually reply within 1 day
All issues in dmtrKovalenko/fframes
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
autofixer: follow-up triage: bug triage: classified triage: correctness triage: has-reproducer
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
tursodatabase/turso#13221 ·
Maintainers usually reply within 1 day
-
Update Wasmtime to 48.0.11 for RUSTSEC-2026-0648Possibly taken @flyingrobots claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
flyingrobots/edict#457 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
O-windows relnotes relnotes-needs-review relnotes-tracking-issue T-libs
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day