/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libavutil/libavutil.a(vulkan.o):(.rodata+0x60): multiple definition of `ff_comp_identity_map'; libavcodec/libavcodec.a(vulkan.o):(.rodata+0x60): first defined here collect2: error: ld returned 1 exit status make: *** [/var/tmp/portage/media-video/ffmpeg-6.1/work/ffmpeg-6.1/ffbuild/libffmpeg.mak:14: libffmpeg.so] Error 1 # USE="-vulkan" emerge =media-video/ffmpeg-6.1 Successfully builds. Build log: https://pastebin.com/snmcFyFV (truncated as full log rather large) Have rebuilt vulkan headers/tools/loader to no benefit, continues to fail building. Reproducible: Always Steps to Reproduce: 1. # USE="vulkan" emerge =media-video/ffmpeg-6.1 2. Actual Results: Fails Expected Results: ffmpeg compiles +vulkan
Created attachment 875415 [details] emerge --info
Created attachment 875416 [details] build.log
Clang also has issues with the vulkan stuff but gives very different errors: rc/libavcodec/vulkan_av1.c:183:43: error: incompatible pointer to integer conversion initializing 'VkVideoSessionParametersKHR' (aka 'unsigned long long') with an expression of type 'void *' [-Wint-conversion] 183 | .videoSessionParametersTemplate = NULL, | ^~~~ /usr/lib/llvm/17/bin/../../../../lib/clang/17/include/stddef.h:89:16: note: expanded from macro 'NULL' 89 | # define NULL ((void*)0) | ^~~~~~~~~~ 1 error generated. make: *** [/var/tmp/portage/media-video/ffmpeg-6.1/work/ffmpeg-6.1/ffbuild/common.mak:81: libavcodec/vulkan_av1.o] Error 1 make: *** Waiting for unfinished jobs.... src/libavcodec/vulkan_h264.c:318:43: error: incompatible pointer to integer conversion initializing 'VkVideoSessionParametersKHR' (aka 'unsigned long long') with an expression of type 'void *' [-Wint-conversion] 318 | .videoSessionParametersTemplate = NULL, | ^~~~ /usr/lib/llvm/17/bin/../../../../lib/clang/17/include/stddef.h:89:16: note: expanded from macro 'NULL' 89 | # define NULL ((void*)0) | ^~~~~~~~~~ 1 error generated. make: *** [/var/tmp/portage/media-video/ffmpeg-6.1/work/ffmpeg-6.1/ffbuild/common.mak:81: libavcodec/vulkan_h264.o] Error 1 src/libavcodec/vulkan_hevc.c:656:43: error: incompatible pointer to integer conversion initializing 'VkVideoSessionParametersKHR' (aka 'unsigned long long') with an expression of type 'void *' [-Wint-conversion] 656 | .videoSessionParametersTemplate = NULL, | ^~~~ /usr/lib/llvm/17/bin/../../../../lib/clang/17/include/stddef.h:89:16: note: expanded from macro 'NULL' 89 | # define NULL ((void*)0) | ^~~~~~~~~~ 1 error generated. make: *** [/var/tmp/portage/media-video/ffmpeg-6.1/work/ffmpeg-6.1/ffbuild/common.mak:81: libavcodec/vulkan_hevc.o] Error 1 src/libavcodec/vulkan_decode.c:191:26: error: incompatible pointer to integer conversion assigning to 'VkImageView' (aka 'unsigned long long') from 'void *' [-Wint-conversion] 191 | vkpic->img_view_ref = NULL; | ^ ~~~~ src/libavcodec/vulkan_decode.c:192:26: error: incompatible pointer to integer conversion assigning to 'VkImageView' (aka 'unsigned long long') from 'void *' [-Wint-conversion] 192 | vkpic->img_view_out = NULL; | ^ ~~~~ src/libavcodec/vulkan_decode.c:193:26: error: incompatible pointer to integer conversion assigning to 'VkImageView' (aka 'unsigned long long') from 'void *' [-Wint-conversion] 193 | vkpic->img_view_dest = NULL; | ^ ~~~~ 3 errors generated. make: *** [/var/tmp/portage/media-video/ffmpeg-6.1/work/ffmpeg-6.1/ffbuild/common.mak:81: libavcodec/vulkan_decode.o] Error 1
I also got linker erros when compiling media-video/ffmpeg (+vulkan) with GCC. Full build log: https://bin.disroot.org/?7931a43b7222673e#GS5eCTMaY2ZLpRGi68TpGom23AedU8i2nyW9DktWXCZp emerge -pqv '=media-video/ffmpeg-6.1::gentoo': [ebuild U ] media-video/ffmpeg-6.1 [6.0.1] USE="X alsa bzip2 chromium dav1d encode fontconfig gnutls gpl iconv jpegxl lcms libaom libplacebo libxml2 lzma mp3 network opencl opengl opus postproc pulseaudio samba sdl svg svt-av1 theora threads truetype vaapi vorbis vpx vulkan webp x264 x265 xvid zlib -amf -amr -amrenc (-appkit) -bluray -bs2b -cdio -chromaprint -codec2 -cpudetection -cuda -debug -doc -fdk -flite -frei0r -fribidi -gcrypt -glslang% -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libaribb24 -libass -libcaca -libdrm -libilbc -librtmp -libsoxr -libtesseract -libv4l -lv2 (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -nvenc -openal -openh264 -openssl -oss -pic -qsv -rav1e -rubberband -shaderc% -snappy -sndio -speex -srt -ssh -static-libs -test -twolame -v4l -vdpau -verify-sig -vidstab -vmaf -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"
Created attachment 875423 [details] emerge --info
(In reply to Mike Lothian from comment #3) > Clang also has issues with the vulkan stuff but gives very different errors: > New bug please with the full log.
USE="-opencl" Built fine on my laptop but not on my desktop that has a more complex use flag setup. Comparing the two and the use flags from Jorge in comment 6, I started experimenting with removing use flags, one at a time. Command that got FFMPEG-6.1 to build without error: USE='-opencl' emerge -1av ffmpeg Hope that helps people.
(In reply to Ben Cunningham from comment #7) > USE="-opencl" > > Built fine on my laptop but not on my desktop that has a more complex use > flag setup. Comparing the two and the use flags from Jorge in comment 6, I > started experimenting with removing use flags, one at a time. > > Command that got FFMPEG-6.1 to build without error: > USE='-opencl' emerge -1av ffmpeg > > Hope that helps people. I would suggest to you that you have hit a different issue and may be worth it's own bug. This particular issue is +vulkan. P.S I don't seem to have issues with opencl, both my desktop and binhost build 6.1 fine with (-vulkan +opencl)
I think this is an opencl/rusticl + vulkan issue Things compile fine with USE="-opencl vulkan" or USE="opencl -vulkan" but not USE="opencl vulkan" which gets the duplicated symbols
Just two questions. In the practical sense, is there any use for +opencl or +vulkan on ffmpeg? I can't see any benefit from ffmpeg using GPU compilers. Also, if they are using the same headers/symbols, is there any real difference by using one or another for ffmpeg?
As a replacement/upgrade of OpenGL, doesn't using Vulkan allow for graphics acceleration while watching video?
(In reply to Pablo Cholaky from comment #10) > Just two questions. > > In the practical sense, is there any use for +opencl or +vulkan on ffmpeg? I > can't see any benefit from ffmpeg using GPU compilers. > > Also, if they are using the same headers/symbols, is there any real > difference by using one or another for ffmpeg? GPU accelerated decoding: https://www.phoronix.com/news/FFmpeg-6.1-Released
I had the same issue and can confirm that ffmpeg 6.1 builds without opencl now.
Appears to be resolved with ffmpeg-6.1-r1. Closing