dangvd/ksmoothdock

Install Fails on Arch

Closed this issue · 4 comments

I get this when trying to install ksmoothdock from the aur: /home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.cc: In member function ‘bool ksmoothdock::ApplicationMenuConfig::loadEntry(const QString&)’:
/home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.cc:163:32: error: ‘QString::SkipEmptyParts’ is deprecated [-Werror=deprecated-declarations]
163 | .split(';', QString::SkipEmptyParts);
| ^~~~~~~~~~~~~~
In file included from /usr/include/qt/QtCore/qdir.h:43,
from /usr/include/qt/QtCore/QDir:1,
from /home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.h:9,
from /home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.cc:19:
/usr/include/qt/QtCore/qstring.h:600:9: note: declared here
600 | SkipEmptyParts Q_DECL_ENUMERATOR_DEPRECATED
| ^~~~~~~~~~~~~~
/home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.cc:163:32: error: ‘QString::SkipEmptyParts’ is deprecated [-Werror=deprecated-declarations]
163 | .split(';', QString::SkipEmptyParts);
| ^~~~~~~~~~~~~~
In file included from /usr/include/qt/QtCore/qdir.h:43,
from /usr/include/qt/QtCore/QDir:1,
from /home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.h:9,
from /home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.cc:19:
/usr/include/qt/QtCore/qstring.h:600:9: note: declared here
600 | SkipEmptyParts Q_DECL_ENUMERATOR_DEPRECATED
| ^~~~~~~~~~~~~~
/home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.cc:163:46: error: ‘QStringList QString::split(QChar, QString::SplitBehavior, Qt::CaseSensitivity) const’ is deprecated: Use Qt::SplitBehavior variant instead [-Werror=deprecated-declarations]
163 | .split(';', QString::SkipEmptyParts);
| ^
In file included from /usr/include/qt/QtCore/qdir.h:43,
from /usr/include/qt/QtCore/QDir:1,
from /home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.h:9,
from /home/frostranger/.cache/yay/ksmoothdock/src/ksmoothdock-6.2/src/model/application_menu_config.cc:19:
/usr/include/qt/QtCore/qstring.h:610:17: note: declared here
610 | QStringList split(QChar sep, SplitBehavior behavior,
| ^~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/ksmoothdock_lib.dir/build.make:96: CMakeFiles/ksmoothdock_lib.dir/model/application_menu_config.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:601: CMakeFiles/ksmoothdock_lib.dir/all] Error 2
make: *** [Makefile:161: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
error making: %!s(func() string=0x5602ec8f0ed0)

Using the git version also fails with the same error

Thanks for reporting.

Yeah they are deprecated in Qt 5.15 which was released last month. You have a very up-to-date system.

I'll fix it.

In the mean time, can you try to remove these 2 lines from src/CMakeList.txt:
add_compile_options(-Wall -Werror)
add_definitions(-DQT_DEPRECATED_WARNINGS)
and build again?

Basically, currently all warnings are treated as errors.

Same problem with KDE Neon which has too the 5.15 version of Qt
Removing the 2 lines in CMakeList.txt solve the problem of compilation

Fixed in v6.3