Opened 7 months ago

Closed 7 months ago

#69678 closed defect (fixed)

ffmpeg6 @6.1.1_2+gpl2+gpl3+nonfree+x11: compilation fails (libavcodec/vulkan_av1.c:44:5: error: unknown type name 'StdVideoAV1MESAFrameHeader')

Reported by: hugo-ribeiro (Hugo Ribeiro) Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: mascguy (Christopher Nielsen)
Port: ffmpeg6

Description

Upgrading from ffmpeg6 @6.1.1_1+gpl2+gpl3+nonfree+x11 to ffmpeg6 @6.1.1_2+gpl2+gpl3+nonfree+x11 leads to the following errors

libavcodec/vulkan_av1.c:44:5: error: unknown type name 'StdVideoAV1MESAFrameHeader'; did you mean 'StdVideoAV1SequenceHeader'?
    StdVideoAV1MESAFrameHeader         av1_frame_header;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~
    StdVideoAV1SequenceHeader
/opt/local/include/vk_video/vulkan_video_codec_av1std.h:385:3: note: 'StdVideoAV1SequenceHeader' declared here
} StdVideoAV1SequenceHeader;
  ^
libavcodec/vulkan_decode.c:666:38: error: unknown type name 'VkVideoDecodeAV1CapabilitiesMESA'; did you mean 'VkVideoDecodeAV1CapabilitiesKHR'?
                                     VkVideoDecodeAV1CapabilitiesMESA *av1_caps,
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                     VkVideoDecodeAV1CapabilitiesKHR
/opt/local/include/vulkan/vulkan_core.h:11371:3: note: 'VkVideoDecodeAV1CapabilitiesKHR' declared here
} VkVideoDecodeAV1CapabilitiesKHR;
  ^
libavcodec/vulkan_av1.c:45:5: error: unknown type name 'VkVideoDecodeAV1PictureInfoMESA'; did you mean 'VkVideoDecodeAV1PictureInfoKHR'?
    VkVideoDecodeAV1PictureInfoMESA    av1_pic_info;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1PictureInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11388:3: note: 'VkVideoDecodeAV1PictureInfoKHR' declared here
} VkVideoDecodeAV1PictureInfoKHR;
  ^
libavcodec/vulkan_decode.c:677:5: error: unknown type name 'VkVideoDecodeAV1ProfileInfoMESA'; did you mean 'VkVideoDecodeAV1ProfileInfoKHR'?
    VkVideoDecodeAV1ProfileInfoMESA *av1_profile  = &prof->av1_profile;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1ProfileInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11365:3: note: 'VkVideoDecodeAV1ProfileInfoKHR' declared here
} VkVideoDecodeAV1ProfileInfoKHR;
  ^
libavcodec/vulkan_av1.c:49:5: error: unknown type name 'VkVideoDecodeAV1DpbSlotInfoMESA'; did you mean 'VkVideoDecodeAV1DpbSlotInfoKHR'?
    VkVideoDecodeAV1DpbSlotInfoMESA     vkav1_refs[AV1_NUM_REF_FRAMES];
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1DpbSlotInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11394:3: note: 'VkVideoDecodeAV1DpbSlotInfoKHR' declared here
} VkVideoDecodeAV1DpbSlotInfoKHR;
  ^
libavcodec/vulkan_av1.c:58:29: error: unknown type name 'VkVideoDecodeAV1DpbSlotInfoMESA'; did you mean 'VkVideoDecodeAV1DpbSlotInfoKHR'?
                            VkVideoDecodeAV1DpbSlotInfoMESA *vkav1_ref, /* Goes in ^ */
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            VkVideoDecodeAV1DpbSlotInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11394:3: note: 'VkVideoDecodeAV1DpbSlotInfoKHR' declared here
} VkVideoDecodeAV1DpbSlotInfoKHR;
  ^
