Source: reflect-cpp
Version: 0.18.0+ds-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramac...@debian.org

Dear maintainer,

reflect-cpp fails to build on armel, armhf, and i386:

https://buildd.debian.org/status/fetch.php?pkg=reflect-cpp&arch=i386&ver=0.18.0%2Bds-1&stamp=1744354989&raw=0

[69/544] /usr/bin/c++  -I/build/reproducible-path/reflect-cpp-0.18.0+ds/include 
-I/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/thirdparty 
-I/build/reproducible-path/reflect-cpp-0.18.0+ds/obj-i686-linux-gnu/include 
-isystem //include -isystem /usr/include/libbson-1.0 -g -O2 
-ffile-prefix-map=/build/reproducible-path/reflect-cpp-0.18.0+ds=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -O3 -Wall -Werror -ggdb -ftemplate-backtrace-limit=0 
-std=gnu++20 -DGTEST_HAS_PTHREAD=1 -Winvalid-pch -include 
/build/reproducible-path/reflect-cpp-0.18.0+ds/obj-i686-linux-gnu/tests/json/CMakeFiles/reflect-cpp-json-tests.dir/cmake_pch.hxx
 -MD -MT tests/json/CMakeFiles/reflect-cpp-json-tests.dir/test_array.cpp.o -MF 
tests/json/CMakeFiles/reflect-cpp-json-tests.dir/test_array.cpp.o.d -o 
tests/json/CMakeFiles/reflect-cpp-json-tests.dir/test_array.cpp.o -c 
/build/reproducible-path/reflect-cpp-0.18.0+ds/tests/json/test_array.cpp
FAILED: tests/json/CMakeFiles/reflect-cpp-json-tests.dir/test_array.cpp.o 
/usr/bin/c++  -I/build/reproducible-path/reflect-cpp-0.18.0+ds/include 
-I/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/thirdparty 
-I/build/reproducible-path/reflect-cpp-0.18.0+ds/obj-i686-linux-gnu/include 
-isystem //include -isystem /usr/include/libbson-1.0 -g -O2 
-ffile-prefix-map=/build/reproducible-path/reflect-cpp-0.18.0+ds=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -O3 -Wall -Werror -ggdb -ftemplate-backtrace-limit=0 
-std=gnu++20 -DGTEST_HAS_PTHREAD=1 -Winvalid-pch -include 
/build/reproducible-path/reflect-cpp-0.18.0+ds/obj-i686-linux-gnu/tests/json/CMakeFiles/reflect-cpp-json-tests.dir/cmake_pch.hxx
 -MD -MT tests/json/CMakeFiles/reflect-cpp-json-tests.dir/test_array.cpp.o -MF 
tests/json/CMakeFiles/reflect-cpp-json-tests.dir/test_array.cpp.o.d -o 
tests/json/CMakeFiles/reflect-cpp-json-tests.dir/test_array.cpp.o -c 
/build/reproducible-path/reflect-cpp-0.18.0+ds/tests/json/test_array.cpp
In file included from /usr/include/c++/14/string_view:48,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/Field.hpp:5,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/AddStructName.hpp:6,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl.hpp:10,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/obj-i686-linux-gnu/tests/json/CMakeFiles/reflect-cpp-json-tests.dir/cmake_pch.hxx:5,
                 from <command-line>:
In static member function ‘static constexpr std::char_traits<char>::char_type* 
std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, 
_Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) 
[with _CharT = char; _Traits = std::char_traits<char>; _Alloc = 
std::allocator<char>]’ at /usr/include/c++/14/bits/basic_string.h:688:23,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, 
_Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, 
_Allocator>&&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; 
_Alloc = allocator<char>]’ at /usr/include/c++/14/bits/basic_string.h:3735:43,
    inlined from ‘std::optional<rfl::Error> rfl::parsing::ArrayReader<R, W, 
