Hi,
nbdkit fails to build in a test rebuild on at least amd64 and arm64 with
gcc-16/g++-16, but builds properly with gcc-15/g++-15. The severity of this
report will be raised before the forky release.
The full build log can be found at:
https://people.debian.org/~ema/gcc-16-rebuilds/output-1/nbdkit_arm64.build.xz
The last lines of the build log are at the end of this report.
To build with GCC 16, either set CC=gcc-16 CXX=g++-16 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.
apt-get -t=experimental install g++
Common build failures include unused (but set) variables, array subscripts
partly outside array bounds, and new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-16/porting_to.html
Please only close this issue after double-checking that the package can be
built correctly with GCC 16.
Please do not reassign this bug to another package. If a fix in another package
is required, then file a bug for the other package (or clone), and mark this
bug as blocked by the bug in the other package.
[...]
nbdkit-torrent-plugin.pod
libtool: compile: g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../../common/include -I../../common/utils -I. -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -fexceptions -DTORRENT_LINKING_SHARED -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_NO_DEPRECATED -DTORRENT_USE_OPENSSL -DTORRENT_USE_LIBCRYPTO -DTORRENT_SSL_PEERS -DOPENSSL_NO_SSL2 -DOPENSSL_NO_SSL3 -DOPENSSL_NO_TLS1 -DOPENSSL_NO_TLS1_1 -DOPENSSL_NO_DTLS1 -g -O2 -ffile-prefix-map=/build/reproducible-path/nbdkit-1.46.2=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -c torrent.cpp -fPIC -DPIC -o .libs/nbdkit_torrent_plugin_la-torrent.o
In file included from /usr/include/libtorrent/aux_/vector.hpp:39,
from /usr/include/libtorrent/torrent_handle.hpp:64,
from /usr/include/libtorrent/alert_types.hpp:50,
from torrent.cpp:48:
/usr/include/libtorrent/aux_/container_wrapper.hpp:64:17: error: 'decltype(auto)' type specifier only available with '-std=c++14' or '-std=gnu++14' [-Wtemplate-body]
64 | decltype(auto) operator[](IndexType idx) const
| ^~~~~~~~
/usr/include/libtorrent/aux_/container_wrapper.hpp:71:17: error: 'decltype(auto)' type specifier only available with '-std=c++14' or '-std=gnu++14' [-Wtemplate-body]
71 | decltype(auto) operator[](IndexType idx)
| ^~~~~~~~
In file included from /usr/include/libtorrent/torrent_info.hpp:61,
from /usr/include/libtorrent/torrent_handle.hpp:67:
/usr/include/libtorrent/file_storage.hpp:236:73: error: call to non-'constexpr' function 'const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = long int]'
236 | static constexpr std::int64_t max_file_size = (std::min)(
| ~~~~~~~~~~^
237 | (std::int64_t(1) << 48) - 1
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
238 | , std::int64_t((std::numeric_limits<int>::max)() / 2) * default_block_size);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/16/string:55,
from /usr/include/c++/16/bits/locale_classes.h:43,
from /usr/include/c++/16/bits/ios_base.h:43,
from /usr/include/c++/16/ios:46,
from /usr/include/c++/16/bits/ostream.h:43,
from /usr/include/c++/16/ostream:42,
from /usr/include/c++/16/iostream:43,
from torrent.cpp:36:
/usr/include/c++/16/bits/stl_algobase.h:233:5: note: 'const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = long int]' declared here
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
In file included from /usr/include/libtorrent/bitfield.hpp:41,
from /usr/include/libtorrent/aux_/merkle_tree.hpp:46,
from /usr/include/libtorrent/torrent_info.hpp:65:
/usr/include/libtorrent/aux_/unique_ptr.hpp:57:17: error: 'decltype(auto)' type specifier only available with '-std=c++14' or '-std=gnu++14' [-Wtemplate-body]
57 | decltype(auto) operator[](IndexType idx) const
| ^~~~~~~~
/usr/include/libtorrent/bitfield.hpp: In member function 'const char* libtorrent::bitfield::data() const':
/usr/include/libtorrent/bitfield.hpp:149:106: error: lvalue required as unary '&' operand
149 | char const* data() const noexcept { return m_buf ? reinterpret_cast<char const*>(&m_buf[1]) : nullptr; }
| ~~~~~~~^
/usr/include/libtorrent/bitfield.hpp: In member function 'char* libtorrent::bitfield::data()':
/usr/include/libtorrent/bitfield.hpp:150:88: error: lvalue required as unary '&' operand
150 | char* data() noexcept { return m_buf ? reinterpret_cast<char*>(&m_buf[1]) : nullptr; }
| ~~~~~~~^
/usr/include/libtorrent/bitfield.hpp: In member function 'const uint32_t* libtorrent::bitfield::buf() const':
/usr/include/libtorrent/bitfield.hpp:275:99: error: lvalue required as unary '&' operand
275 | std::uint32_t const* buf() const noexcept { TORRENT_ASSERT(m_buf); return &m_buf[1]; }
| ~~~~~~~^
/usr/include/libtorrent/bitfield.hpp: In member function 'uint32_t* libtorrent::bitfield::buf()':
/usr/include/libtorrent/bitfield.hpp:276:87: error: lvalue required as unary '&' operand
276 | std::uint32_t* buf() noexcept { TORRENT_ASSERT(m_buf); return &m_buf[1]; }
| ~~~~~~~^
In file included from /usr/include/libtorrent/alert_types.hpp:69:
/usr/include/libtorrent/tracker_manager.hpp: At global scope:
/usr/include/libtorrent/tracker_manager.hpp:255:17: error: 'get_executor' function uses 'auto' type specifier without trailing return type
255 | auto get_executor() { return m_timeout.get_executor(); }
| ^~~~
/usr/include/libtorrent/tracker_manager.hpp:255:17: note: deduced return type only available with '-std=c++14' or '-std=gnu++14'
make[4]: *** [Makefile:706: nbdkit_torrent_plugin_la-torrent.lo] Error 1
make[4]: Leaving directory '/build/reproducible-path/nbdkit-1.46.2/plugins/torrent'
make[3]: *** [Makefile:550: all-recursive] Error 1
make[3]: Leaving directory '/build/reproducible-path/nbdkit-1.46.2/plugins'
make[2]: *** [Makefile:750: all-recursive] Error 1
make[2]: Leaving directory '/build/reproducible-path/nbdkit-1.46.2'
make[1]: *** [Makefile:619: all] Error 2
make[1]: Leaving directory '/build/reproducible-path/nbdkit-1.46.2'
dh_auto_build: error: make -j128 returned exit code 2
make: *** [debian/rules:15: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2