Repository navigation
Bundle a static x264 in the prebuilt archives - #1
Open
diogochaves wants to merge 1 commit into
Open
diogochaves wants to merge 1 commit into
diogochaves wants to merge 1 commit into
Conversation
x264 puts its ABI version in its symbol names, so the archives compiled against Ubuntu 22.04's x264 (ABI 163) reference x264_encoder_open_163 and fail to link on systems with another x264, such as Arch's 165 (fframes#192). The binaries workflow now compiles x264 (stable, 0.165) as a static library and the export copies it into the archive's lib/ (FFMPEG_BINARIES_BUNDLE_LIBS). The build script already puts that directory first on the link search path, so -lx264 finds the bundled libx264.a before any system x264. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Fixes dmtrKovalenko/fframes#192.
The prebuilt archives are compiled against Ubuntu 22.04's x264 (ABI 163) and link
-lx264from the system. x264 puts its ABI version in its symbol names, so on a system with another x264 the link fails:That's every fresh fframes project on Arch (x264 165) and other rolling distros.
This makes the binaries workflow compile x264 (stable, pinned to
b35605a, 0.165) as a static library and has the export copy it into the archive'slib/(newFFMPEG_BINARIES_BUNDLE_LIBS). Nothing changes for consumers:build.rsalready adds<dist>/libto the search path before-lx264, so the linker finds the bundledlibx264.afirst.I ran the workflow's steps by hand on Arch x86_64: the archive comes out with
libx264.aand the same key, and a crate that opens libx264 through it links with nolibx264.soinlddand encodes. fframes 1.2.0 and 1.2.1-rc.45 projects with the defaulth264feature link and render with it. I haven't run it on the GitHub runners, macOS or aarch64.Two things to know:
binaries-9.0.0tag, but the build script keeps downloaded archives in~/.cache/ffmpeg-sys-fframes/binaries-9.0.0/and never re-downloads them. People who already hit this would keep the old archive. Publishing as 9.0.1 (a new tag) avoids that; fframes asks for"9.0.0", so new projects pick up 9.0.1 on their own.x265_api_get_199; Arch has 217). Bundling it the same way also needs the C++ runtime on the link line, so I left it out of this one.Separately, for your next rebase on zmwangx: zmwangx#140 fixes
build-nvenc(configure never found the nv-codec-headers because of--disable-autodetect), which fframes' NVENC path needs.