Bug#812025: vdr-plugin-vcd: FTBFS with GCC 6: flexible array member...

Adrian Bunk bunk at stusta.de
Tue Nov 22 20:35:45 UTC 2016

On Tue, Jan 19, 2016 at 08:37:37PM -0800, Martin Michlmayr wrote:
> Package: vdr-plugin-vcd
> Version: 0.9-25
> Severity: important
> User: debian-gcc at lists.debian.org
> Usertags: ftbfs-gcc-6
> This package fails to build with GCC 6.  GCC 6 has not been released
> yet, but it's expected that GCC 6 will become the default compiler for
> stretch.
> Note that only the first error is reported; there might be more.  You
> can find a snapshot of GCC 6 in experimental.  To build with GCC 6,
> you can set CC=gcc-6 CXX=g++-6 explicitly.
> You may be able to find out more about this issue at
> https://gcc.gnu.org/gcc-6/changes.html
> > sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
> ...
> > make[2]: Entering directory '/<<PKGBUILDDIR>>'
> > g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -c -DPLUGIN_NAME_I18N='"vcd"' -D_GNU_SOURCE -I/usr/include/vdr/include vcd.c
> > In file included from vcd.c:27:0:
> > functions.h:170:23: error: flexible array member 'psd_vcd::<anonymous struct>::play_item' not at end of 'union psd_vcd'
> >       __u16  play_item[];
> >                        ^
> > 
> > functions.h:173:13: note: next member '__u8 psd_vcd::<anonymous struct>::header' declared here
> >       __u8   header;
> >              ^~~~~~

Builds for me in unstable, and the code looks correct:

union psd_vcd {
  __u8  header;
  struct {
     __u8   header;
     __u8   number_of_items;
     __u16  list_id;
     __u16  previous_list_offset;
     __u16  next_list_offset;
     __u16  return_list_offset;
     __u16  playing_time;
     __u8   play_item_wait_time;
     __u8   auto_pause_wait_time;
     __u16  play_item[];      <------ line 170
  } play;
  struct {
     __u8   header;
     __u8   selection_list_flags;
     __u8   nos;
     __u8   bsn;
     __u16  list_id;
     __u16  previous_list_offset;
     __u16  next_list_offset;
     __u16  return_list_offset;
     __u16  default_list_offset;
     __u16  timeout_list_offset;
     __u8   timeout_wait_time;
     __u8   loop_count;
     __u16  play_item;
     __u16  selection_offset[];
  } selection;

Can you confirm that vdr-plugin-vcd builds for you now?

This could have been a bug in the pre-release gcc that is now fixed.



       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

More information about the pkg-vdr-dvb-devel mailing list