Bugzilla – Bug 1221875
GCC 14: opencc package fails
Last modified: 2024-07-16 15:24:30 UTC
Building opencc with GCC 14 fails here: https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/opencc/standard/x86_64 Or built using: osc build --alternative-project openSUSE:Factory:Staging:Gcc7 Due to: OpenCC-ver.1.1.7/src/../deps/rapidjson-1.1.0/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’ 319 | GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } | ~~~~~~~^~~~~~~~~~~~ In file included from /home/abuild/rpmbuild/BUILD/OpenCC-ver.1.1.7/src/DictEntry.hpp:22, from /home/abuild/rpmbuild/BUILD/OpenCC-ver.1.1.7/src/Dict.hpp:22, from /home/abuild/rpmbuild/BUILD/OpenCC-ver.1.1.7/src/DictGroup.hpp:24, from /home/abuild/rpmbuild/BUILD/OpenCC-ver.1.1.7/src/Config.cpp:28: OpenCC-ver.1.1.7/src/../deps/rapidjson-1.1.0/rapidjson/document.h:315:13: error: invalid conversion from ‘const char*’ to ‘rapidjson::GenericStringRef<char>::Ch*’ {aka ‘char*’} [-fpermissive] 315 | : s(str), length(len) { RAPIDJSON_ASSERT(s != 0); } | ^~~ | | | const char* (...) ---------------- Main culprit seems to be rapidjson, can we use openSUSE:Factory/rapidjson ? rapidjson in Factory is a bit newer and builds with GCC14.
I just switch rapidjson to system version, have a try
Indeed, the build passes now. Thanks.