[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#984190: libnop: ftbfs with GCC-11



Package: src:libnop
Version: 0.0~git20200728.45dfe0f-3
Severity: normal
Tags: sid bookworm
User: debian-gcc@lists.debian.org
Usertags: ftbfs-gcc-11

[This bug is not targeted to the upcoming bullseye 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-11/g++-11, but succeeds to build with gcc-10/g++-10. The
severity of this report will be raised before the bookworm release,
so nothing has to be done for the bullseye release.

The full build log can be found at:
http://people.debian.org/~doko/logs/20210228/filtered/gcc11/libnop_0.0~git20200728.45dfe0f-3_unstable_gcc11.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.

[...]
make[1]: Entering directory '/<<PKGBUILDDIR>>'
compile test/nop_tests.cpp
compile test/encoding_tests.cpp
compile test/serializer_tests.cpp
compile test/utility_tests.cpp
compile test/variant_tests.cpp
compile test/handle_tests.cpp
compile test/thread_local_tests.cpp
compile test/enum_flags_tests.cpp
compile test/sip_hash_tests.cpp
compile test/interface_tests.cpp
In file included from include/nop/serializer.h:24,
                 from test/serializer_tests.cpp:28:
include/nop/base/map.h: In instantiation of ‘static constexpr nop::Status<void> nop::Encoding<std::map<_Key, _Tp, _Compare, _Alloc> >::WritePayload(nop::EncodingByte, const Type&, Writer*) [with Writer = nop::testing::MockWriter; Key = int; T = std::__cxx11::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::__cxx11::basic_string<char> > >; nop::Encoding<std::map<_Key, _Tp, _Compare, _Alloc> >::Type = std::map<int, std::__cxx11::basic_string<char> >]’:
include/nop/base/encoding.h:120:39:   required from ‘static constexpr nop::Status<void> nop::EncodingIO<T>::Write(const T&, Writer*) [with Writer = nop::testing::MockWriter; T = std::map<int, std::__cxx11::basic_string<char> >]’
include/nop/base/serializer.h:64:30:   required from ‘static constexpr nop::Status<void> nop::SerializerCommon::Write(const T&, Writer*) [with T = std::map<int, std::__cxx11::basic_string<char> >; Writer = nop::testing::MockWriter]’
include/nop/base/serializer.h:121:35:   required from ‘constexpr nop::Status<void> nop::Serializer<Writer*>::Write(const T&) [with T = std::map<int, std::__cxx11::basic_string<char> >; Writer = nop::testing::MockWriter]’
test/serializer_tests.cpp:4173:34:   required from here
include/nop/base/map.h:70:35: error: loop variable ‘element’ of type ‘const std::pair<int, std::__cxx11::basic_string<char> >&’ binds to a temporary constructed from type ‘const std::pair<const int, std::__cxx11::basic_string<char> >’ [-Werror=range-loop-construct]
   70 |     for (const std::pair<Key, T>& element : value) {
      |                                   ^~~~~~~
include/nop/base/map.h:70:35: note: use non-reference type ‘const std::pair<int, std::__cxx11::basic_string<char> >’ to make the copy explicit or ‘const std::pair<const int, std::__cxx11::basic_string<char> >&’ to prevent copying
include/nop/base/map.h: In instantiation of ‘static constexpr nop::Status<void> nop::Encoding<std::map<_Key, _Tp, _Compare, _Alloc> >::WritePayload(nop::EncodingByte, const Type&, Writer*) [with Writer = nop::TestWriter; Key = int; T = std::__cxx11::basic_string<char>; Compare = std::less<int>; Allocator = std::allocator<std::pair<const int, std::__cxx11::basic_string<char> > >; nop::Encoding<std::map<_Key, _Tp, _Compare, _Alloc> >::Type = std::map<int, std::__cxx11::basic_string<char> >]’:
include/nop/base/encoding.h:120:39:   required from ‘static constexpr nop::Status<void> nop::EncodingIO<T>::Write(const T&, Writer*) [with Writer = nop::TestWriter; T = std::map<int, std::__cxx11::basic_string<char> >]’
include/nop/base/serializer.h:64:30:   required from ‘static constexpr nop::Status<void> nop::SerializerCommon::Write(const T&, Writer*) [with T = std::map<int, std::__cxx11::basic_string<char> >; Writer = nop::TestWriter]’
include/nop/base/serializer.h:121:35:   required from ‘constexpr nop::Status<void> nop::Serializer<Writer*>::Write(const T&) [with T = std::map<int, std::__cxx11::basic_string<char> >; Writer = nop::TestWriter]’
test/serializer_tests.cpp:4509:36:   required from here
include/nop/base/map.h:70:35: error: loop variable ‘element’ of type ‘const std::pair<int, std::__cxx11::basic_string<char> >&’ binds to a temporary constructed from type ‘const std::pair<const int, std::__cxx11::basic_string<char> >’ [-Werror=range-loop-construct]
include/nop/base/map.h:70:35: note: use non-reference type ‘const std::pair<int, std::__cxx11::basic_string<char> >’ to make the copy explicit or ‘const std::pair<const int, std::__cxx11::basic_string<char> >&’ to prevent copying
include/nop/base/map.h: In instantiation of ‘static constexpr nop::Status<void> nop::Encoding<std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> >::WritePayload(nop::EncodingByte, const Type&, Writer*) [with Writer = nop::testing::MockWriter; Key = int; T = std::__cxx11::basic_string<char>; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; Allocator = std::allocator<std::pair<const int, std::__cxx11::basic_string<char> > >; nop::Encoding<std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> >::Type = std::unordered_map<int, std::__cxx11::basic_string<char> >]’:
include/nop/base/encoding.h:120:39:   required from ‘static constexpr nop::Status<void> nop::EncodingIO<T>::Write(const T&, Writer*) [with Writer = nop::testing::MockWriter; T = std::unordered_map<int, std::__cxx11::basic_string<char> >]’
include/nop/base/serializer.h:64:30:   required from ‘static constexpr nop::Status<void> nop::SerializerCommon::Write(const T&, Writer*) [with T = std::unordered_map<int, std::__cxx11::basic_string<char> >; Writer = nop::testing::MockWriter]’
include/nop/base/serializer.h:121:35:   required from ‘constexpr nop::Status<void> nop::Serializer<Writer*>::Write(const T&) [with T = std::unordered_map<int, std::__cxx11::basic_string<char> >; Writer = nop::testing::MockWriter]’
test/serializer_tests.cpp:4550:34:   required from here
include/nop/base/map.h:142:35: error: loop variable ‘element’ of type ‘const std::pair<int, std::__cxx11::basic_string<char> >&’ binds to a temporary constructed from type ‘const value_type’ {aka ‘const std::pair<const int, std::__cxx11::basic_string<char> >’} [-Werror=range-loop-construct]
  142 |     for (const std::pair<Key, T>& element : value) {
      |                                   ^~~~~~~
include/nop/base/map.h:142:35: note: use non-reference type ‘const std::pair<int, std::__cxx11::basic_string<char> >’ to make the copy explicit or ‘const value_type&’ {aka ‘const std::pair<const int, std::__cxx11::basic_string<char> >&’} to prevent copying
include/nop/base/map.h: In instantiation of ‘static constexpr nop::Status<void> nop::Encoding<std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> >::WritePayload(nop::EncodingByte, const Type&, Writer*) [with Writer = nop::TestWriter; Key = int; T = std::__cxx11::basic_string<char>; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; Allocator = std::allocator<std::pair<const int, std::__cxx11::basic_string<char> > >; nop::Encoding<std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc> >::Type = std::unordered_map<int, std::__cxx11::basic_string<char> >]’:
include/nop/base/encoding.h:120:39:   required from ‘static constexpr nop::Status<void> nop::EncodingIO<T>::Write(const T&, Writer*) [with Writer = nop::TestWriter; T = std::unordered_map<int, std::__cxx11::basic_string<char> >]’
include/nop/base/serializer.h:64:30:   required from ‘static constexpr nop::Status<void> nop::SerializerCommon::Write(const T&, Writer*) [with T = std::unordered_map<int, std::__cxx11::basic_string<char> >; Writer = nop::TestWriter]’
include/nop/base/serializer.h:121:35:   required from ‘constexpr nop::Status<void> nop::Serializer<Writer*>::Write(const T&) [with T = std::unordered_map<int, std::__cxx11::basic_string<char> >; Writer = nop::TestWriter]’
test/serializer_tests.cpp:4886:36:   required from here
include/nop/base/map.h:142:35: error: loop variable ‘element’ of type ‘const std::pair<int, std::__cxx11::basic_string<char> >&’ binds to a temporary constructed from type ‘const value_type’ {aka ‘const std::pair<const int, std::__cxx11::basic_string<char> >’} [-Werror=range-loop-construct]
include/nop/base/map.h:142:35: note: use non-reference type ‘const std::pair<int, std::__cxx11::basic_string<char> >’ to make the copy explicit or ‘const value_type&’ {aka ‘const std::pair<const int, std::__cxx11::basic_string<char> >&’} to prevent copying
compile test/fungible_tests.cpp
compile test/optional_tests.cpp
compile test/result_tests.cpp
compile test/endian_tests.cpp
compile test/constexpr_tests.cpp
compile examples/stream.cpp
compile examples/simple_protocol.cpp
compile examples/interface.cpp
compile examples/pipe.cpp
compile examples/table.cpp
compile examples/variant.cpp
compile examples/shared.cpp
link out/stream_example
link out/simple_protocol_example
link out/pipe_example
link out/table_example
link out/variant_example
link out/interface_example
link out/shared_protocol.so
cc1plus: all warnings being treated as errors
make[1]: *** [build/host-executable.mk:17: out/host-obj/test/test/serializer_tests.o] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:4: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2


Reply to: