[FFmpeg-trac] #4139(avdevice:new): xcbgrab (x11grab device) fails to build with libxcb < 1.4

FFmpeg trac at avcodec.org
Tue Nov 25 16:47:40 CET 2014


#4139: xcbgrab (x11grab device) fails to build with libxcb < 1.4
----------------------------------+--------------------------------------
             Reporter:  barsnick  |                     Type:  defect
               Status:  new       |                 Priority:  minor
            Component:  avdevice  |                  Version:  git-master
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Summary of the bug:
 With old libxcb, notably before version 1.4, the xcbgrab device fails to
 build.

 How to reproduce:
 {{{
 % ./configure --enable-libxcb
 % make
 }}}

 gcc output:
 {{{
 libavdevice/xcbgrab.c: In function ‘xcbgrab_frame_shm’:
 libavdevice/xcbgrab.c:247: error: ‘xcb_generic_error_t’ has no member
 named ‘resource_id’
 libavdevice/xcbgrab.c:247: error: ‘xcb_generic_error_t’ has no member
 named ‘minor_code’
 libavdevice/xcbgrab.c:247: error: ‘xcb_generic_error_t’ has no member
 named ‘major_code’
 }}}

 icc output:
 {{{
 libavdevice/xcbgrab.c(247): error: struct "<unnamed>" has no field
 "resource_id"
                  e->sequence, e->resource_id, e->minor_code,
 e->major_code);
                                  ^

 libavdevice/xcbgrab.c(247): error: struct "<unnamed>" has no field
 "minor_code"
                  e->sequence, e->resource_id, e->minor_code,
 e->major_code);
                                                  ^

 libavdevice/xcbgrab.c(247): error: struct "<unnamed>" has no field
 "major_code"
                  e->sequence, e->resource_id, e->minor_code,
 e->major_code);
                                                                 ^
 }}}

 This is due to {{{resource_id}}}, {{{minor_code}}}, {{{major_code}}} not
 having been introduced until version 1.4 of libxcb, as documented in the
 changelog and this commit:
 http://cgit.freedesktop.org/xcb/libxcb/commit/?id=96ff5fb635bc333e80ebce6cc03008a1b9992ff6
 and actually added in this commit:
 http://cgit.freedesktop.org/xcb/libxcb/commit/src/xcb.h?id=f4c2794bf5990a0b2f6168f2b22b60b15e08ac44

 I would agree totally if you argued that dependencies which haven't been
 updated for over five years are considered ancient and outdated. I have no
 idea when this version of libxcb was last deployed to systems which are
 currently still considered not-quite-EOL. I just happen to have it on one
 of my systems. Feel free to close this ticket.

 In this case, it only affects an av_log() error message though. Omitting
 those fields may be acceptable, or adding a configure check. Changing that
 av_log() call "works for me".

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


More information about the FFmpeg-trac mailing list