rttr
rttr copied to clipboard
Fails to build due to rapidjson
This happens when building:
[ 64s] /home/abuild/rpmbuild/BUILD/rttr-0.9.6/src/examples/json_serialization/from_json.cpp:242:36: required from here
[ 64s] /home/abuild/rpmbuild/BUILD/rttr-0.9.6/3rd_party/rapidjson-1.1.0/rapidjson/document.h:1966:24: error: 'void* memcpy(void*, const void*, size_t)' writing to an object of type 'rapidjson::GenericValue<rapidjson::UTF8<> >::Member' {aka 'struct rapidjson::GenericMember<rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator<> >'} with no trivial copy-assignment; use copy-assignment instead [-Werror=class-memaccess]
[ 64s] std::memcpy(m, members, count * sizeof(Member));
[ 64s] ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 64s] In file included from /home/abuild/rpmbuild/BUILD/rttr-0.9.6/src/examples/json_serialization/from_json.cpp:37:
[ 64s] /home/abuild/rpmbuild/BUILD/rttr-0.9.6/3rd_party/rapidjson-1.1.0/rapidjson/document.h:71:8: note: 'rapidjson::GenericValue<rapidjson::UTF8<> >::Member' {aka 'struct rapidjson::GenericMember<rapidjson::UTF8<>, rapidjson::MemoryPoolAllocator<> >'} declared here
[ 64s] struct GenericMember {
[ 64s] ^~~~~~~~~~~~~
I'll try skipping the example entirely, it should be sufficient.
please, tell me which compiler?
please, tell me which compiler?
gcc8-8.3.1+r269200-1.1
The rapidjson code is just invalid C++, apparently.
is, there a new version available, which I can upgrade to?
Looks like it - commit https://github.com/Tencent/rapidjson/commit/fa5963a2f5b231ee2babff771f169ccca22870ed fixes it.
Hello, This issue is causing me problems to package RTTR for debian sid and KDE Craft (GCC 8.1). Alternately, I simply disabled Werror, which maybe is not very future-proof for non-debug builds, as each new compiler version offers new warnings...