ffmpeg: improve cross-compilation support #26559
Open
+58
−79
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.
Summary
Changes to recipe: ffmpeg/[*]
Motivation
The recipe mostly supports cross-compilation, but can have issues in two regards:
tools.build:compiler_executables
from the build profile are ignored.cc
orgcc
by default (don't recall the exact one anymore).Details
Also:
--disable-autodetect
- to allow only explicitly enabled dependencies to be used.sndio
dependency (that was previously causing issues due to the autodetection above).pkgconf
dependency forlibaom
and possibly other deps that require it.vaapi/system
->libva/2.21.0
andvdpau/system
->libvdpau/1.5
to avoid system dependencies, which complicate cross-compilation. Relying on[replace_requires]
for these can be considered as an alternative as well, though.PKG_CONFIG_PATH
of the systempkg-config
if.../system
dependencies are used.cpp_info.merge(...)
to simplify the AutotoolsDeps workaround for MSVC.Regarding the
tools.build:compiler_executables
handling, replacingAutotoolsToolchain
withGnuToolchain
would make it a bit cleaner, but it's still in incubation and would require a newer Conan version. Something like conan-io/conan#17602 would be even better, or at least clearer conventions how the less common build tools should correctly be passed via the profile (whether env vars or the config param should be preferred, or both?).Logs
Tested with gcc-13-aarch64-linux-gnu with no build-essentials, to be stricter about
cc
orgcc
not being silently used as the host compiler: https://gist.github.com/valgur/5a550530a55b0df98016b89dbb25d861