Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 933490

Summary: app-office/calligra-3.2.1-r9 w/ app-text/poppler-24.05.0: GooString.h:244:24: error: ‘ends_with’ has not been declared in ‘std::string’
Product: Gentoo Linux Reporter: Torsten Kaiser <Storklerk>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED FIXED    
Severity: normal CC: atoth, leonchik1976, office, Storklerk
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=931917
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 933693    
Attachments: set (CMAKE_CXX_STANDARD 20)
calligra-3.2.1-poppler-24.05-lut_7ef44c6864cc77abb529e11f83e01ae7dc7d5061.patch

Description Torsten Kaiser 2024-06-03 19:59:53 UTC
Created attachment 895007 [details, diff]
set (CMAKE_CXX_STANDARD 20)

Poppler changed to c++20 around 3 months ago:
https://gitlab.freedesktop.org/poppler/poppler/-/commit/d8ae3ba659c71b4f5913ecf74d525461bb831366

Last month GooString was switched from it's own startsWith/endsWith to the std::string functions new in c++20.
https://gitlab.freedesktop.org/poppler/poppler/-/commit/fbb64544e5ea25ac9b1bd25b48043d074efe9cd9

This was released as part of poppler-24.05 and now everything not yet switched to c++20 is broken.

See also: Bug 931917 - same thing happend to inkscape.

Fix for calligra is easy: Just switch to c++20 in CMakeLists.txt, similar to the already included c++17 patch.

After adding the attached patch to /etc/portage/patches calligra was successfully build with gcc-14, no further changes needed.
Comment 2 Attila Tóth 2024-06-05 11:34:05 UTC
Created attachment 895155 [details, diff]
calligra-3.2.1-poppler-24.05-lut_7ef44c6864cc77abb529e11f83e01ae7dc7d5061.patch

Upstream commit 7ef44c6864cc77abb529e11f83e01ae7dc7d5061 does not apply cleanly, I adjusted it.
Comment 3 Larry the Git Cow gentoo-dev 2024-06-06 18:09:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87e54ac491002dcb3fa18a57110d700c12dcb7a7

commit 87e54ac491002dcb3fa18a57110d700c12dcb7a7
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2024-06-06 17:45:07 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2024-06-06 18:09:25 +0000

    app-office/calligra: Fix build with >=app-text/poppler-24.05
    
    Thanks-to: Attila Tóth
    Closes: https://bugs.gentoo.org/933490
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 app-office/calligra/calligra-3.2.1-r9.ebuild       |  1 +
 .../files/calligra-3.2.1-poppler-24.05.0.patch     | 42 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)