This is was hit on a default/linux/amd64/17.1/systemd/clang/merged-usr system. But looking at the forum post it seems to be a problem on amd64/gcc as well. Reproducible: Always Steps to Reproduce: 1. emerge media-video/ffmpeg-4.4.3 with USE=abi_x86_32 Actual Results: In file included from src/libavcodec/hevc_cabac.c:27: In file included from src/libavcodec/cabac_functions.h:47: src/libavcodec/x86/cabac.h:195:9: error: inline assembly requires more registers than available BRANCHLESS_GET_CABAC("%0", "%q0", "(%4)", "%1", "%w1", Expected Results: compile without error. https://forums.gentoo.org/viewtopic-t-1162301.html https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257124: here it seems to be a clang specific bug but looking at the first link this does seem to affect gcc too.
Created attachment 857537 [details] build.log
Created attachment 857539 [details] emerge --info
Suspect this is actually the same as bug 900937 but with a different (better) error message. Let's use bug 900937 for the GCC hang (which is wrong even on invalid input) and this bug for ffmpeg failing to build with clang (and likely gcc once bug 900937 is fixed).
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60b38d402d8674ea08c9b69cf3147e0b92ab87c2 commit 60b38d402d8674ea08c9b69cf3147e0b92ab87c2 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-03-15 02:13:59 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-03-15 02:14:48 +0000 media-video/ffmpeg: fix build on register-starved x86 Newer compilers may optimise such that < 7 registers are free on 32-bit x86 and then we get an "invalid asm" error. This is https://bugs.gentoo.org/901099 and https://trac.ffmpeg.org/ticket/8903. Making matters worse, GCC sometimes hangs on invalid asm, so this also mitigates a hang with e.g. -O3 -march=znver1. See https://bugs.gentoo.org/900937 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137. In future, we may want to adjust the definition of HAVE_7REGS to just exclude 32-bit x86, but that's a big sledgehammer, so let's avoid it for now until we have a reply on the upstream ffmpeg bug. Thanks to Ninpo. Bug: https://trac.ffmpeg.org/ticket/8903 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137 Bug: https://bugs.gentoo.org/900937 Closes: https://bugs.gentoo.org/901099 Signed-off-by: Sam James <sam@gentoo.org> media-video/ffmpeg/ffmpeg-4.4.3.ebuild | 3 ++- media-video/ffmpeg/ffmpeg-5.1.2-r1.ebuild | 3 ++- media-video/ffmpeg/ffmpeg-6.0.ebuild | 3 ++- .../ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch | 24 +++++++++++++++++++++ .../ffmpeg-5.1.2-get_cabac_inline_x86-32-bit.patch | 25 ++++++++++++++++++++++ 5 files changed, 55 insertions(+), 3 deletions(-)