Bug 1221875 - GCC 14: opencc package fails
Summary: GCC 14: opencc package fails
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Marguerite Su
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc14
  Show dependency treegraph
 
Reported: 2024-03-22 15:39 UTC by Michal Jireš
Modified: 2024-07-16 15:24 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Jireš 2024-03-22 15:39:13 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.
Comment 1 Marguerite Su 2024-05-24 04:21:32 UTC
I just switch rapidjson to system version, have a try
Comment 2 Martin Jambor 2024-07-16 15:24:30 UTC
Indeed, the build passes now.  Thanks.