Summary: | media-video/ffmpeg-7.1.1[libplacebo] - .../src/fftools/ffplay_renderer.c: In function 'hwctx_lock_queue': src/fftools/ffplay_renderer.c:147:11: error: unknown type name 'AVVulkanDeviceContext' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ernsteiswuerfel <erhard_f> |
Component: | Current packages | Assignee: | Ionen Wolkens <ionen> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chewi, erhard_f |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log.xz
emerge --info |
Created attachment 926228 [details]
emerge --info
Hm, haven't build tested yet but (at a glance) there may be several issues AVVulkanDeviceContext is only defined with ffmpeg[vulkan] but you also have ffmpeg[-vulkan] there, thus the error about it being missing. It also uses SDL_Vulkan_GetVkGetInstanceProcAddr, but there is no dependency on libsdl2[vulkan]. As for libplacebo[vulkan], I'm not quite sure what logic it uses to pickup that it has vulkan or not, I just see a placebo API and SDL version check: #if (SDL_VERSION_ATLEAST(2, 0, 6) && CONFIG_LIBPLACEBO) /* Get PL_API_VER */ #include <libplacebo/config.h> #define HAVE_VULKAN_RENDERER (PL_API_VER >= 278) Beside that, ffplay seems to assume that vulkan is enabled on everything if USE="libplacebo sdl" is enabled. ...and if HAVE_VULKAN_RENDERER is false somehow, then I think ffplay will not use libplacebo at all making it meaningless to enable the USE unless also have ffmpeg[vulkan] for the libplacebo filters. Currently REQUIRED_USE is libplacebo? ( || ( sdl vulkan ) ) because libplacebo code is only used with ffplay(sdl) or with vulkan, but that should likely be libplacebo? ( vulkan ). Then should require vulkan on sdl if libplacebo is set, and always require libplacebo[vulkan] (the --enable-libplacebo option checks for pl_vulkan_create, but that's just a stub if libplacebo[-vulkan]). The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1af6bbd5b01107ee0598a859aa5902c9fcf3c2a commit d1af6bbd5b01107ee0598a859aa5902c9fcf3c2a Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2025-04-27 00:34:33 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2025-04-27 00:47:40 +0000 media-video/ffmpeg: tighten vulkan dependencies with libplacebo See bug #954764 comment #2 for explanations. Technically needs a revbump, but do not want to revbump ffmpeg too much given still a decently long build that is on many users' systems, and most of them do not enable libplacebo. At worst, if a user does -vulkan on dependencies after a successful build, only ffplay or specific filters will be broken and not the ffmpeg libraries thanks to stubs. Closes: https://bugs.gentoo.org/954764 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> media-video/ffmpeg/ffmpeg-6.1.2-r1.ebuild | 9 ++++++--- media-video/ffmpeg/ffmpeg-7.1.1.ebuild | 9 ++++++--- media-video/ffmpeg/ffmpeg-9999.ebuild | 9 ++++++--- profiles/arch/hppa/package.use.mask | 4 +++- 4 files changed, 21 insertions(+), 10 deletions(-) |
Created attachment 926227 [details] build.log.xz ffmpeg-7.1.1[libplacebo] seems to have a silent dependency on media-libs/libplacebo-7.349.0[vulkan]. When libplacebo is built with without USE=vulkan I get this at building ffmpeg-7.1.1 with USE=libplacebo: [...] powerpc64-unknown-linux-gnu-gcc -I. -Isrc/ -D_ISOC11_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -O2 -mcpu=power9 -mtune=power9 -pipe -std=c17 -fPIC -maltivec -mabi=altivec -pthread -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -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/dvdcss -I/usr/include/dvdcss -I/usr/include/freetype2 -I/usr/include/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/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/opus -I/usr/include/opus -D_REENTRANT -I/usr/include/webp -I/usr/include/webp -DX264_API_IMPORTS -I/usr/include/libxml2 -I/usr/include/libdrm -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-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 -fno-math-errno -fno-signed-zeros -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 -I/usr/include/SDL2 -D_REENTRANT -MMD -MF fftools/ffplay_renderer.d -MT fftools/ffplay_renderer.o -c -o fftools/ffplay_renderer.o src/fftools/ffplay_renderer.c In file included from /usr/include/SDL2/SDL_stdinc.h:33, from /usr/include/SDL2/SDL_main.h:25, from /usr/include/SDL2/SDL.h:31, from src/fftools/ffplay_renderer.h:22, from src/fftools/ffplay_renderer.c:23: /usr/include/SDL2/SDL_config.h:206:9: warning: "HAVE_PTHREAD_SETNAME_NP" redefined 206 | #define HAVE_PTHREAD_SETNAME_NP 1 | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from src/fftools/ffplay_renderer.c:22: ./config.h:336:9: note: this is the location of the previous definition 336 | #define HAVE_PTHREAD_SETNAME_NP 0 | ^~~~~~~~~~~~~~~~~~~~~~~ src/fftools/ffplay_renderer.c: In function 'hwctx_lock_queue': src/fftools/ffplay_renderer.c:147:11: error: unknown type name 'AVVulkanDeviceContext'; did you mean 'AVDRMDeviceContext'? 147 | const AVVulkanDeviceContext *hwctx = avhwctx->hwctx; | ^~~~~~~~~~~~~~~~~~~~~ | AVDRMDeviceContext src/fftools/ffplay_renderer.c:148:10: error: request for member 'lock_queue' in something not a structure or union 148 | hwctx->lock_queue(avhwctx, qf, qidx); | ^~ src/fftools/ffplay_renderer.c: In function 'hwctx_unlock_queue': src/fftools/ffplay_renderer.c:154:11: error: unknown type name 'AVVulkanDeviceContext'; did you mean 'AVDRMDeviceContext'? 154 | const AVVulkanDeviceContext *hwctx = avhwctx->hwctx; | ^~~~~~~~~~~~~~~~~~~~~ | AVDRMDeviceContext src/fftools/ffplay_renderer.c:155:10: error: request for member 'unlock_queue' in something not a structure or union 155 | hwctx->unlock_queue(avhwctx, qf, qidx); | ^~ src/fftools/ffplay_renderer.c: In function 'create_vk_by_hwcontext': src/fftools/ffplay_renderer.c:229:5: error: unknown type name 'AVVulkanDeviceContext'; did you mean 'AVDRMDeviceContext'? 229 | AVVulkanDeviceContext *hwctx; | ^~~~~~~~~~~~~~~~~~~~~ | AVDRMDeviceContext src/fftools/ffplay_renderer.c:253:14: error: request for member 'get_proc_addr' in something not a structure or union 253 | if (hwctx->get_proc_addr != SDL_Vulkan_GetVkGetInstanceProcAddr()) { | ^~ src/fftools/ffplay_renderer.c:260:31: error: request for member 'get_proc_addr' in something not a structure or union 260 | ctx->get_proc_addr = hwctx->get_proc_addr; | ^~ src/fftools/ffplay_renderer.c:261:22: error: request for member 'inst' in something not a structure or union 261 | ctx->inst = hwctx->inst; | ^~ In file included from src/fftools/ffplay_renderer.c:39: src/fftools/ffplay_renderer.c:264:30: error: request for member 'inst' in something not a structure or union 264 | .instance = hwctx->inst, | ^~ src/fftools/ffplay_renderer.c:265:35: error: request for member 'get_proc_addr' in something not a structure or union 265 | .get_proc_addr = hwctx->get_proc_addr, | ^~ src/fftools/ffplay_renderer.c:266:33: error: request for member 'phys_dev' in something not a structure or union 266 | .phys_device = hwctx->phys_dev, | ^~ src/fftools/ffplay_renderer.c:267:36: error: request for member 'act_dev' in something not a structure or union 267 | .device = hwctx->act_dev, | ^~ src/fftools/ffplay_renderer.c:268:36: error: request for member 'enabled_dev_extensions' in something not a structure or union 268 | .extensions = hwctx->enabled_dev_extensions, | ^~ src/fftools/ffplay_renderer.c:269:36: error: request for member 'nb_enabled_dev_extensions' in something not a structure or union 269 | .num_extensions = hwctx->nb_enabled_dev_extensions, | ^~ src/fftools/ffplay_renderer.c:270:37: error: request for member 'device_features' in something not a structure or union 270 | .features = &hwctx->device_features, | ^~ src/fftools/ffplay_renderer.c:275:31: error: request for member 'queue_family_index' in something not a structure or union 275 | .index = hwctx->queue_family_index, | ^~ src/fftools/ffplay_renderer.c:276:31: error: request for member 'nb_graphics_queues' in something not a structure or union 276 | .count = hwctx->nb_graphics_queues, | ^~ src/fftools/ffplay_renderer.c:279:31: error: request for member 'queue_family_comp_index' in something not a structure or union 279 | .index = hwctx->queue_family_comp_index, | ^~ src/fftools/ffplay_renderer.c:280:31: error: request for member 'nb_comp_queues' in something not a structure or union 280 | .count = hwctx->nb_comp_queues, | ^~ src/fftools/ffplay_renderer.c:283:31: error: request for member 'queue_family_tx_index' in something not a structure or union 283 | .index = hwctx->queue_family_tx_index, | ^~ src/fftools/ffplay_renderer.c:284:31: error: request for member 'nb_tx_queues' in something not a structure or union 284 | .count = hwctx->nb_tx_queues, | ^~ src/fftools/ffplay_renderer.c: In function 'create_vk_by_placebo': src/fftools/ffplay_renderer.c:355:5: error: unknown type name 'AVVulkanDeviceContext'; did you mean 'AVDRMDeviceContext'? 355 | AVVulkanDeviceContext *vk_dev_ctx; | ^~~~~~~~~~~~~~~~~~~~~ | AVDRMDeviceContext src/fftools/ffplay_renderer.c:394:15: error: request for member 'lock_queue' in something not a structure or union 394 | vk_dev_ctx->lock_queue = placebo_lock_queue, | ^~ src/fftools/ffplay_renderer.c:395:23: error: request for member 'unlock_queue' in something not a structure or union 395 | vk_dev_ctx->unlock_queue = placebo_unlock_queue; | ^~ src/fftools/ffplay_renderer.c:394:48: warning: left-hand operand of comma expression has no effect [-Wunused-value] 394 | vk_dev_ctx->lock_queue = placebo_lock_queue, | ^ src/fftools/ffplay_renderer.c:397:15: error: request for member 'get_proc_addr' in something not a structure or union 397 | vk_dev_ctx->get_proc_addr = ctx->placebo_instance->get_proc_addr; | ^~ src/fftools/ffplay_renderer.c:399:15: error: request for member 'inst' in something not a structure or union 399 | vk_dev_ctx->inst = ctx->placebo_instance->instance; | ^~ src/fftools/ffplay_renderer.c:400:15: error: request for member 'phys_dev' in something not a structure or union 400 | vk_dev_ctx->phys_dev = ctx->placebo_vulkan->phys_device; | ^~ src/fftools/ffplay_renderer.c:401:15: error: request for member 'act_dev' in something not a structure or union 401 | vk_dev_ctx->act_dev = ctx->placebo_vulkan->device; | ^~ src/fftools/ffplay_renderer.c:403:15: error: request for member 'device_features' in something not a structure or union 403 | vk_dev_ctx->device_features = *ctx->placebo_vulkan->features; | ^~ src/fftools/ffplay_renderer.c:405:15: error: request for member 'enabled_inst_extensions' in something not a structure or union 405 | vk_dev_ctx->enabled_inst_extensions = ctx->placebo_instance->extensions; | ^~ src/fftools/ffplay_renderer.c:406:15: error: request for member 'nb_enabled_inst_extensions' in something not a structure or union 406 | vk_dev_ctx->nb_enabled_inst_extensions = ctx->placebo_instance->num_extensions; | ^~ src/fftools/ffplay_renderer.c:408:15: error: request for member 'enabled_dev_extensions' in something not a structure or union 408 | vk_dev_ctx->enabled_dev_extensions = ctx->placebo_vulkan->extensions; | ^~ src/fftools/ffplay_renderer.c:409:15: error: request for member 'nb_enabled_dev_extensions' in something not a structure or union 409 | vk_dev_ctx->nb_enabled_dev_extensions = ctx->placebo_vulkan->num_extensions; | ^~ src/fftools/ffplay_renderer.c:411:15: error: request for member 'queue_family_index' in something not a structure or union 411 | vk_dev_ctx->queue_family_index = ctx->placebo_vulkan->queue_graphics.index; | ^~ src/fftools/ffplay_renderer.c:412:15: error: request for member 'nb_graphics_queues' in something not a structure or union 412 | vk_dev_ctx->nb_graphics_queues = ctx->placebo_vulkan->queue_graphics.count; | ^~ src/fftools/ffplay_renderer.c:414:15: error: request for member 'queue_family_tx_index' in something not a structure or union 414 | vk_dev_ctx->queue_family_tx_index = ctx->placebo_vulkan->queue_transfer.index; | ^~ src/fftools/ffplay_renderer.c:415:15: error: request for member 'nb_tx_queues' in something not a structure or union 415 | vk_dev_ctx->nb_tx_queues = ctx->placebo_vulkan->queue_transfer.count; | ^~ src/fftools/ffplay_renderer.c:417:15: error: request for member 'queue_family_comp_index' in something not a structure or union 417 | vk_dev_ctx->queue_family_comp_index = ctx->placebo_vulkan->queue_compute.index; | ^~ src/fftools/ffplay_renderer.c:418:15: error: request for member 'nb_comp_queues' in something not a structure or union 418 | vk_dev_ctx->nb_comp_queues = ctx->placebo_vulkan->queue_compute.count; | ^~ src/fftools/ffplay_renderer.c:424:15: error: request for member 'queue_family_decode_index' in something not a structure or union 424 | vk_dev_ctx->queue_family_decode_index = decode_index; | ^~ src/fftools/ffplay_renderer.c:425:15: error: request for member 'nb_decode_queues' in something not a structure or union 425 | vk_dev_ctx->nb_decode_queues = decode_count; | ^~ src/fftools/ffplay_renderer.c: In function 'create_hw_frame': src/fftools/ffplay_renderer.c:523:5: error: unknown type name 'AVVulkanFramesContext'; did you mean 'AVHWFramesContext'? 523 | AVVulkanFramesContext *vk_frame_ctx; | ^~~~~~~~~~~~~~~~~~~~~ | AVHWFramesContext src/fftools/ffplay_renderer.c:579:21: error: request for member 'flags' in something not a structure or union 579 | vk_frame_ctx->flags = AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE; | ^~ src/fftools/ffplay_renderer.c:579:31: error: 'AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE' undeclared (first use in this function) 579 | vk_frame_ctx->flags = AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/fftools/ffplay_renderer.c:579:31: note: each undeclared identifier is reported only once for each function it appears in make: *** [/var/tmp/portage/media-video/ffmpeg-7.1.1/work/ffmpeg-7.1.1/ffbuild/common.mak:81: fftools/ffplay_renderer.o] Error 1 rm doc/libavfilter.pod doc/libswscale.pod doc/ffmpeg-protocols.pod doc/libswresample.pod doc/ffplay-all.pod doc/libavcodec.pod doc/ffprobe.pod doc/ffmpeg-utils.pod doc/libavdevice.pod doc/ffplay.pod doc/libavformat.pod doc/ffmpeg-filters.pod doc/ffmpeg-resampler.pod doc/ffmpeg-codecs.pod doc/ffmpeg-all.pod doc/ffmpeg-formats.pod doc/ffmpeg-devices.pod doc/libavutil.pod doc/ffmpeg-scaler.pod doc/ffmpeg-bitstream-filters.pod doc/ffmpeg.pod doc/ffprobe-all.pod * ERROR: media-video/ffmpeg-7.1.1::gentoo failed (compile phase): * emake failed If libplacebo is built with +vulkan ffmpeg +libplacebo builds also ok. Discovered this on ppc64 but I guess this affects all archs.