ProcessorsType, T, _size>::read(const InputVarType&) const [with R = 
rfl::json::Reader; W = rfl::json::Writer; ProcessorsType = rfl::Processors<>; T 
= test_array::Person; unsigned int _size = 3]’ at 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/ArrayReader.hpp:40:56:
/usr/include/c++/14/bits/char_traits.h:427:56: error: ‘void* 
__builtin_memcpy(void*, const void*, unsigned int)’ forming offset [24, 42] is 
out of the bounds [0, 24] of object ‘<anonymous>’ with type 
‘std::__cxx11::basic_string<char>’ [-Werror=array-bounds=]
  427 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, 
__n));
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/Parser_array.hpp:14,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/Parser.hpp:4,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/generic/Parser.hpp:4,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/generic/read.hpp:10,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/from_generic.hpp:5,
                 from 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl.hpp:61:
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/ArrayReader.hpp:
 In member function ‘std::optional<rfl::Error> rfl::parsing::ArrayReader<R, W, 
ProcessorsType, T, _size>::read(const InputVarType&) const [with R = 
rfl::json::Reader; W = rfl::json::Writer; ProcessorsType = rfl::Processors<>; T 
= test_array::Person; unsigned int _size = 3]’:
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/ArrayReader.hpp:40:56:
 note: ‘<anonymous>’ declared here
   40 |       return Error("Expected " + std::to_string(size_) +
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
   41 |                    " elements, got at least " + std::to_string(size_ + 
1) +
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~           
In static member function ‘static constexpr std::char_traits<char>::char_type* 
std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, 
_Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) 
[with _CharT = char; _Traits = std::char_traits<char>; _Alloc = 
std::allocator<char>]’ at /usr/include/c++/14/bits/basic_string.h:688:23,
    inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, 
_Allocator> std::operator+(__cxx11::basic_string<_CharT, _Traits, 
_Allocator>&&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; 
_Alloc = allocator<char>]’ at /usr/include/c++/14/bits/basic_string.h:3735:43,
    inlined from ‘std::optional<rfl::Error> rfl::parsing::ArrayReader<R, W, 
ProcessorsType, T, _size>::check_size() const [with R = rfl::json::Reader; W = 
rfl::json::Writer; ProcessorsType = rfl::Processors<>; T = test_array::Person; 
unsigned int _size = 3]’ at 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/ArrayReader.hpp:30:56,
    inlined from ‘rfl::parsing::Parser<rfl::json::Reader, rfl::json::Writer, 
std::array<test_array::Person, 3>, rfl::Processors<> >::read(const 
rfl::json::Reader&, const InputVarType&)::<lambda(const 
rfl::parsing::Parser<rfl::json::Reader, rfl::json::Writer, 
std::array<test_array::Person, 3>, rfl::Processors<> >::InputArrayType&)>’ at 
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/Parser_array.hpp:45:36:
/usr/include/c++/14/bits/char_traits.h:427:56: error: ‘void* 
__builtin_memcpy(void*, const void*, unsigned int)’ forming offset [24, 33] is 
out of the bounds [0, 24] of object ‘<anonymous>’ with type 
‘std::__cxx11::basic_string<char>’ [-Werror=array-bounds=]
  427 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, 
__n));
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/ArrayReader.hpp:
 In function ‘rfl::parsing::Parser<rfl::json::Reader, rfl::json::Writer, 
std::array<test_array::Person, 3>, rfl::Processors<> >::read(const 
rfl::json::Reader&, const InputVarType&)::<lambda(const 
rfl::parsing::Parser<rfl::json::Reader, rfl::json::Writer, 
std::array<test_array::Person, 3>, rfl::Processors<> >::InputArrayType&)>’:
/build/reproducible-path/reflect-cpp-0.18.0+ds/include/rfl/parsing/ArrayReader.hpp:30:56:
 note: ‘<anonymous>’ declared here
   30 |       return Error("Expected " + std::to_string(size_) + " elements, 
got " +
      |                    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Cheers
-- 
Sebastian Ramacher

Reply via email to