#1012919 fast5: ftbfs with GCC-12

#1012919#5
Date:
2022-06-16 12:08:30 UTC
From:
To:
[This bug is targeted to the upcoming bookworm release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-12/g++-12, but succeeds to build with gcc-11/g++-11. The
severity of this report will be raised before the bookworm release.

The full build log can be found at:
http://qa-logs.debian.net/2022/06/09/gcc12/fast5_0.6.5-6_unstable_gcc12.log
The last lines of the build log are at the end of this report.

To build with GCC 11, either set CC=gcc-11 CXX=g++-11 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-11/porting_to.html

GCC 11 defaults to the GNU++17 standard.  If your package installs
header files in /usr/include, please don't work around C++17 issues
by choosing a lower C++ standard for the package build, but fix these
issues to build with the C++17 standard.

[...]
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2298:70:   required from here
/usr/include/c++/12/type_traits:1135:52: error: static assertion failed: template argument must be a complete class or an unbounded array
 1135 |       static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/type_traits:1135:52: note: ‘std::__is_complete_or_unbounded<__type_identity<array<char, 1> > >((std::__type_identity<std::array<char, 1> >(), std::__type_identity<std::array<char, 1> >()))’ evaluates to false
In file included from /usr/include/c++/12/vector:63:
/usr/include/c++/12/bits/stl_uninitialized.h: In instantiation of ‘_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = array<char, 1>*; _Size = long unsigned int]’:
/usr/include/c++/12/bits/stl_uninitialized.h:766:44:   required from ‘_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, allocator<_Tp>&) [with _ForwardIterator = array<char, 1>*; _Size = long unsigned int; _Tp = array<char, 1>]’
/usr/include/c++/12/bits/stl_vector.h:1713:36:   required from ‘void std::vector<_Tp, _Alloc>::_M_default_initialize(size_type) [with _Tp = std::array<char, 1>; _Alloc = std::allocator<std::array<char, 1> >; size_type = long unsigned int]’
/usr/include/c++/12/bits/stl_vector.h:553:9:   required from ‘std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::array<char, 1>; _Alloc = std::allocator<std::array<char, 1> >; size_type = long unsigned int; allocator_type = std::allocator<std::array<char, 1> >]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2298:70:   required from here
/usr/include/c++/12/bits/stl_uninitialized.h:699:42: error: invalid use of incomplete type ‘std::iterator_traits<std::array<char, 1>*>::value_type’ {aka ‘struct std::array<char, 1>’}
  699 |       return __uninitialized_default_n_1<__is_trivial(_ValueType)
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘std::iterator_traits<std::array<char, 1>*>::value_type’ {aka ‘struct std::array<char, 1>’}
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
/usr/include/c++/12/bits/stl_vector.h: In instantiation of ‘std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::array<char, 1>; _Alloc = std::allocator<std::array<char, 1> >; size_type = long unsigned int]’:
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:1807:29:   required from ‘void hdf5_tools::detail::Writer<std::vector<_Tp> >::operator()(hid_t, const std::string&, bool, const std::vector<_Tp>&, Args&& ...) const [with Args = {}; In_Data_Type = std::array<char, 1>; hid_t = long int; std::string = std::__cxx11::basic_string<char>]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2038:42:   required from ‘void hdf5_tools::File::write(const std::string&, bool, const In_Data_Storage&, Args&& ...) const [with In_Data_Storage = std::vector<std::array<char, 1> >; Args = {}; std::string = std::__cxx11::basic_string<char>]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2062:14:   required from ‘void hdf5_tools::File::write_attribute(const std::string&, const In_Data_Storage&, Args&& ...) const [with In_Data_Storage = std::vector<std::array<char, 1> >; Args = {}; std::string = std::__cxx11::basic_string<char>]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2303:42:   required from here
/usr/include/c++/12/bits/stl_vector.h:988:50: error: invalid use of incomplete type ‘struct std::array<char, 1>’
  988 |       { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘struct std::array<char, 1>’
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp: In instantiation of ‘void hdf5_tools::detail::Writer_Helper<2, In_Data_Type>::operator()(hid_t, const std::string&, bool, hid_t, size_t, const In_Data_Type*, hid_t) const [with In_Data_Type = std::array<char, 1>; hid_t = long int; std::string = std::__cxx11::basic_string<char>; size_t = long unsigned int]’:
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:1811:75:   required from ‘void hdf5_tools::detail::Writer<std::vector<_Tp> >::operator()(hid_t, const std::string&, bool, const std::vector<_Tp>&, Args&& ...) const [with Args = {}; In_Data_Type = std::array<char, 1>; hid_t = long int; std::string = std::__cxx11::basic_string<char>]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2038:42:   required from ‘void hdf5_tools::File::write(const std::string&, bool, const In_Data_Storage&, Args&& ...) const [with In_Data_Storage = std::vector<std::array<char, 1> >; Args = {}; std::string = std::__cxx11::basic_string<char>]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2062:14:   required from ‘void hdf5_tools::File::write_attribute(const std::string&, const In_Data_Storage&, Args&& ...) const [with In_Data_Storage = std::vector<std::array<char, 1> >; Args = {}; std::string = std::__cxx11::basic_string<char>]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2303:42:   required from here
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:1559:55: error: invalid application of ‘sizeof’ to incomplete type ‘std::array<char, 1>’
 1559 |             mem_dtype_id_holder = Util::make_str_type(sizeof(In_Data_Type));
      |                                                       ^~~~~~~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:1578:38: error: invalid use of incomplete type ‘struct std::array<char, 1>’
 1578 |                 charptr_buff[i] = &in[i][0];
      |                                    ~~^
/usr/include/c++/12/tuple:1595:45: note: declaration of ‘struct std::array<char, 1>’
 1595 |   template<typename _Tp, size_t _Nm> struct array;
      |                                             ^~~~~
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:1578:41: error: no match for ‘operator[]’ (operand types are ‘const std::array<char, 1>’ and ‘int’)
 1578 |                 charptr_buff[i] = &in[i][0];
      |                                    ~~~~~^
In file included from /usr/include/x86_64-linux-gnu/c++/12/bits/c++allocator.h:33,
                 from /usr/include/c++/12/bits/allocator.h:46,
                 from /usr/include/c++/12/string:41:
/usr/include/c++/12/bits/new_allocator.h: In instantiation of ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, const void*) [with _Tp = std::array<char, 1>; size_type = long unsigned int]’:
/usr/include/c++/12/bits/alloc_traits.h:464:28:   required from ‘static _Tp* std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, size_type) [with _Tp = std::array<char, 1>; pointer = std::array<char, 1>*; allocator_type = std::allocator<std::array<char, 1> >; size_type = long unsigned int]’
/usr/include/c++/12/bits/stl_vector.h:378:33:   required from ‘std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = std::array<char, 1>; _Alloc = std::allocator<std::array<char, 1> >; pointer = std::array<char, 1>*; std::size_t = long unsigned int]’
/usr/include/c++/12/bits/stl_vector.h:395:33:   required from ‘void std::_Vector_base<_Tp, _Alloc>::_M_create_storage(std::size_t) [with _Tp = std::array<char, 1>; _Alloc = std::allocator<std::array<char, 1> >; std::size_t = long unsigned int]’
/usr/include/c++/12/bits/stl_vector.h:332:9:   required from ‘std::_Vector_base<_Tp, _Alloc>::_Vector_base(std::size_t, const allocator_type&) [with _Tp = std::array<char, 1>; _Alloc = std::allocator<std::array<char, 1> >; std::size_t = long unsigned int; allocator_type = std::allocator<std::array<char, 1> >]’
/usr/include/c++/12/bits/stl_vector.h:552:47:   required from ‘std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::array<char, 1>; _Alloc = std::allocator<std::array<char, 1> >; size_type = long unsigned int; allocator_type = std::allocator<std::array<char, 1> >]’
/<<PKGBUILDDIR>>/src/../include/fast5/hdf5_tools.hpp:2298:70:   required from here
/usr/include/c++/12/bits/new_allocator.h:117:24: error: invalid application of ‘sizeof’ to incomplete type ‘std::array<char, 1>’
  117 |          static_assert(sizeof(_Tp) != 0, "cannot allocate incomplete types");
      |                        ^~~~~~~~~~~