libavcodec/vulkan_decode.c:705:30: error: use of undeclared identifier 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA'; did you mean 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR'?
        av1_profile->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_MESA;
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR
/opt/local/include/vulkan/vulkan_core.h:1070:5: note: 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR' declared here
    VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003,
    ^
libavcodec/vulkan_decode.c:706:22: error: no member named 'stdProfileIdc' in 'struct VkVideoDecodeAV1ProfileInfoKHR'; did you mean 'stdProfile'?
        av1_profile->stdProfileIdc = cur_profile;
                     ^~~~~~~~~~~~~
                     stdProfile
/opt/local/include/vulkan/vulkan_core.h:11363:27: note: 'stdProfile' declared here
    StdVideoAV1Profile    stdProfile;
                          ^
libavcodec/vulkan_decode.c:761:5: error: unknown type name 'VkVideoDecodeAV1CapabilitiesMESA'; did you mean 'VkVideoDecodeAV1CapabilitiesKHR'?
libavcodec/vulkan_av1.c:71:19: error: use of undeclared identifier 'VkVideoDecodeAV1DpbSlotInfoMESA'
    *vkav1_ref = (VkVideoDecodeAV1DpbSlotInfoMESA) {
                  ^
libavcodec/vulkan_av1.c:78:20: error: no member named 'ref_order_hint' in 'struct VkVideoDecodeAV1DpbSlotInfoKHR'
        vkav1_ref->ref_order_hint[i] = pic->raw_frame_header->ref_order_hint[idx];
        ~~~~~~~~~  ^
libavcodec/vulkan_av1.c:81:16: error: no member named 'disable_frame_end_update_cdf' in 'struct VkVideoDecodeAV1DpbSlotInfoKHR'
    vkav1_ref->disable_frame_end_update_cdf = pic->raw_frame_header->disable_frame_end_update_cdf;
    ~~~~~~~~~  ^
    VkVideoDecodeAV1CapabilitiesMESA av1_caps = {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1CapabilitiesKHR
/opt/local/include/vulkan/vulkan_core.h:11371:3: note: 'VkVideoDecodeAV1CapabilitiesKHR' declared here
} VkVideoDecodeAV1CapabilitiesKHR;
  ^
In file included from libavcodec/vulkan_hevc.c:23:
libavcodec/vulkan_decode.h:31:5: error: unknown type name 'VkVideoDecodeAV1ProfileInfoMESA'; did you mean 'VkVideoDecodeAV1ProfileInfoKHR'?
    VkVideoDecodeAV1ProfileInfoMESA av1_profile;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1ProfileInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11365:3: note: 'VkVideoDecodeAV1ProfileInfoKHR' declared here
} VkVideoDecodeAV1ProfileInfoKHR;
  ^
1 error generated.
In file included from libavcodec/vulkan_h264.c:22:
libavcodec/vulkan_decode.h:31:5: error: unknown type name 'VkVideoDecodeAV1ProfileInfoMESA'; did you mean 'VkVideoDecodeAV1ProfileInfoKHR'?
    VkVideoDecodeAV1ProfileInfoMESA av1_profile;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1ProfileInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11365:3: note: 'VkVideoDecodeAV1ProfileInfoKHR' declared here
} VkVideoDecodeAV1ProfileInfoKHR;
  ^
gmake: *** [ffbuild/common.mak:81: libavcodec/vulkan_hevc.o] Error 1
gmake: *** Waiting for unfinished jobs....
1 error generated.
gmake: *** [ffbuild/common.mak:81: libavcodec/vulkan_h264.o] Error 1
libavcodec/vulkan_av1.c:113:5: error: unknown type name 'StdVideoAV1MESASequenceHeader'; did you mean 'StdVideoAV1SequenceHeader'?
    StdVideoAV1MESASequenceHeader av1_sequence_header;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    StdVideoAV1SequenceHeader
/opt/local/include/vk_video/vulkan_video_codec_av1std.h:385:3: note: 'StdVideoAV1SequenceHeader' declared here
} StdVideoAV1SequenceHeader;
  ^
