media-video/ffmpeg-5.1.2-r1[vulkan] fails to build with: --- x86_64-pc-linux-gnu-gcc -I. -Isrc/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_av util -O2 -march=native -pipe -fuse-linker-plugin -Wl,-flto -ftree-vectorize -falign-functions=32 -fgraphite-identity -floop-nest-optimize -fno-common -march=skylake -std=c11 -fPIC -pthre ad -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libdrm -I/usr/include/freetype2 -I/usr/incl ude/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/openjp eg-2.5 -I/usr/include/opus -I/usr/include/opus -D_REENTRANT -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/libmoun t -I/usr/include/blkid -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -pthread -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/p ixman-1 -I/usr/include/srt -I/usr/include/libvmaf -DX264_API_IMPORTS -I/usr/include/libdrm -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -W redundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused- const-variable -Wno-bool-operation -Wno-char-subscripts -O2 -march=native -pipe -fuse-linker-plugin -Wl,-flto -ftree-vectorize -falign-functions=32 -fgraphite-identity -floop-nest-optimize -f no-common -fno-math-errno -fno-signed-zeros -flto -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized -I/usr/include/SDL2 -D_REENTRANT -MMD -MF libavutil/sha.d -MT libavutil/sha.o -c -o libavutil/sha.o src/libavutil/sha.c src/libavutil/hwcontext_vulkan.c:363:7: error: ‘VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME’ undeclared here (not in a function); did you mean ‘VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME’? 363 | { VK_EXT_VIDEO_DECODE_H264_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME src/libavutil/hwcontext_vulkan.c:364:7: error: ‘VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME’ undeclared here (not in a function); did you mean ‘VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME’? 364 | { VK_EXT_VIDEO_DECODE_H265_EXTENSION_NAME, FF_VK_EXT_NO_FLAG }, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME make: *** [/var/tmp/portage/media-video/ffmpeg-5.1.2-r1/work/ffmpeg-5.1.2/ffbuild/common.mak:81: libavutil/hwcontext_vulkan.o] Error 1 --- dev-util/vulkan-headers-1.3.239::gentoo media-video/ffmpeg-5.1.2-r1:0/57.59.59::gentoo USE="X alsa amr bluray bzip2 dav1d encode fontconfig gpl gsm iconv jpeg2k lcms libaom libdrm librtmp lzma mp3 network openal o pencl opengl openssl opus pic postproc pulseaudio sdl snappy speex srt ssh svg theora threads truetype vaapi vmaf* vorbis vpx vulkan webp x264 x265 xvid zlib -amf -amrenc (-appkit) -bs2b -cdi o -chromaprint -chromium -codec2 -cpudetection -cuda -debug -doc -fdk -flite -frei0r -fribidi -gcrypt -gme -gmp -gnutls -hardcoded-tables -iec61883 -ieee1394 -jack -jpegxl -kvazaar -ladspa -l ibaribb24 -libass -libcaca -libilbc -libplacebo -libsoxr -libtesseract -libv4l -libxml2 -lv2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -nvenc -openh264 -oss -qsv -rav1e -rubberban d -samba -sndio -static-libs -svt-av1 -test -twolame -v4l -vdpau -verify-sig -vidstab -zeromq -zimg -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" Reproducible: Always
The same issue occurred in Arch: https://aur.archlinux.org/packages/lib32-libffmpeg#comment-900502 The fix applied in that case was to cherry pick https://github.com/FFmpeg/FFmpeg/commit/eb0455d646
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b55c0c7c8699e2e51f1d861c3abf16b75204fd09 commit b55c0c7c8699e2e51f1d861c3abf16b75204fd09 Author: Craig Andrews <candrews@gentoo.org> AuthorDate: 2023-02-13 13:23:37 +0000 Commit: Craig Andrews <candrews@gentoo.org> CommitDate: 2023-02-13 22:43:38 +0000 media-video/ffmpeg: fix build when USE=vulkan Closes: https://bugs.gentoo.org/894122 Signed-off-by: Craig Andrews <candrews@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/29571 Signed-off-by: Craig Andrews <candrews@gentoo.org> media-video/ffmpeg/ffmpeg-5.1.2-r1.ebuild | 3 +- media-video/ffmpeg/files/ffmpeg-5.1.2-vulkan.patch | 33 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-)