Bug 16312 - Circular dependency between ffmpeg and x264
Summary: Circular dependency between ffmpeg and x264
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: multimedia (show other bugs)
Version: 6.99
Hardware: All Multiple
: Medium normal
Target Milestone: 6.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-06-10 18:35 UTC by Vyacheslav Yurkov
Modified: 2026-10-22 15:30 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vyacheslav Yurkov 2026-06-10 18:35:46 UTC
ERROR: Task /work/build/openembedded-core/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.1.bb:do_create_recipe_spdx has circular dependency on /work/build/openembedded-core/meta/recipes-multimedia/x264/x264_git.bb:do_create_recipe_spdx

Seen on Wrynose. I suspect it's the same in master.
Comment 1 Vyacheslav Yurkov 2026-06-10 18:38:02 UTC
Correction, only when the ffmpeg config is extended with:

ffmpeg_%.bbappend:1:PACKAGECONFIG:append = " x264"
Comment 2 Joshua Watt 2026-06-11 15:52:13 UTC
This appears to be because ffmpeg and x264 actually have a circular dependency on each other, and not specific to SPDX. ffmpeg.bb has:

PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"

while x264.bb has:

PACKAGECONFIG[ffmpeg] = "--enable-lavf --enable-swscale,--disable-lavf --disable-swscale,ffmpeg"


Thus, if "x264" is enabled in ffmpeg and "ffmpeg" is enabled in x264, they have a circular build time dependency.

I'm not sure how to break this other than add a comment in each recipe that indicates this is the case (or some sort of ffmpeg-minimal shenanigans). I will add a comment at least.

Regardless, it's not an SPDX problem
Comment 3 Vyacheslav Yurkov 2026-06-11 16:05:42 UTC
Yes, I also came to the same conclusion. It seems like x264 doesn't need the whole ffmpeg, but only a few libraries from there. If we split them in a subpackage, would that work for DEPENDS? But I doubt it, IIRC it works on a recipe level, not on a package level, right?
Comment 4 Joshua Watt 2026-06-11 16:09:24 UTC
Correct; since it's a build time dependency loop, it occurs before packaging is even known (in fact, circular runtime dependencies are allowed).

The solution is _probably_ some sort of "minimal" or "initial" ffmpeg build that doesn't produce packages and that x264 can depend on at build time, but then it's runtime dependencies are on the "full" ffmepg; making sure the two versions of ffmpeg are built the same (such that they are interchangeable at runtime) is the tricky part of that.
Comment 5 Mathieu Dubois-Briand 2026-08-20 12:41:25 UTC
Comment was added: https://git.openembedded.org/openembedded-core/commit/?id=757a032c5c7672ee66ec4984d34e1f03052936ad

I believe the underlying issue still has to be fixed.
Comment 6 Joshua Watt 2026-10-22 15:30:10 UTC
Not sure how to fix the circular dependency. The comment lets the users know of the problem, but I won't have time to fix it "properly"