libavcodec/vulkan_decode.c:762:18: error: use of undeclared identifier 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_MESA'; did you mean 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR'?
        .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_MESA,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR
/opt/local/include/vulkan/vulkan_core.h:1068:5: note: 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR' declared here
    VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000,
    ^
libavcodec/vulkan_decode.c:785:58: error: use of undeclared identifier 'STD_VIDEO_AV1_MESA_PROFILE_MAIN'; did you mean 'STD_VIDEO_AV1_PROFILE_MAIN'?
                   avctx->codec_id == AV_CODEC_ID_AV1  ? STD_VIDEO_AV1_MESA_PROFILE_MAIN :
                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                         STD_VIDEO_AV1_PROFILE_MAIN
/opt/local/include/vk_video/vulkan_video_codec_av1std.h:48:5: note: 'STD_VIDEO_AV1_PROFILE_MAIN' declared here
    STD_VIDEO_AV1_PROFILE_MAIN = 0,
    ^
libavcodec/vulkan_decode.c:833:64: error: no member named 'maxLevelIdc' in 'struct VkVideoDecodeAV1CapabilitiesKHR'; did you mean 'maxLevel'?
                avctx->codec_id == AV_CODEC_ID_AV1  ? av1_caps.maxLevelIdc  :
                                                               ^~~~~~~~~~~
                                                               maxLevel
/opt/local/include/vulkan/vulkan_core.h:11370:25: note: 'maxLevel' declared here
    StdVideoAV1Level    maxLevel;
                        ^
libavcodec/vulkan_decode.c:914:33: error: no member named 'flags' in 'struct VkVideoDecodeAV1CapabilitiesKHR'
    dec->external_fg = av1_caps.flags & VK_VIDEO_DECODE_AV1_CAPABILITY_EXTERNAL_FILM_GRAIN_MESA;
                       ~~~~~~~~ ^
libavcodec/vulkan_av1.c:114:49: error: expected ';' after expression
    VkVideoDecodeAV1SessionParametersAddInfoMESA av1_params_info;
                                                ^
                                                ;
libavcodec/vulkan_av1.c:114:5: error: use of undeclared identifier 'VkVideoDecodeAV1SessionParametersAddInfoMESA'
    VkVideoDecodeAV1SessionParametersAddInfoMESA av1_params_info;
    ^
libavcodec/vulkan_av1.c:114:50: error: use of undeclared identifier 'av1_params_info'
    VkVideoDecodeAV1SessionParametersAddInfoMESA av1_params_info;
                                                 ^
libavcodec/vulkan_decode.c:914:41: error: use of undeclared identifier 'VK_VIDEO_DECODE_AV1_CAPABILITY_EXTERNAL_FILM_GRAIN_MESA'
    dec->external_fg = av1_caps.flags & VK_VIDEO_DECODE_AV1_CAPABILITY_EXTERNAL_FILM_GRAIN_MESA;
                                        ^
libavcodec/vulkan_av1.c:115:5: error: unknown type name 'VkVideoDecodeAV1SessionParametersCreateInfoMESA'; did you mean 'VkVideoDecodeAV1SessionParametersCreateInfoKHR'?
    VkVideoDecodeAV1SessionParametersCreateInfoMESA av1_params;
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1SessionParametersCreateInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11377:3: note: 'VkVideoDecodeAV1SessionParametersCreateInfoKHR' declared here
} VkVideoDecodeAV1SessionParametersCreateInfoKHR;
  ^
