<div dir="ltr">can you provide a patch?<div>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.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 8, 2021 at 12:48 PM <<a href="mailto:bugzilla_noreply@kde.org">bugzilla_noreply@kde.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><a href="https://bugs.kde.org/show_bug.cgi?id=432639" rel="noreferrer" target="_blank">https://bugs.kde.org/show_bug.cgi?id=432639</a><br>
<br>
Bug ID: 432639<br>
Summary: Konsole needs gcc > 8.3 (fully supporting C++17) for<br>
for_each_n function<br>
Product: konsole<br>
Version: master<br>
Platform: Compiled Sources<br>
OS: Linux<br>
Status: REPORTED<br>
Severity: normal<br>
Priority: NOR<br>
Component: general<br>
Assignee: <a href="mailto:konsole-devel@kde.org" target="_blank">konsole-devel@kde.org</a><br>
Reporter: <a href="mailto:rcorreia31@gmail.com" target="_blank">rcorreia31@gmail.com</a><br>
Target Milestone: ---<br>
<br>
SUMMARY<br>
By default CentOS 8.3 uses gcc 8.3.1.<br>
Konsole from master now fails due to this error:<br>
/media/MyPassport/git/konsole/src/Screen.cpp: In function 'void toDebug(const<br>
Konsole::Character*, int, bool)':<br>
/media/MyPassport/git/konsole/src/Screen.cpp:394:10: error: 'for_each_n' is not<br>
a member of 'std'<br>
std::for_each_n(s, count, [&out](const Character &i) { out += i.character;<br>
});<br>
^~~~~~~~~~<br>
/media/MyPassport/git/konsole/src/Screen.cpp:394:10: note: suggested<br>
alternative: 'for_each'<br>
std::for_each_n(s, count, [&out](const Character &i) { out += i.character;<br>
});<br>
^~~~~~~~~~<br>
for_each<br>
<br>
To be able to compile, another tool chain fully supporting C++17 must be<br>
installed and enabled: dnf install gcc-toolset-10-toolchain (or<br>
gcc-toolset-9-toolchain).<br>
Then all compiles well.<br>
This is the first time this requirement appears for KDE from what I can tell.<br>
<br>
A link about that: <a href="https://github.com/VcDevel/Vc/issues/182" rel="noreferrer" target="_blank">https://github.com/VcDevel/Vc/issues/182</a><br>
<br>
Even if this is easily fixed with a newer toolchain, it will cause some<br>
questions.<br>
<br>
STEPS TO REPRODUCE<br>
1. cmake<br>
2. make<br>
<br>
OBSERVED RESULT<br>
Compilation error: <br>
/git/konsole/src/Screen.cpp:394:10: error: 'for_each_n' is not a member of<br>
'std'<br>
/git/konsole/src/Screen.cpp:394:10: note: suggested alternative: 'for_each'<br>
<br>
EXPECTED RESULT<br>
Change to a source code allowing a successful compilation with gcc 8.3.x or add<br>
a cmake check explaining this new requirement (dnf install<br>
gcc-toolset-10-toolchain or dnf install gcc-toolset-9-toolchain).<br>
<br>
SOFTWARE/OS VERSIONS<br>
KDE Plasma Version: 5.20.2<br>
KDE Frameworks Version: 5.76.0<br>
Qt Version: 5.15.1<br>
<br>
-- <br>
You are receiving this mail because:<br>
You are the assignee for the bug.</blockquote></div>