Plasma-workspace build failing with kdesrc-build

I’m using the development iso in a VirtualBox VM (host OS Windows) to build KDE Plasma (as described in the docs: (for some reason, I can’t attach a link to this host, so I’m omitting an “h”: ttps://community.kde.org/Get_Involved/development/Build_software_with_kdesrc-build)):


However, while building plasma-workspace (the top-level package, not any of its dependencies), I encounter an error that I don’t know how to fix:

[3/1471] Building CXX object components/shellprivate/CMakeFiles/plasmashellprivateplugin.dir/widgetexplorer/w>
FAILED: components/shellprivate/CMakeFiles/plasmashellprivateplugin.dir/widgetexplorer/widgetexplorer.cpp.o
/usr/bin/c++ -DKCOREADDONS_LIB -DKDECLARATIVE_DEPRECATED_WARNINGS_SINCE=0x60000 -DKDECLARATIVE_DISABLE_DEPREC>
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:101:21>
  101 |     static QPointer<KNS3::QtQuickDialogWrapper> newStuffDialog;
...

I’ve tried re-running the build and removing the build directory (multiple times, in various orders), but I still get the error (I’ve also tried googling it + asking ChatGPT, no luck). I don’t know why this error happens or how to fix it, so any ideas would be appreciated.
Here’s is the full log (if needed:

/src/log/latest/plasma-workspace/error.log
# kdesrc-build running: 'ninja' '-j' '4'
# from directory: /home/randomletters/kde/build/plasma-workspace
[1/1471] Generating ts...
[2/1471] Generating mo...
[3/1471] Building CXX object components/shellprivate/CMakeFiles/plasmashellprivateplugin.dir/widgetexplorer/widgetexplorer.cpp.o
FAILED: components/shellprivate/CMakeFiles/plasmashellprivateplugin.dir/widgetexplorer/widgetexplorer.cpp.o 
/usr/bin/c++ -DKCOREADDONS_LIB -DKDECLARATIVE_DEPRECATED_WARNINGS_SINCE=0x60000 -DKDECLARATIVE_DISABLE_DEPRECATED_BEFORE_AND_AT=0x55800 -DKF_DEPRECATED_WARNINGS_SINCE=0x60000 -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x56200 -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DEPRECATED_WARNINGS_SINCE=0x60000 -DQT_DISABLE_DEPRECATED_BEFORE=0x50f02 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DTRANSLATION_DOMAIN=\"plasmashellprivateplugin\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dplasmashellprivateplugin_EXPORTS -I/home/randomletters/kde/build/plasma-workspace/components/shellprivate -I/home/randomletters/kde/src/plasma-workspace/components/shellprivate -I/home/randomletters/kde/build/plasma-workspace/components/shellprivate/plasmashellprivateplugin_autogen/include -I/home/randomletters/kde/build/plasma-workspace -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/QtQmlModels -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /home/randomletters/kde/usr/include/KF5 -isystem /home/randomletters/kde/usr/include/KF5/Plasma -isystem /home/randomletters/kde/usr/include/KF5/KConfig -isystem /home/randomletters/kde/usr/include/KF5/KConfigCore -isystem /home/randomletters/kde/usr/include/KF5/KCoreAddons -isystem /home/randomletters/kde/usr/include/KF5/KService -isystem /home/randomletters/kde/usr/include/KF5/KPackage -isystem /home/randomletters/kde/usr/include/KF5/KWindowSystem -isystem /home/randomletters/kde/usr/include/KF5/KI18n -isystem /usr/include/KF5/KNewStuff3 -isystem /usr/include/KF5/KMoreTools -isystem /usr/include/KF5 -isystem /home/randomletters/kde/usr/include/KF5/Attica -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /home/randomletters/kde/usr/include/KF5/KXmlGui -isystem /home/randomletters/kde/usr/include/KF5/KConfigWidgets -isystem /home/randomletters/kde/usr/include/KF5/KWidgetsAddons -isystem /home/randomletters/kde/usr/include/KF5/KConfigGui -isystem /home/randomletters/kde/usr/include/KF5/KCodecs -isystem /home/randomletters/kde/usr/include/KF5/KAuthWidgets -isystem /home/randomletters/kde/usr/include/KF5/KAuthCore -isystem /home/randomletters/kde/usr/include/KF5/KAuth -isystem /usr/include/x86_64-linux-gnu/qt5/QtDBus -isystem /home/randomletters/kde/usr/include/KF5/KIOFileWidgets -isystem /home/randomletters/kde/usr/include/KF5/KIOWidgets -isystem /home/randomletters/kde/usr/include/KF5/KIOGui -isystem /home/randomletters/kde/usr/include/KF5/KIOCore -isystem /home/randomletters/kde/usr/include/KF5/KIO -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /home/randomletters/kde/usr/include/KF5/KJobWidgets -isystem /home/randomletters/kde/usr/include/KF5/Solid -isystem /home/randomletters/kde/usr/include/KF5/KCompletion -isystem /home/randomletters/kde/usr/include/KF5/KBookmarks -isystem /home/randomletters/kde/usr/include/KF5/KItemViews -isystem /home/randomletters/kde/usr/include/KF5/KActivities -isystem /home/randomletters/kde/usr/include/KF5/KTextWidgets -isystem /home/randomletters/kde/usr/include/KF5/SonnetUi -isystem /home/randomletters/kde/usr/include/KF5/Sonnet -pipe -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -fdiagnostics-color=always -O2 -g -DNDEBUG -std=gnu++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -MD -MT components/shellprivate/CMakeFiles/plasmashellprivateplugin.dir/widgetexplorer/widgetexplorer.cpp.o -MF components/shellprivate/CMakeFiles/plasmashellprivateplugin.dir/widgetexplorer/widgetexplorer.cpp.o.d -o components/shellprivate/CMakeFiles/plasmashellprivateplugin.dir/widgetexplorer/widgetexplorer.cpp.o -c /home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:101:21: error: ‘KNS3’ was not declared in this scope
  101 |     static QPointer<KNS3::QtQuickDialogWrapper> newStuffDialog;
      |                     ^~~~
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:101:47: error: template argument 1 is invalid
  101 |     static QPointer<KNS3::QtQuickDialogWrapper> newStuffDialog;
      |                                               ^
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:106:10: error: ‘KNS3’ was not declared in this scope
  106 | QPointer<KNS3::QtQuickDialogWrapper> WidgetExplorerPrivate::newStuffDialog;
      |          ^~~~
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:106:36: error: template argument 1 is invalid
  106 | QPointer<KNS3::QtQuickDialogWrapper> WidgetExplorerPrivate::newStuffDialog;
      |                                    ^
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp: In member function ‘void WidgetExplorer::downloadWidgets()’:
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:488:47: error: request for member ‘isNull’ in ‘WidgetExplorerPrivate::newStuffDialog’, which is of non-class type ‘int’
  488 |     if (WidgetExplorerPrivate::newStuffDialog.isNull()) {
      |                                               ^~~~~~
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:489:53: error: ‘KNS3’ does not name a type
  489 |         WidgetExplorerPrivate::newStuffDialog = new KNS3::QtQuickDialogWrapper(QStringLiteral("plasmoids.knsrc"));
      |                                                     ^~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:53,
                 from /usr/include/x86_64-linux-gnu/qt5/QtGui/qkeysequence.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qaction.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QAction:1,
                 from /home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.h:11,
                 from /home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:9:
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:489:80: error: expected primary-expression before ‘)’ token
  489 |         WidgetExplorerPrivate::newStuffDialog = new KNS3::QtQuickDialogWrapper(QStringLiteral("plasmoids.knsrc"));
      |                                                                                ^~~~~~~~~~~~~~
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:490:57: error: ‘KNS3’ has not been declared
  490 |         connect(WidgetExplorerPrivate::newStuffDialog, &KNS3::QtQuickDialogWrapper::closed, WidgetExplorerPrivate::newStuffDialog, &QObject::deleteLater);
      |                                                         ^~~~
/home/randomletters/kde/src/plasma-workspace/components/shellprivate/widgetexplorer/widgetexplorer.cpp:492:46: error: base operand of ‘->’ is not a pointer
  492 |         WidgetExplorerPrivate::newStuffDialog->open();
      |                                              ^~
[4/1471] Building CXX object components/keyboardlayout/CMakeFiles/keyboardlayoutplugin.dir/layoutnames.cpp.o
[5/1471] Building CXX object components/keyboardlayout/CMakeFiles/keyboardlayoutplugin.dir/keyboardlayoutplugin.cpp.o
[6/1471] Building CXX object components/keyboardlayout/CMakeFiles/keyboardlayoutplugin.dir/virtualkeyboard.cpp.o
ninja: build stopped: subcommand failed.

If you take a peek in your ~/kde/src/log/latest/plasma-workspace/cmake.log (or build.log, I don’t recall right now), is there any NOT FOUND message about KNewStuff? If so, including knewstuff to your kdesrc-build should work.

Sorry for the late reply, but my build.log and error.log are identical, there’s no cmake.log, and I didn’t see anything glaringly obvious (or anything at all) about KNewStuff. Nevertheless, I’m running kdesrc-build knewstuff now, and will report back with any new information. Thanks for the idea!

edit: knewstuff installed, but plasma-workspace still does not build

I’d suggest uploading the full log to a paste service so the developers can see the full context/log.

I’ve already uploaded the (I believe) relevant build.log (which is identical to the error.log) in my first post, and I don’t know where to find the full build log - any suggestions?

Ah I missed it as it was folded.

I can’t edit the original post (as far as I can tell) and that missing parenthesis is driving me out of my mind now (haha), but thanks for pointing that out - I’ll keep it in mind for the future!

Did you build it with kdesrc-build ?

By the way you can build plasma, with just kdesrc-build --include-dependencies plasma-desktop

I recommend you to build and install plasma-pa and plasma-nm to have audio and network management in you session.

Yes, I did. I’ve just tried running
kdesrc-build plasma-desktop plasma-nm plasma-pa --include-dependencies
but that leads to building plasma-workspace as package 81 of 93, which causes the build to fail with the same error.

Which branch are you building ?

Maybe you need to refresh the knewstuff library:
kdesrc-build --refresh-build knewstuff

Perhaps better talk directly: