[FFmpeg-trac] #6828(undetermined:new): ffmpeg git master compile error with libva 2.0

FFmpeg trac at avcodec.org
Sat Nov 11 14:15:46 EET 2017


#6828: ffmpeg git master compile error with libva 2.0
-------------------------------------+-------------------------------------
             Reporter:  bermond      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I'm getting the following compile error in ffmpeg git master when using
 libva 2.0:
 {{{
 CC      libavutil/hwcontext_vaapi.o
 libavutil/hwcontext_vaapi.c: In function ‘vaapi_map_to_drm’:
 libavutil/hwcontext_vaapi.c:1083:5: error: unknown type name
 ‘VADRMPRIMESurfaceDescriptor’; did you mean ‘AVDRMFrameDescriptor’?
      VADRMPRIMESurfaceDescriptor va_desc;
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      AVDRMFrameDescriptor
 libavutil/hwcontext_vaapi.c:1089:11: error: implicit declaration of
 function ‘vaExportSurfaceHandle’ [-Werror=implicit-function-declaration]
      vas = vaExportSurfaceHandle(hwctx->display, surface_id,
            ^~~~~~~~~~~~~~~~~~~~~
 libavutil/hwcontext_vaapi.c:1090:33: error:
 ‘VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2’ undeclared (first use in this
 function); did you mean ‘VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME’?
                                  VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME
 libavutil/hwcontext_vaapi.c:1090:33: note: each undeclared identifier is
 reported only once for each function it appears in
 libavutil/hwcontext_vaapi.c:1091:33: error: ‘VA_EXPORT_SURFACE_READ_ONLY’
 undeclared (first use in this function)
                                  VA_EXPORT_SURFACE_READ_ONLY |
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
 libavutil/hwcontext_vaapi.c:1092:33: error:
 ‘VA_EXPORT_SURFACE_SEPARATE_LAYERS’ undeclared (first use in this
 function); did you mean ‘VA_EXPORT_SURFACE_READ_ONLY’?
                                  VA_EXPORT_SURFACE_SEPARATE_LAYERS,
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  VA_EXPORT_SURFACE_READ_ONLY
 libavutil/hwcontext_vaapi.c:1109:35: error: request for member
 ‘num_objects’ in something not a structure or union
      drm_desc->nb_objects = va_desc.num_objects;
                                    ^
 libavutil/hwcontext_vaapi.c:1110:28: error: request for member
 ‘num_objects’ in something not a structure or union
      for (i = 0; i < va_desc.num_objects; i++) {
                             ^
 libavutil/hwcontext_vaapi.c:1111:44: error: request for member ‘objects’
 in something not a structure or union
          drm_desc->objects[i].fd   = va_desc.objects[i].fd;
                                             ^
 libavutil/hwcontext_vaapi.c:1112:44: error: request for member ‘objects’
 in something not a structure or union
          drm_desc->objects[i].size = va_desc.objects[i].size;
                                             ^
 libavutil/hwcontext_vaapi.c:1114:20: error: request for member ‘objects’
 in something not a structure or union
              va_desc.objects[i].drm_format_modifier;
                     ^
 libavutil/hwcontext_vaapi.c:1116:34: error: request for member
 ‘num_layers’ in something not a structure or union
      drm_desc->nb_layers = va_desc.num_layers;
                                   ^
 libavutil/hwcontext_vaapi.c:1117:28: error: request for member
 ‘num_layers’ in something not a structure or union
      for (i = 0; i < va_desc.num_layers; i++) {
                             ^
 libavutil/hwcontext_vaapi.c:1118:48: error: request for member ‘layers’ in
 something not a structure or union
          drm_desc->layers[i].format    = va_desc.layers[i].drm_format;
                                                 ^
 libavutil/hwcontext_vaapi.c:1119:48: error: request for member ‘layers’ in
 something not a structure or union
          drm_desc->layers[i].nb_planes = va_desc.layers[i].num_planes;
                                                 ^
 libavutil/hwcontext_vaapi.c:1120:32: error: request for member ‘layers’ in
 something not a structure or union
          for (j = 0; j < va_desc.layers[i].num_planes; j++) {
                                 ^
 libavutil/hwcontext_vaapi.c:1122:24: error: request for member ‘layers’ in
 something not a structure or union
                  va_desc.layers[i].object_index[j];
                         ^
 libavutil/hwcontext_vaapi.c:1124:24: error: request for member ‘layers’ in
 something not a structure or union
                  va_desc.layers[i].offset[j];
                         ^
 libavutil/hwcontext_vaapi.c:1126:24: error: request for member ‘layers’ in
 something not a structure or union
                  va_desc.layers[i].pitch[j];
                         ^
 libavutil/hwcontext_vaapi.c:1142:28: error: request for member
 ‘num_objects’ in something not a structure or union
      for (i = 0; i < va_desc.num_objects; i++)
                             ^
 libavutil/hwcontext_vaapi.c:1143:22: error: request for member ‘objects’
 in something not a structure or union
          close(va_desc.objects[i].fd);
                       ^
 cc1: some warnings being treated as errors
 make: *** [ffbuild/common.mak:60: libavutil/hwcontext_vaapi.o] Error 1
 }}}

 How to reproduce:
 {{{
 $ git clone git://source.ffmpeg.org/ffmpeg.git
 $ cd ffmpeg
 $ ./configure --enable-libdrm --enable-libmfx
 $ make -j1
 }}}

 ffmpeg git master compiles fine with libva 1.8.3.

 Strangely, ffmpeg 3.4 compiles fine with libva 2.0.

 '''System information:'''
 '''OS:''' Arch Linux x86_64
 '''Compiler:''' gcc 7.2.0
 '''glibc:''' 2.26
 '''FFmpeg:''' git master
 '''libva:''' 2.0.0
 '''libdrm:''' 2.4.88
 '''libmfx:''' 1.23

 '''Relevant system-wide environmet variables:'''
 '''CPPFLAGS='''"-D_FORTIFY_SOURCE=2"
 '''CFLAGS='''"-march=native -O2 -pipe -fstack-protector-strong -fno-plt"
 '''CXXFLAGS='''"-march=native -O2 -pipe -fstack-protector-strong -fno-plt"
 '''LDFLAGS='''"-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6828>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list