Bug#841624: libcdio: FTBFS: ../../include/cdio/iso9660.h:277:45: error: flexible array member 'iso9660_dir_s::filename' not at end of 'struct iso9660_pvd_s'
On 2016-10-21 Lucas Nussbaum wrote: > Source: libcdio > Version: 0.83-4.2 > Severity: serious > Tags: stretch sid > User: debian...@lists.debian.org > Usertags: qa-ftbfs-20161021 qa-ftbfs > Justification: FTBFS on amd64 > Hi, > During a rebuild of all packages in sid, your package failed to build on > amd64. [...] This seems to be fixed in experimental's 0.92. Afaict this was fixed in http://git.savannah.gnu.org/gitweb/?p=libcdio.git;a=commitdiff;h=0bdb015d47b95abaa79fc2b83ffacdd63429a992 with diff --git a/include/cdio/iso9660.h b/include/cdio/iso9660.h index 45ece74..942c52d 100644 (file) --- a/include/cdio/iso9660.h +++ b/include/cdio/iso9660.h @@ -60,7 +60,7 @@ typedef uint64_t iso733_t; /*! See section 7.3.3 */ typedef char achar_t; /*! See section 7.4.1 */ typedef char dchar_t; /*! See section 7.4.1 */ -#ifndef EMPTY_ARRAY_SIZE +#ifndef EMPTY_ARRAY_SIZE #define EMPTY_ARRAY_SIZE 0 #endif @@ -273,8 +273,18 @@ struct iso9660_dir_s { the Extent described by this Directory Record is recorded. (9.1.9) */ - iso711_t filename_len; /*! number of bytes in filename field */ - char filename[EMPTY_ARRAY_SIZE]; +/*! MSVC compilers cannot handle a zero sized array in the middle +of a struct, and iso9660_dir_s is reused within iso9660_pvd_s. +Therefore, instead of defining: + iso711_t filename_len; + char filename[]; +we leverage the fact that iso711_t and char are the same size +and use an union. The only gotcha is that the actual string +payload of filename.str[] starts at 1, not 0. */ + union { +iso711_tlen; +charstr[1]; + } filename; } GNUC_PACKED; /*! and the related changes. cu Andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure'
Bug#841624: libcdio: FTBFS: ../../include/cdio/iso9660.h:277:45: error: flexible array member 'iso9660_dir_s::filename' not at end of 'struct iso9660_pvd_s'
Source: libcdio Version: 0.83-4.2 Severity: serious Tags: stretch sid User: debian...@lists.debian.org Usertags: qa-ftbfs-20161021 qa-ftbfs Justification: FTBFS on amd64 Hi, During a rebuild of all packages in sid, your package failed to build on amd64. Relevant part (hopefully): > /bin/bash ../../libtool --tag=CXX --mode=compile x86_64-linux-gnu-g++ > -DHAVE_CONFIG_H -I. -I../.. -I../../include/ -I../../include-g -O2 -MT > iso9660.lo -MD -MP -MF .deps/iso9660.Tpo -c -o iso9660.lo iso9660.cpp > libtool: compile: x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../.. > -I../../include/ -I../../include -g -O2 -MT iso9660.lo -MD -MP -MF > .deps/iso9660.Tpo -c iso9660.cpp -fPIC -DPIC -o .libs/iso9660.o > In file included from ../../include/cdio++/iso9660.hpp:27:0, > from iso9660.cpp:27: > ../../include/cdio/iso9660.h:277:45: error: flexible array member > 'iso9660_dir_s::filename' not at end of 'struct iso9660_pvd_s' >char filename[EMPTY_ARRAY_SIZE]; > ^ > ../../include/cdio/iso9660.h:310:20: note: next member 'char > iso9660_pvd_s::root_directory_filename' declared here >char root_directory_filename; /**< Is '\\0' or root > ^~~ > ../../include/cdio/iso9660.h:283:8: note: in the definition of 'struct > iso9660_pvd_s' > struct iso9660_pvd_s { > ^ > ../../include/cdio/iso9660.h:277:45: error: flexible array member > 'iso9660_dir_s::filename' not at end of 'struct iso9660_svd_s' >char filename[EMPTY_ARRAY_SIZE]; > ^ > ../../include/cdio/iso9660.h:424:20: note: next member 'char > iso9660_svd_s::root_directory_filename' declared here >char root_directory_filename; /**< Is '\\0' or root > ^~~ > ../../include/cdio/iso9660.h:392:8: note: in the definition of 'struct > iso9660_svd_s' > struct iso9660_svd_s { > ^ > ../../include/cdio/iso9660.h:277:45: error: flexible array member > 'iso9660_dir_s::filename' not at end of 'class ISO9660::PVD' >char filename[EMPTY_ARRAY_SIZE]; > ^ > ../../include/cdio/iso9660.h:310:20: note: next member 'char > iso9660_pvd_s::root_directory_filename' declared here >char root_directory_filename; /**< Is '\\0' or root > ^~~ > In file included from iso9660.cpp:27:0: > ../../include/cdio++/iso9660.hpp:41:9: note: in the definition of 'class > ISO9660::PVD' >class PVD // Primary Volume ID > ^~~ > Makefile:545: recipe for target 'iso9660.lo' failed > make[4]: *** [iso9660.lo] Error 1 If the failure looks somehow time/timezone related: Note that this rebuild was performed without the 'tzdata' package installed in the chroot. tzdata used be (transitively) part of build-essential, but it no longer is. If this package requires it to build, it should be added to build-depends. For the release team's opinion on this, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836940#185 If the failure looks LSB-related: similarly to tzdata, lsb-base is not installed in the build chroot. The full build log is available from: http://aws-logs.debian.net/2016/10/21/libcdio_0.83-4.2_unstable.log A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute! About the archive rebuild: The rebuild was done on EC2 VM instances from Amazon Web Services, using a clean, minimal and up-to-date chroot. Every failed build was retried once to eliminate random failures.