Version 5 (modified by admin, 3 years ago) (diff)


Mycroft Mark II - GUI using Qt 5.12 LTS

Build QT 5.12 LTS for eglfs

Install and compile Qt 5.12 LTS using this excellent guide:


I did add 1GB swap and set the GPU memory to 16MB while building which worked without problem and took about 10 hours.

Download and build

The following steps are from that guide and is only here so that it does not get lost.

then this command:

PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig \
../qt-everywhere-src-5.12.7/configure -platform linux-rpi-g++ \
-v \
-opengl es2 -eglfs \
-no-gtk \
-opensource -confirm-license -release \
-reduce-exports \
-force-pkg-config \
-nomake examples -no-compile-examples \
-skip qtwayland \
-skip qtwebengine \
-no-feature-geoservices_mapboxgl \
-qt-pcre \
-no-pch \
-ssl \
-evdev \
-system-freetype \
-fontconfig \
-glib \
-prefix /opt/Qt5.12 \
-qpa eglfs
  • make -j2
  • make install

This results in the complete build in /opt/Qt5.12

Building Kirigami

This is based on a combination of the official KDE guide to build the KDE framework at and this comprehensive guide at As above these are the pure commands:

change the qtdir so that it points to the Qt5.12 installation and comment the qt5-build-include and custom-qt5-libs-build-include

#    qtdir  ~/kde/qt5 # Where to find Qt5
    qtdir /opt/Qt5.12
# Qt and some Qt-using middleware libraries
# include /home/pi/kde/src/kdesrc-build/qt5-build-include
# include /home/pi/kde/src/kdesrc-build/custom-qt5-libs-build-include
  • kdesrc-build kirigami --include-dependencies

Test Kirigami

Use the exmaple from (also attached) and try to run it.

  • mkdir -p ~/ws_qt/kirigami
  • cd ~/ws_qt/kirigami

either edit the file and paste the content

  • nano main.qml

or download the attachement

run it (showing additional debug output and adding the kde framwork build to the import path)

  • QT_DEBUG_PLUGINS=1 QML_IMPORT_TRACE=1 QML2_IMPORT_PATH=/home/pi/kde/usr/lib/arm-linux-gnueabihf/qml /opt/Qt5.12/bin/qmlscene ~/ws_qt/kirigami/main.qml

build kio

The mycroft-gui also need KIO from the framework. Build it as above for kirigami.

  • ./kdesrc-build kio

Some of the packages failed to build but they don't seem to be necessary.

build the mycroft GUI

This is following but building the GUI manually for the QT5.12 and Kirigami installation above

  • cd ~
  • sudo apt-get install git -y
  • git clone
  • cd mycroft-gui
  • sudo apt-get install -y git-core g++ cmake extra-cmake-modules gettext pkg-config
  • mkdir build-testing
  • cd build-testing

Thy mycroft-gui has some dependencies (WebView, Plasma) that I removed for now because I don't see where they are used but I will see. Edit the CMakeLists.txt to remove them:

  • nano ../CMakeLists.txt
    #    WebView
        find_package(Qt5Widgets ${QT_MIN_VERSION} REQUIRED)
    #    find_package(KF5Plasma ${KF5_MIN_VERSION} REQUIRED)
        find_package(KF5DBusAddons ${KF5_MIN_VERSION} REQUIRED)
        find_package(KF5KIO ${KF5_MIN_VERSION} REQUIRED) # FIXME look for "KIOWidgets" (KRun) explicitly
  • nano ../application/main.cpp
    #include <QDebug>
    #include <QCursor>
    // #include <QtWebView/QtWebView>
    #ifdef Q_OS_ANDROID
    //    QtWebView::initialize();
        QQuickView view;
  • export CMAKE_PREFIX_PATH=/opt/Qt5.12:/home/pi/kde/usr
  • make -j4
  • sudo make install

build lottie

manually run the mycroft-gui

  • LD_LIBRARY_PATH=/opt/Qt5.12/lib:/home/pi/kde/usr/lib/arm-linux-gnueabihf QT_DEBUG_PLUGINS=1 QML_IMPORT_TRACE=1 QML2_IMPORT_PATH=/home/pi/kde/usr/lib/arm-linux-gnueabihf/qml /usr/bin/mycroft-gui-app

Attachments (1)

Download all attachments as: .zip