Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 883067 - app-office/calligra-3.2.1-r5 fails to compile (CLANG-STRICTER-SYSTEM): Digest.cpp:253:5: error: ISO C++17 does not allow register storage class specifier [-Wregister]
Summary: app-office/calligra-3.2.1-r5 fails to compile (CLANG-STRICTER-SYSTEM): Digest...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-25 20:37 UTC by Agostino Sarubbo
Modified: 2024-03-01 14:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,77.06 KB, application/x-xz)
2022-11-25 20:37 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-11-25 20:37:12 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-office/calligra-3.2.1-r5 fails to compile (CLANG-STRICTER-SYSTEM).
Discovered on: amd64 (internal ref: clang-stricter_tinderbox)

NOTE:
(CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode

This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types

See also:
https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240
https://wiki.gentoo.org/wiki/Modern_C_porting
Comment 1 Agostino Sarubbo gentoo-dev 2022-11-25 20:37:15 UTC
Created attachment 836801 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2022-11-25 20:37:15 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: sheets/CMakeFiles/calligrasheetsodf.dir/part/Digest.cpp.o 
/var/tmp/portage/app-office/calligra-3.2.1-r5/work/calligra-3.2.1/sheets/part/Digest.cpp:253:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-14 00:12:09 UTC
I suggest we just append-cxxflags -std=c++14, as this file (at a glance) looks gone in the next release anyway. We can then drop the flag forcing.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-14 00:41:57 UTC
(In reply to Sam James from comment #3)
> I suggest we just append-cxxflags -std=c++14, as this file (at a glance)
> looks gone in the next release anyway. We can then drop the flag forcing.

Was fixed upstream in:
```
commit c5285855d6d982ef3eec860dba1d35c2eddc220c 
Author: Pierre Ducroquet <pinaraf@pinaraf.info>
Date:   Sat Feb 13 16:44:05 2021 +0100     

Switch from old-style connect to new-style
```

but I haven't verified that cherry-picking that patch's changes to Digest.cpp is sufficient, so let's just do -std.
Comment 5 Larry the Git Cow gentoo-dev 2023-02-15 08:29:08 UTC
The bug has been closed via the following commit(s):

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

commit e0a0a09c1bb283024c1a10f737eba380a22bcc1f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-15 08:26:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-15 08:26:50 +0000

    app-office/calligra: fix build w/ clang 16
    
    It's fixed upstream in a very large commit which can't be applied cleanly
    to 3.2.1-r5. We can drop this workaround upon the next release though.
    
    Closes: https://bugs.gentoo.org/883067
    Signed-off-by: Sam James <sam@gentoo.org>

 app-office/calligra/calligra-3.2.1-r5.ebuild | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2023-02-16 03:29:14 UTC
The bug has been closed via the following commit(s):

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

commit e3ae04d9c5f068e17d903ac7d5b16336589fb56e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-16 02:52:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-16 03:26:38 +0000

    app-office/calligra: fix build w/ clang 16 deux
    
    I was a bit naive and just checked for the appearance of register warnings
    by eye & -std=c++14 appearing and that's not good enough here, as we force
    C++17 for Poppler in a patch.
    
    Again, this is fixed upstream anyway, so this is a downstream-only patch.
    
    Fixes: e0a0a09c1bb283024c1a10f737eba380a22bcc1f
    Closes: https://bugs.gentoo.org/894578
    Closes: https://bugs.gentoo.org/883067
    Signed-off-by: Sam James <sam@gentoo.org>

 app-office/calligra/calligra-3.2.1-r5.ebuild       |   4 +-
 .../files/calligra-3.2.1-clang-16-c++17.patch      | 359 +++++++++++++++++++++
 2 files changed, 360 insertions(+), 3 deletions(-)