[konsole] [Bug 432639] New: Konsole needs gcc > 8.3 (fully supporting C++17) for for_each_n function
Tomaz Canabrava
tcanabrava at kde.org
Mon Feb 8 12:55:21 GMT 2021
can you provide a patch?
c++17 is 4 years old and I don't really like to fix compiler bugs, even
though I know that gcc 8.4 was released just last year and that's not a lot
of time for linux distros to pick it up.
On Mon, Feb 8, 2021 at 12:48 PM <bugzilla_noreply at kde.org> wrote:
> https://bugs.kde.org/show_bug.cgi?id=432639
>
> Bug ID: 432639
> Summary: Konsole needs gcc > 8.3 (fully supporting C++17) for
> for_each_n function
> Product: konsole
> Version: master
> Platform: Compiled Sources
> OS: Linux
> Status: REPORTED
> Severity: normal
> Priority: NOR
> Component: general
> Assignee: konsole-devel at kde.org
> Reporter: rcorreia31 at gmail.com
> Target Milestone: ---
>
> SUMMARY
> By default CentOS 8.3 uses gcc 8.3.1.
> Konsole from master now fails due to this error:
> /media/MyPassport/git/konsole/src/Screen.cpp: In function 'void
> toDebug(const
> Konsole::Character*, int, bool)':
> /media/MyPassport/git/konsole/src/Screen.cpp:394:10: error: 'for_each_n'
> is not
> a member of 'std'
> std::for_each_n(s, count, [&out](const Character &i) { out +=
> i.character;
> });
> ^~~~~~~~~~
> /media/MyPassport/git/konsole/src/Screen.cpp:394:10: note: suggested
> alternative: 'for_each'
> std::for_each_n(s, count, [&out](const Character &i) { out +=
> i.character;
> });
> ^~~~~~~~~~
> for_each
>
> To be able to compile, another tool chain fully supporting C++17 must be
> installed and enabled: dnf install gcc-toolset-10-toolchain (or
> gcc-toolset-9-toolchain).
> Then all compiles well.
> This is the first time this requirement appears for KDE from what I can
> tell.
>
> A link about that: https://github.com/VcDevel/Vc/issues/182
>
> Even if this is easily fixed with a newer toolchain, it will cause some
> questions.
>
> STEPS TO REPRODUCE
> 1. cmake
> 2. make
>
> OBSERVED RESULT
> Compilation error:
> /git/konsole/src/Screen.cpp:394:10: error: 'for_each_n' is not a member of
> 'std'
> /git/konsole/src/Screen.cpp:394:10: note: suggested alternative: 'for_each'
>
> EXPECTED RESULT
> Change to a source code allowing a successful compilation with gcc 8.3.x
> or add
> a cmake check explaining this new requirement (dnf install
> gcc-toolset-10-toolchain or dnf install gcc-toolset-9-toolchain).
>
> SOFTWARE/OS VERSIONS
> KDE Plasma Version: 5.20.2
> KDE Frameworks Version: 5.76.0
> Qt Version: 5.15.1
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20210208/ac5a2597/attachment.htm>
More information about the konsole-devel
mailing list