libavcodec/vulkan_av1.c:120:28: error: use of undeclared identifier 'StdVideoAV1MESASequenceHeader'
    av1_sequence_header = (StdVideoAV1MESASequenceHeader) {
                           ^
libavcodec/vulkan_av1.c:171:5: error: use of undeclared identifier 'av1_params_info'; did you mean 'av1_params'?
    av1_params_info = (VkVideoDecodeAV1SessionParametersAddInfoMESA) {
    ^~~~~~~~~~~~~~~
    av1_params
libavcodec/vulkan_av1.c:115:53: note: 'av1_params' declared here
    VkVideoDecodeAV1SessionParametersCreateInfoMESA av1_params;
                                                    ^
libavcodec/vulkan_decode.c:1121:5: error: unknown type name 'VkVideoDecodeAV1SessionParametersCreateInfoMESA'; did you mean 'VkVideoDecodeAV1SessionParametersCreateInfoKHR'?
    VkVideoDecodeAV1SessionParametersCreateInfoMESA av1_params = {
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    VkVideoDecodeAV1SessionParametersCreateInfoKHR
/opt/local/include/vulkan/vulkan_core.h:11377:3: note: 'VkVideoDecodeAV1SessionParametersCreateInfoKHR' declared here
} VkVideoDecodeAV1SessionParametersCreateInfoKHR;
  ^
libavcodec/vulkan_av1.c:171:24: error: use of undeclared identifier 'VkVideoDecodeAV1SessionParametersAddInfoMESA'
    av1_params_info = (VkVideoDecodeAV1SessionParametersAddInfoMESA) {
                       ^
libavcodec/vulkan_decode.c:1122:18: error: use of undeclared identifier 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA'; did you mean 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR'?
        .sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_MESA,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR
/opt/local/include/vulkan/vulkan_core.h:1071:5: note: 'VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR' declared here
    VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004,
    ^
14 errors generated.
gmake: *** [ffbuild/common.mak:81: libavcodec/vulkan_decode.o] Error 1
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake: *** [ffbuild/common.mak:81: libavcodec/vulkan_av1.o] Error 1

Attachments (1)

main.log.gz (71.1 KB) - added by hugo-ribeiro (Hugo Ribeiro) 7 months ago.

Download all attachments as: .zip

Change History (6)

Changed 7 months ago by hugo-ribeiro (Hugo Ribeiro)

Attachment: main.log.gz added

comment:1 Changed 7 months ago by barracuda156

Yes, it is broken with the last update.

comment:2 Changed 7 months ago by barracuda156

I have found a patch, but using it leads to another related error: https://github.com/FFmpeg/FFmpeg/commit/fef22c87ada4517441701e6e61e062c9f4399c8e.patch

In file included from libavcodec/vulkan_decode.h:26,
                 from libavcodec/vulkan_av1.c:21:
libavcodec/vulkan_video.h:26:10: fatal error: vulkan_video_codec_av1std_mesa.h: No such file or directory
   26 | #include "vulkan_video_codec_av1std_mesa.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake: *** [ffbuild/common.mak:81: libavcodec/vulkan_av1.o] Error 1
gmake: *** Waiting for unfinished jobs....
In file included from libavcodec/vulkan_decode.c:20:
libavcodec/vulkan_video.h:26:10: fatal error: vulkan_video_codec_av1std_mesa.h: No such file or directory
   26 | #include "vulkan_video_codec_av1std_mesa.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake: *** [ffbuild/common.mak:81: libavcodec/vulkan_decode.o] Error 1

comment:3 Changed 7 months ago by hugo-ribeiro (Hugo Ribeiro)

Thank you for looking into this. As I understand, upstream has fixed this issue with ffmpeg7 but not ffmpeg6 and I believe this is why there are missing headers. A simple fix to get ffmpeg6 to compile and install is to disable vulkan support by adding

--disable-vulkan \

to

configure.args-append

in the portfile, but I don't know if this is desirable.

comment:4 Changed 7 months ago by barracuda156

Last edited 7 months ago by barracuda156 (previous) (diff)

comment:5 Changed 7 months ago by barracuda156

Owner: set to barracuda156
Resolution: fixed
Status: newclosed

In 5ad37678d0e9a3274a79bdb95b9b34815cedf418/macports-ports (master):

ffmpeg6: fix build with new vulkan-headers

Closes: #69678

Note: See TracTickets for help on using tickets.