/usr/include/c++/12/bits/new_allocator.h:124:42: error: invalid application of ‘sizeof’ to incomplete type ‘std::array<char, 1>’
  124 |             if (__n > (std::size_t(-1) / sizeof(_Tp)))
      |                                          ^~~~~~~~~~~
/usr/include/c++/12/bits/new_allocator.h:137:62: error: invalid application of ‘sizeof’ to incomplete type ‘std::array<char, 1>’
  137 |         return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * sizeof(_Tp)));
      |                                                              ^~~~~~~~~~~
make[2]: *** [Makefile:58: hdf5-mod] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[1]: *** [debian/rules:23: override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:18: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

#1012919#8
Date:
2022-06-26 12:43:38 UTC
From:
To:
Hello,

Bug #1012919 in fast5 reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/med-team/fast5/-/commit/4100f65c28fbe004d0f400c6979117628e79d732
Closes: #1012919
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1012919

#1012919#15
Date:
2022-06-26 13:19:07 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
fast5, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1012919@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Étienne Mollier <emollier@debian.org> (supplier of updated fast5 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 26 Jun 2022 14:41:32 +0200
Source: fast5
Architecture: source
Version: 0.6.5-7
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Étienne Mollier <emollier@debian.org>
Closes: 1012919
Changes:
 fast5 (0.6.5-7) unstable; urgency=medium
 .
   * d/control: add myself to uploaders.
   * Add gcc-12.patch: fix ftbfs with gcc-12. (Closes: #1012919)
   * Standards-Version: 4.6.1 (routine-update)
   * Add build-flags.patch: propagate standard debian build flags.
   * d/rules: remove redundant build flag setting.
Checksums-Sha1:
 14bdb52078700d072930762658067c6e16f98dda 2339 fast5_0.6.5-7.dsc
 b90197ca7031ef7ea467a5393ae2acf00288bcbd 5540 fast5_0.6.5-7.debian.tar.xz
Checksums-Sha256:
 eb08963a8ceaafecca6f1610dfe957298c5a4644b5659a389396a16d75574435 2339 fast5_0.6.5-7.dsc
 6e185bce0f949314730c845bcb6379d50207767a5668977c4ca147baab53eaf4 5540 fast5_0.6.5-7.debian.tar.xz
Files:
 2e9d3baec4a22c33fe52fa807b468370 2339 science optional fast5_0.6.5-7.dsc
 1fe998234bedbf8ee1ed33936ea7ab7c 5540 science optional fast5_0.6.5-7.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEj5GyJ8fW8rGUjII2eTz2fo8NEdoFAmK4V6EUHGVtb2xsaWVy
QGRlYmlhbi5vcmcACgkQeTz2fo8NEdqQnw//dBnw1noq/OTfxnUWYZcGIENL9J7u
xJYuYgXScwChU//rRwrIOvJU1atGV9aRAdLNVe/MPO8c0FqL8H25TzvLqKYkDfp9
2TKQSUgr0VIK/tH/xzug4BIIFylnnJKfAXqddmtLnuBT3KQXkfU0BkhXU1iVUrh8
Rqq1x1mOSC4eA4L049NsgkELDUJChjI5W+RoaK1/GbZn2Yw0ovLwIdZRRjADilkC
iiTzsKNsuTCVSeFLCVeURt+U+1mUW59DjnFz3htm463Mlil2MN+3olQBb8EGQ1P/
ReQIoIA40Y5vq5RMlyLgtkMxUQQdKVY3U58fGhQnJ/Fa6n4Kw9UT9ptiNasnAQLc
7tKAF/jcJ4WnfVai8mhsWZwmA7X+BvIwIvqd1wCc3zy5Bxp4/JlHZExtITJUDE8w
9Y0JefFGaxkTrP8DB+6KFUit96vSR/7wfBczaL1V/uYWbEIRnNhOWTLh8hpyVFrS
k6VaiPCVk2VzdlxNGP+7PsJkbmxQuorJVIyoMjoSs7kC+MnmG2eN33f1v80Ptsp7
4X4TsphxMC3YlGbj7ZtS/dRr+h5RjKimyjHWUhUiLz2QHW/zQ22qRz8qBBpkiUdo
QjecSl/Lrp5FfExN6ZXiCqIvQ/pWBrwQGT5YOs9HeV+G2AeSB5WErG2k3tgawQrF
Hpetaxsded4mmho=
=eZuS
-----END PGP SIGNATURE-----