media-video/ffmpeg-4.4.1-r1 fails to build on arm64 with error message: --cpu=host not supported with compiler aarch64-unknown-linux-gnu-gcc COMMON_FLAGS without "-march=native" leads to a successfull build. Emerge info: Portage 3.0.28 (python 3.9.9-final-0, default/linux/arm64/17.0/desktop, gcc-11.2.0, glibc-2.33-r7, 5.15.11-gentoo-dist aarch64) ================================================================= System uname: Linux-5.15.11-gentoo-dist-aarch64-with-glibc2.33 KiB Mem: 8129872 total, 3086312 free KiB Swap: 4194300 total, 4189180 free Timestamp of repository gentoo: Mon, 27 Dec 2021 10:45:01 +0000 Head commit of repository gentoo: 2b54c183b1dac234b44a88187722fe093900d4b5 sh bash 5.1_p8 ld GNU ld (Gentoo 2.37_p1 p0) 2.37 app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p8::gentoo dev-lang/perl: 5.34.0-r3::gentoo dev-lang/python: 3.9.9::gentoo, 3.10.0_p1::gentoo dev-lang/rust: 1.56.1::gentoo dev-util/cmake: 3.21.4::gentoo dev-util/meson: 0.59.4::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.4::gentoo sys-devel/binutils: 2.37_p1::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/gcc: 11.2.0::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 13.0.0::gentoo sys-devel/llvm: 13.0.0::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://heimdall.smash-net.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 ACCEPT_KEYWORDS="arm64" ACCEPT_LICENSE="*" CBUILD="aarch64-unknown-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/cache/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-march=native -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=native -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="de" MAKEOPTS="-j4" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa arm64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvdr elogind emboss encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Please do include the build.log of it failing too. I'm pretty sure i've built this on arm64 with -march=native which is interesting.
Created attachment 760656 [details] ffmpeg build log
Created attachment 766642 [details] Build log for media-video/ffmpeg-4.4.1-r2 with no march/mtune set On my KVM hosted gentoo on armv8-a machine (Apple M1) this also fails without any -march or -mtune
(In reply to Peer from comment #3) > Created attachment 766642 [details] > Build log for media-video/ffmpeg-4.4.1-r2 with no march/mtune set > > On my KVM hosted gentoo on armv8-a machine (Apple M1) this also fails > without any -march or -mtune Could you share ffbuild/config.log too?
Created attachment 766650 [details] ffbuild/config.log please be aware that the compile was run with CFLAGS="-O2 -pipe" emerge --ignore-default-opts media-video/ffmpeg
Thanks. See also: https://forums.gentoo.org/viewtopic-t-1069866-start-0.html.
*** Bug 852803 has been marked as a duplicate of this bug. ***
*** Bug 852818 has been marked as a duplicate of this bug. ***
I am also hitting this issue. With both 4.4.2 and 4.4.3. I am surprised 4.4.2 is stabilized regardless of this bug. I have been looking for a definition on what the build system uses --cpu for, but can't seem to find it documented anywhere. Does it do anything -march=native and --disable-runtime-cpudetect doesn't? Does it select the cpu for the disabled runtime checks? Assuming it does something, I still vote having this configure flag(s) not added on arm64 for the time being. Not that I don't want the deeper issue to be resolved ofc
I just saw the forum post you sent sam_, missed that earlier. If the issue here is really the ffmpeg build system not knowing my cpu, this error message is fairly misleading. I also just noticed that I'm the first person to hit this in half a year. Attaching my emerge --info: (CPU is a snapdragon 662) Portage 3.0.38.1 (python 3.10.8-final-0, default/linux/arm64/17.0, gcc-11.3.0, glibc-2.35-r8, 4.19.157-perf-halium-qx1050 aarch64) ================================================================= System uname: Linux-4.19.157-perf-halium-qx1050-aarch64-with-glibc2.35 KiB Mem: 5802660 total, 1359588 free KiB Swap: 3145724 total, 2271524 free Timestamp of repository gentoo: Wed, 16 Nov 2022 17:30:01 +0000 Head commit of repository gentoo: 25080fed8a2e6f4d603bed188342b9569d960b3e sh bash 5.1_p16-r2 ld GNU ld (Gentoo 2.38 p4) 2.38 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r2::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.1-r4::gentoo dev-lang/python: 2.7.18_p16::gentoo, 3.10.8_p2::gentoo, 3.11.0_p1::gentoo dev-lang/rust: 1.64.0-r1::gentoo dev-util/cmake: 3.24.2::gentoo dev-util/meson: 0.63.2-r1::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/openrc: 0.45.2-r1::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.13-r6::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.38-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/gcc: 11.3.0::gentoo sys-devel/gcc-config: 2.8::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.35-r8::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 ACCEPT_KEYWORDS="arm64" ACCEPT_LICENSE="@FREE" CBUILD="aarch64-unknown-linux-gnu" CFLAGS="-O3 -march=native -flto -pipe" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O3 -march=native -flto -pipe" DISTDIR="/var/cache/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O3 -march=native -flto -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans usersandbox usersync xattr" FFLAGS="-O3 -march=native -flto -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j7" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X acl arm64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl test-rust unicode wayland xattr zlib" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 871837 [details, diff] Dirty workaround I get the same issue on a Apple M2. The problem for me is basically this: # gcc -v -E -x c /dev/null -o /dev/null -march=native 2>&1 | grep /cc1 /usr/libexec/gcc/aarch64-unknown-linux-gnu/13/cc1 -E -quiet -v /dev/null -o /dev/null -mlittle-endian -mabi=lp64 -dumpbase null # gcc -v -E -x c /dev/null -o /dev/null -mcpu=native 2>&1 | grep /cc1 /usr/libexec/gcc/aarch64-unknown-linux-gnu/13/cc1 -E -quiet -v /dev/null -o /dev/null -mlittle-endian -mabi=lp64 -dumpbase null # gcc -v -E -x c /dev/null -o /dev/null -march=native -mcpu=native 2>&1 | grep /cc1 /usr/libexec/gcc/aarch64-unknown-linux-gnu/13/cc1 -E -quiet -v /dev/null -o /dev/null -mlittle-endian -mabi=lp64 -march=armv8-a+crc+lse+rcpc+rdma+dotprod+aes+sha3+fp16fml+sb+ssbs+i8mm+bf16+flagm+pauth -dumpbase null See how it repeats -march= with some values only when BOTH -march and -mcpu are given. My understanding is that -mcpu should be enough. I think this might be a combination of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110901 and gcc just not knowing anything about the Apple CPUs or something along those lines. If you are on arm64, then you should look at -mcpu if your intention is to get the most optimized code for the given CPU - -march=native alone does NOT provide that on Aarch64 GCC. The ffmpeg configure test does not use provided CFLAGS and makes separate tests for -march=native and -mcpu=native, trying to find a -march= and -mcpu= (respectively) from the output. Thus I hacked around it with the attached patch, but it's very dirty one and mustn't be used generically as it breaks amd64, etc. Maybe a suitable generically applicable workaround would be to add a third test for gcc that would also test with both -march=native and -mcpu=native and then try to find -march from the output. I didn't bother with this, because 1. It's questionable check in ffmpeg configure in the first place - we should understand why it's even doing these checks 2. It feels like it's an underlying gcc bug to be fixed
My case does not feel relevant to the original report, as I don't see how COMMON_FLAGS would affect what I found, but it feels relevant to comment #3 case.
(In reply to Mart Raudsepp from comment #11) > Created attachment 871837 [details, diff] [details, diff] > Dirty workaround > [...] Filed as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113257.
I ran into this error on a RK3399 (in a pinebook pro). My COMMON_FLAGS is `-Os -pipe -march=native`. Playing with `gcc -v` I see `-march=native` and `-mcpu=native` both result in the same thing: `-mcpu=cortex-a72.cortex-a53+crc+crypto`. This is true when they are used separate or together. I worked around the problem by creating a /etc/portage/env/ffmpeg.conf with: # ffmpeg configure does weird stuff that doesn't work with -march=native on arm64 COMMON_FLAGS="-Os -pipe -mcpu=cortex-a72.cortex-a53+crc+crypto" CFLAGS="${COMMON_FLAGS}" CXXFLAGS="${COMMON_FLAGS}" FCFLAGS="${COMMON_FLAGS}" FFLAGS="${COMMON_FLAGS}" And then reference that in /etc/portage/package.env/ .
Can confirm this also manifests when compiling on arm64. Workaround of removing -march=native from common flags and instead replacing with -mtune=cortex-a72 does indeed permit the package to build.
Still experiencing this issue when emerging FFmpeg 6.1.2
Thanks to the efforts of Tamar upstream in GCC, the comment #3 case / Apple HW issues should be fixed with the next GCC 14 snapshot once keyworded/stabled. The other issue lurking needs investigation (though not impossible that Tamar's fix for the other bug wrt assembler could help).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00eddc65d7bd9ecaa9973fd46e544bbbfe5c9479 commit 00eddc65d7bd9ecaa9973fd46e544bbbfe5c9479 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2025-03-07 13:02:23 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2025-03-11 09:03:17 +0000 media-video/ffmpeg: rewrite live ebuild This does not list all changes compared to original due to being essentially a rewrite (not much sense in looking at the diff given almost no lines in common), but to list or explain notable ones: * Cleanup a lot of obsolete logic, like mirror://gentoo snapshots, SCM type, <openssl-3 handling, etc... * Re-arrange IUSE=soc handling to drop the IUSE when FFMPEG_SOC_PATCH is empty until maintainer of the patch has time to look at that (easier to bump without it and removes the need to mask in 9999) * Drop some IUSE, ffmpeg has a bit too many often confusing users and, while debatable, some are not really useful to control bare at most for expert user that could use EXTRA_ECONF if *really* wanted: - debug (disabled): does very little beside override users' -g*, albeit if want nasm debug symbols will need to set X86ASMFLAGS. - encode (enabled): debated keeping it for disabling encoders without their own USE for bit of size/build time reduction despite no dependencies, but feel it is not really worth it as it complicates the ebuild and can break expectations for a lot of revdeps (many likely lack the [encode] that they need) -- removal also handles bug #770439 - fftools_* (disabled): almost no distros install these, many have rather generic names, we were missing installing new ones, upstream ffmpeg does not even have an install target for them, and a global USE_EXPAND for this feels wasteful (*could* consider adding a all-in-one IUSE=tools if some are wanted by users anyway but let us try without and see if anyone complains) - glslang (disabled): redundant with USE=shaderc and is a pain to use directly given glslang often breaks things, esp. worse for packages with a slow release cycle and old LTS versions like ffmpeg (bug #918989, bug #920283, bug #922333, bug #922433) -- upstream also seems to favour shaderc: "libshaderc and libglslang are mutually exclusive, if in doubt, disable libglslang" (from ./configure) - harcoded-tables (disabled): off by default upstream and listed as a "experts only" option that seemingly provide little gains for a notable size increase, do not believe it is worth exposing as a USE - iconv (enabled): virtual/libiconv is essentially free anywhere but prefix and disabling iconv can be rather broken for a few things - network (enabled): no dependencies, fairly small, and many revdeps likely expect it to be enabled and just missing the [network] (tempting to do the same with USE=postproc but it would still be conditional through USE=gpl and be more confusing, and then forcing GPL also has its own issues) - oss (auto): does not have a dedicated option and just checks linux-headers and is very small, hardly anyone need this but that argument could be applied to a *ton* of in/outdevs, filters, de/encoders, and such and we would never see the end of it - pic (enabled): makes little sense not to enable nowadays and handles bug #903754 + bug #916067 -- USE had the secondary effect of disabling x86-32 asm which still doing given it is difficult to support either way due to textrels and >=binutils-2.41's enforcing (bug #916067, bug #920808), and it is possibly broken for older hardware (bug #733556) -- as a minor bonus, this should also let LTO work with abi_x86_32 (bug #654118) - static-libs (disabled): cannot think of much of a use for this esp. given how massive these libraries are and it would still require to link with all its shared-only dependencies - test (irrelevant): tests are not gone but there is no dependencies (bc and wget are not needed) nor REQUIRED_USE to handle anymore, thus USE is useless - threads (auto): no real sense in disabling (bug #868471), and leaving it auto let ffmpeg figure out the right implementation to use which in most cases means default --enable-pthreads - cpu_flags_* + cpudetection (enabled): tentatively anyway, just let ffmpeg do its thing normally -- simplifies the ebuild a lot, "should" fix bug #915384, and also handles whatever ebuild was doing wrong wrt bug #752507 + bug #778035 (one minor "issue" however is that all these flags being removed will leave users confused as to what happened, if reading this and worried about optimizations.. then no they are *not* disabled, and it is fine for other machines thanks to detection at runtime) * New IUSE: - openmpt: requested in bug #921313 - npp: requested in bug #695210 -- note have not tested the arm64 (sbsa) support, but it should work in theory as cuda toolkit does install npp prebuilt arm64 libraries - rabbitmq: trivial, may as well add support (meant to add more but others did not fare as well and will leave for later rather than during big changes, kept some minor notes in the ebuild about things still not supported) * Renamed IUSE: - mp3->lame: this is only for encoding but it made it "sound" needed for decoding (not the only case like this but this one felt too generic), may surprise those that had it actually enabled for encoding - libxml2->xml and libdrm->drm: given newly enabling these by default (see below), it's a good occasion to rename to the more commonly used USE without causing issues - libv4l->v4l: to be precise IUSE=v4l was removed and it gained the meaning that IUSE=libv4l had -- old v4l is always enabled (if linux) due to the hard dependency on linux-headers (see below) -- given the old REQUIRED_USE with libv4l? ( v4l ), all users of libv4l will have the new USE enabled already - libdvdnav+libdvdread->dvd(combined): similar to mpv, simpler for users when they just want dvds to work than worry about each library (dvd support is new in ffmpeg-7, so this only ever been masked) * Enable a few extra IUSE by default that, while not everyone needs, are useful and have dependencies that many users will already have. - libass,truetype,fontconfig: for proper text/subtitles drawing (kdenlive also wants [libass]), albeit video players tend to have their own handling (that pull the same depdencies) - drm: used in various pieces of code and little reason to disable when mesa depends on libdrm either way - xml: needed for DASH-type streams, notably used by youtube, and about everyone has libxml2 (one downside of new defaults is MULTILIB_USEDEP, users that only selectively enable abi_x86_32 rather than globally may be faced with conflicts when updating) * Always depend on linux-headers if linux, not *required* (except for v4l) but this prevents a lot of automagic and going through alternate code paths if missing (also go with >=6 which is needed for v4l2m2m and I believe also USE=soc for v4l2request) * Add missing vulkan-headers dependency wrt bug #865201, and also opencl-headers wrt bug #941506 (not 100% sure that this is what happened for the latter, but given binhost is setup it is likely). * Bump nv-codec-headers min req to 12.1.14.0, while not *required* it spares us for setting up ranges and 11.x is due for cleanup. * Add missing x11-base/xorg-proto wrt bug #934196 -- technically was longer an issue given libX11 RDEPENDs on it "now", but would still rather keep these for now. * Depend on >=librsvg-2.52 wrt bug #918613, USE=svg is not essential for arches without rust and upstream bug been went 1.5 years without activity. * Update REQUIRED_USE a bit, cuda does not *need* nvenc (just get one filter in less), libplacebo does nothing without sdl(ffplay) or vulkan, and few others like these (likely still missing some). * Drop musl HAVE_POSIX_IOCTL workaround, this is automatically set by ./configure since ffmpeg-7.1. However, note that there is another related issue with libv4l (not v4l) that is not fixed (bug #911499). * No longer ignore ffmpeg-spec-disposition test, fixed in 7.1.1. * Fix verify-sig paths on prefix wrt bug #947253 (untested) * No longer pass e.g. --disable-indev=alsa when already doing --disable-alsa, ./configure seem to figure this out just fine. * No longer pass --cpu, this expects the -march=<exact> reported by the compiler or probes compiler with =native if =host), however it does not account for -mno-* both passed or implied by =native and could enable things it shouldn't. Furthermore, it adds -march=<exact> after the users' -march=native (which is more correct, can enable or disable additional features). This option only seem like trouble and likely does not get tested much. Removing also handles bug #830165 albeit ffmpeg-chromium is still affected. * Replace EXTRA_FFMPEG_CONF by EXTRA_ECONF, while it is not using econf nor autoconf, the latter is more widely known while the former needs users to look at the ebuild -- also die if old variable is set so users know about this change. * Skip installing doc/*.txt, that seems mostly oriented at ffmpeg devs, and feels noisy in the docdir, but do keep doc/APIChanges * Replace all *GPL* by the + version given ./configure always output with "or later" when listing the final license. * Maybe not best way to go about this, but when doing incompatible --enable-gpl --enable-nonfree, on top of the RESTRICT="bindist" also add "all-rights-reserved" so a typical freedom ACCEPT_LICENSE can block it. * Rearrange chromium patch a bit to need less ebuild logic, and make it unused for ffmpeg-compat. * Drop EGIT_MIN_CLONE_TYPE, shallow clones seem fine now? If not, could consider just using the official github mirror by default. List of closed bugs may not be complete, plans are to recheck still-open bugs after this is merged. Bug: https://bugs.gentoo.org/830165 Closes: https://bugs.gentoo.org/654118 Closes: https://bugs.gentoo.org/695210 Closes: https://bugs.gentoo.org/733556 Closes: https://bugs.gentoo.org/752507 Closes: https://bugs.gentoo.org/770439 Closes: https://bugs.gentoo.org/778035 Closes: https://bugs.gentoo.org/865201 Closes: https://bugs.gentoo.org/868471 Closes: https://bugs.gentoo.org/903754 Closes: https://bugs.gentoo.org/915384 Closes: https://bugs.gentoo.org/916067 Closes: https://bugs.gentoo.org/918613 Closes: https://bugs.gentoo.org/918989 Closes: https://bugs.gentoo.org/920283 Closes: https://bugs.gentoo.org/920808 Closes: https://bugs.gentoo.org/921313 Closes: https://bugs.gentoo.org/922333 Closes: https://bugs.gentoo.org/922433 Closes: https://bugs.gentoo.org/934196 Closes: https://bugs.gentoo.org/941506 Closes: https://bugs.gentoo.org/947253 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> media-video/ffmpeg/ffmpeg-9999.ebuild | 1014 +++++++++++++--------------- media-video/ffmpeg/files/chromium-r3.patch | 53 ++ media-video/ffmpeg/metadata.xml | 8 + 3 files changed, 538 insertions(+), 537 deletions(-)
Still an issue on ffmpeg-6.1.2 with non-apple hardware.
(In reply to matoro from comment #19) > Still an issue on ffmpeg-6.1.2 with non-apple hardware. All that matters is if 6.1.2-*r1* fails.
(In reply to Sam James from comment #20) > (In reply to matoro from comment #19) > > Still an issue on ffmpeg-6.1.2 with non-apple hardware. > > All that matters is if 6.1.2-*r1* fails. Oops, forgot to --sync before running on this machine. Sorry!
ftr will drop ffmpeg-6.1.2 (-r0) today probably, so indeed.