Having troubles building Kate

Horus S. Rico horus.sandoval at carpathialab.com
Mon Oct 19 02:52:35 BST 2020

Hi, KDE Mailing List!

I'm trying to fix some bugs I found on Kate and also I want to do some 
extensions that could be useful, but I'm pretty new working and building KDE 
software and by now I'm having a trouble building Kate.

When I execute `make` I got a lot of errors like this:

fareden at tardis:~/kde/kate/build$ make
[  0%] Automatic MOC for target katebacktracebrowserplugin
[  0%] Built target katebacktracebrowserplugin_autogen
[  0%] Building CXX object addons/backtracebrowser/CMakeFiles/
In file included from /usr/include/KF5/KConfigCore/KConfigGroup:1,
                 from /home/fareden/kde/kate/addons/backtracebrowser/
/usr/include/KF5/KConfigCore/kconfiggroup.h: In member function ‘QList<T> 
KConfigGroup::readEntry(const char*, const QList<T>&) const’:
/usr/include/KF5/KConfigCore/kconfiggroup.h:734:16: error: expected primary-
expression before ‘const’
     Q_FOREACH (const T &value, defaultValue) {
/usr/include/KF5/KConfigCore/kconfiggroup.h:734:45: error: expected ‘;’ before 
‘{’ token
     Q_FOREACH (const T &value, defaultValue) {
/usr/include/KF5/KConfigCore/kconfiggroup.h:739:16: error: expected primary-
expression before ‘const’
     Q_FOREACH (const QVariant &value, readEntry<QVariantList>(key, data)) {
/usr/include/KF5/KConfigCore/kconfiggroup.h:739:5: error: there are no arguments 
to ‘Q_FOREACH’ that depend on a template parameter, so a declaration of 
‘Q_FOREACH’ must be available [-fpermissive]
     Q_FOREACH (const QVariant &value, readEntry<QVariantList>(key, data)) {
/usr/include/KF5/KConfigCore/kconfiggroup.h:739:5: note: (if you use ‘-
fpermissive’, G++ will accept your code, but allowing the use of an undeclared 
name is deprecated)
/usr/include/KF5/KConfigCore/kconfiggroup.h:739:74: error: expected ‘;’ before 
‘{’ token
     Q_FOREACH (const QVariant &value, readEntry<QVariantList>(key, data)) {
/usr/include/KF5/KConfigCore/kconfiggroup.h: In member function ‘void 
KConfigGroup::writeEntry(const char*, const QList<T>&, 
/usr/include/KF5/KConfigCore/kconfiggroup.h:760:16: error: expected primary-
expression before ‘const’
     Q_FOREACH (const T &value, list) {
/usr/include/KF5/KConfigCore/kconfiggroup.h:760:37: error: expected ‘;’ before 
‘{’ token
     Q_FOREACH (const T &value, list) {
make[2]: *** [addons/backtracebrowser/CMakeFiles/
katebacktracebrowserplugin.dir/build.make:71: addons/backtracebrowser/
CMakeFiles/katebacktracebrowserplugin.dir/katebacktracebrowser.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:901: addons/backtracebrowser/CMakeFiles/
katebacktracebrowserplugin.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

As far I can understand the macro Q_FOREACH is not present or not working. I 
already try to figure it out how to fix it but I can't find anything on the web.

My system:
Linux tardis 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/
Make version: GNU Make 4.2.1
Qt version: Qt version 5.11.3 in /usr/lib/x86_64-linux-gnu
I have already installed all the suggested packages on the https://kate-editor.org/build-it/ site.

Thanks in advance.
Horus S. Rico
Líder Tecnológico.

More information about the KWrite-Devel mailing list