Having troubles building Kate

Christoph Cullmann christoph at cullmann.io
Mon Oct 19 08:59:02 BST 2020


On 2020-10-19 03:52, Horus S. Rico wrote:
> 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.

Hi,

nice that you are interested in fixing stuff!

Could you try to remove

# forbid some old things
add_definitions(-DQT_NO_FOREACH)

from the toplevel CMakeLists.txt?

Might be that isn't a good thing to have for frameworks that
are that old.

Greetings
Christoph

> 
> 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/
> katebacktracebrowserplugin.dir/katebacktracebrowser.cpp.o
> In file included from /usr/include/KF5/KConfigCore/KConfigGroup:1,
>                  from /home/fareden/kde/kate/addons/backtracebrowser/
> katebacktracebrowser.cpp:14:
> /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>&,
> KConfigBase::WriteConfigFlags)’:
> /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/
> Linux
> 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.

-- 
Ignorance is bliss...
https://cullmann.io | https://kate-editor.org


More information about the KWrite-Devel mailing list