#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-491

### Chapter 30. KDE Frameworks 6

- Prev

  KDE Frameworks 6 Pre-installation Configuration

- Next

  KDE Frameworks 6 Based Applications

- Up
- Home

# Building KDE Frameworks 6.23.0 (KF6)

KDE Frameworks is a collection of libraries based on top of Qt6 and QML derived from the previous KDE libraries. They can be used independent of the KDE Display Environment (Plasma 6).

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

The instructions below build all of the KDE Frameworks packages in one step by using a bash script.

### Package Information

- Download (HTTP): https://download.kde.org/stable/frameworks/6.23

- Download MD5 sum: See Below

- Download size: 109 MB

- Estimated disk space required: 3.0 GB (197 MB installed)

- Estimated build time: 12 SBU (using parallelism=8)

### KF6 Dependencies

#### Required

Extra-CMake-Modules-6.23.0, breeze-icons-6.23.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libgcrypt-1.12.2, libical-3.0.20, libsecret-0.21.7, libxslt-1.1.45, lmdb-0.9.35, qca-2.3.10, libqrencode-4.1.1, plasma-wayland-protocols-1.20.0, PyYAML-6.0.3, shared-mime-info-2.4, URI-5.34, and Wget-1.25.0 (required to download the packages)

#### Recommended

Aspell-0.60.8.2 (Dictionary backend for Sonnet), Avahi-0.8 (DNS-SD backend for KDNSSD), ModemManager-1.24.2 (needed to build ModemManager-Qt), NetworkManager-1.56.0 (needed to build NetworkManager-Qt), polkit-qt-0.201.1 (Authentication backend for KAuth), Vulkan-Loader-1.4.341.0 (Add support for Vulkan graphics drivers), and zxing-cpp-3.0.2 (Add support needed to build spectacle)

Furthermore, the instructions below assume that the environment has been set up as described in Introduction to KF6.

#### Optional

BlueZ-5.86 (needed to build Bluez-Qt) and Datamatrix (deemed recommended for Prison by upstream)

#### Runtime dependency for FrameworkIntegration

Noto fonts

#### Additional recommended dependencies for kapidox

Doxygen-1.17.0 (Run time), doxypypy-0.8.8.7, doxyqml-0.5.3, and requests-2.33.1

#### Additional image formats support in KImageFormats

libavif-1.4.1, libheif-1.21.2, libjxl-0.11.2, libraw-0.22.1, OpenEXR

#### Optional dependencies for Solid

UDisks-2.11.1, UPower-1.91.2 and media-player-info (runtime)

#### Optional dependency for KWallet

gpgmepp-2.0.0

#### Optional dependencies for kcoreaddons

Shiboken6 and PySide6

#### Optional dictionary backends for Sonnet

Hspell and Hunspell

## Downloading KDE Frameworks

The easiest way to get the KDE Frameworks packages is to use a single wget to fetch them all at once:

    url=https://download.kde.org/stable/frameworks/6.23/
    wget -r -nH -nd -A '*.xz' -np $url

    The options used here are:
      -r            recurse through child directories
      -nH           disable generation of host-prefixed directories
      -nd           do not create a hierarchy of directories
      -A '*.xz'     just get the *.xz files
      -np           don't get parent directories

## Setting Package Order

The order of building files is important due to internal dependencies. Create the list of files in the proper order as follows:

    cat > frameworks-6.23.0.md5 << "EOF"
    7f5e6053833355988580d124cb5c5331  attica-6.23.0.tar.xz
    #b9c562bac371dcf693ceccb431cad782  extra-cmake-modules-6.23.0.tar.xz
    81be2706e95070ef2e8d5db08b61ec36  kapidox-6.23.0.tar.xz
    af026d47371ce53861d9690b7fd24f4a  karchive-6.23.0.tar.xz
    8e9793683a6cdff52354bf01688814cf  kcodecs-6.23.0.tar.xz
    ff251eb0454169bdd9b905be308602e1  kconfig-6.23.0.tar.xz
    a471374e701aaf344443edc544fd7a9b  kcoreaddons-6.23.0.tar.xz
    b9d47c2926eeae091dbd34a5e3c4ee6a  kdbusaddons-6.23.0.tar.xz
    3ade961d35d6cee2ecc65c183239be09  kdnssd-6.23.0.tar.xz
    #2c1c531fe46ddaca670ce7b17232d1dd  kguiaddons-6.23.0.tar.xz
    992519166dbb9370c43704385ea20558  kguiaddons-6.23.1.tar.xz
    3e50f60355ad2072cf5190b6602f6f67  ki18n-6.23.0.tar.xz
    6ecb97791b574c93e82e2b31e9e15a4f  kidletime-6.23.0.tar.xz
    cdfda2ead13c6fba183d96c502b3532f  kimageformats-6.23.0.tar.xz
    a0a2a59ed844903093ab4544eebbfdc0  kitemmodels-6.23.0.tar.xz
    80cd780c0d6b0244d1f78db67d0fa64a  kitemviews-6.23.0.tar.xz
    1eaf72467eda257e7f92aa3af1f4f2c4  kplotting-6.23.0.tar.xz
    731b50c86228c901a51a4f23d9b8c875  kwidgetsaddons-6.23.0.tar.xz
    c25a4af6bac14133a038ac64c00e6e35  kwindowsystem-6.23.0.tar.xz
    72c92cae8ef3353968ed8f0de5086b49  networkmanager-qt-6.23.0.tar.xz
    c84db21836589cbe499d788800f1e4bf  solid-6.23.0.tar.xz
    48848833c731c3955a15b5d92af2e261  sonnet-6.23.0.tar.xz
    2af774a263d6a96ac2cf1a1b1625ffd0  threadweaver-6.23.0.tar.xz
    3459dd6a909ce38d4cf550b09ea1a156  kauth-6.23.0.tar.xz
    e9fa7e2ee27c677876cc82654c224cd4  kcompletion-6.23.0.tar.xz
    31d5bf5fb58c0db2af3f64b2e58e3dd2  kcrash-6.23.0.tar.xz
    54bc6affc404656abe170e3d5de53040  kdoctools-6.23.0.tar.xz
    a97cbf17038c4995d2f2bd22223aa2be  kpty-6.23.0.tar.xz
    c16caf60255f88491b7ad734393a74a8  kunitconversion-6.23.0.tar.xz
    13d3f9b0e8603d11ec5021fc89655e8e  kcolorscheme-6.23.0.tar.xz
    2b0c888201444f9a2545c42fb622fcda  kconfigwidgets-6.23.0.tar.xz
    #bc5d5ec03447e31ac1cb3390e31d8e0e  kservice-6.23.0.tar.xz
    a2a26413473f429108002c3774f847f4  kservice-6.23.1.tar.xz
    5b9b4765c8dbe1a2cfd5c26fdc018cc4  kglobalaccel-6.23.0.tar.xz
    982fa2202cd799440ed75d514cf252fc  kpackage-6.23.0.tar.xz
    05e3ce90249bfa35e9f6141f3b836586  kdesu-6.23.0.tar.xz
    30878c5dafdbc0cf56d501ec2a0160ad  kiconthemes-6.23.0.tar.xz
    79b0eb4ffa38c05f577906fb22546983  knotifications-6.23.0.tar.xz
    77a32fda6c00c1fec55258d9d3f93107  kjobwidgets-6.23.0.tar.xz
    01c003d32107dbadff8cc49df77d48ee  ktextwidgets-6.23.0.tar.xz
    8f2cd3edd3f7ec208064148745d2005a  kxmlgui-6.23.0.tar.xz
    2bea8e1c8b35612d3a737ce4dfd55c7e  kbookmarks-6.23.0.tar.xz
    72b042c87f63d65a26354c85c0603422  kwallet-6.23.0.tar.xz
    07b2486ba61789183dcb3a0cd0195ad7  kded-6.23.0.tar.xz
    bc3542b9fd9f457c42716985d7d521c9  kio-6.23.0.tar.xz
    8f73a6558ec2751c2f5aed48445f92e5  kdeclarative-6.23.0.tar.xz
    a4bea919b1bb17ae2bea4391f9e1ed89  kcmutils-6.23.0.tar.xz
    #75aacf94859607acbf559e4ea13e33c3  kirigami-6.23.0.tar.xz
    a56601923ca393d98ce5f42e6153d95b  kirigami-6.23.1.tar.xz
    d5792a6ecc962b5627b25e836523a92f  syndication-6.23.0.tar.xz
    d660b791fa1371a79b748b71045a03f4  knewstuff-6.23.0.tar.xz
    530b86fbf3b196f7b18ade8d0bded15c  frameworkintegration-6.23.0.tar.xz
    b0a490e46de5c0462737559dfdf78318  kparts-6.23.0.tar.xz
    d603462ba045e9bceba9cebffa5b2bc4  syntax-highlighting-6.23.0.tar.xz
    39ebea55fbcd952e316d70ca9db92286  ktexteditor-6.23.0.tar.xz
    b1fe0e064401bd89408331cda4e43ecf  modemmanager-qt-6.23.0.tar.xz
    7e6f12fa0d52a05f837260fe8c176837  kcontacts-6.23.0.tar.xz
    627545d2bb64280cb6e726ca15e3b6a3  kpeople-6.23.0.tar.xz
    2b90def0079acc96566631caf35ddcbd  bluez-qt-6.23.0.tar.xz
    9e0008e31216062e3f282de618d9d7da  kfilemetadata-6.23.0.tar.xz
    e94361e6311e89e5dcf4e1bb7ee37d66  baloo-6.23.0.tar.xz
    #c8e3ceb2a349683510aeee1b5bccf521  breeze-icons-6.23.0.tar.xz
    99b8d338845974e7054f13fb0dd0414f  krunner-6.23.0.tar.xz
    f3e0f1dc78f55e3e98788e52e6f353ce  prison-6.23.0.tar.xz
    e038915d3aabd6cb4152a75de45c9a68  qqc2-desktop-style-6.23.0.tar.xz
    b677d299d7b1d8e976905bcb93dbd4ab  kholidays-6.23.0.tar.xz
    a61df0e0ed04127740d9088bae3bd7b5  purpose-6.23.0.tar.xz
    d74a32da736d9186843e5ba3ff66740f  kcalendarcore-6.23.0.tar.xz
    717105d7e9dcaac6256471f8b5286eca  kquickcharts-6.23.0.tar.xz
    d276123343d251dd51471ea7eaa4f801  knotifyconfig-6.23.0.tar.xz
    39c6c20192c9ea9eef5b33437df66fd8  kdav-6.23.0.tar.xz
    c7d67aa70a326713c1af883d62563e90  kstatusnotifieritem-6.23.0.tar.xz
    f6c9809f880968ce6db12873bf827ff0  ksvg-6.23.0.tar.xz
    14ffa33ff0a440bbb97f329b738f4d92  ktexttemplate-6.23.0.tar.xz
    735f61eee9c3185123ffe82118a91645  kuserfeedback-6.23.0.tar.xz
    EOF

In the above list, notice that some files have been commented out with a hash (#) character.

- The extra-cmake-modules entry has been commented out because it was built earlier in the Introduction to KDE.

- This icon package is covered separately at breeze-icons-6.23.0. It is separate to allow users that need these icons but do not need the full set of KF6 packages (e.g. LXQt-Post-Install) to more easily install them. However they are a required dependency for several kf6 packages.

- Three files with version numbers 6.23.1 are bug fixes that supersede Their respective 6.23.0 versions.

## Installation of KDE Frameworks

### Note

When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

1. Run the entire script as the root user (not recommended).

2. Use the sudo command from the Sudo-1.9.17p2 package.

3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

    as_root()
    {
      if   [ $EUID = 0 ];        then $*
      elif [ -x /usr/bin/sudo ]; then sudo $*
      else                            su -c \\"$*\\"
      fi
    }

    export -f as_root

### Caution

If installing in `/opt` and there is an existing /opt/kf6 either as a regular directory or a symbolic link, it should be reinitialized (as `root`):

    mv -v /opt/kf6 /opt/kf6.old                         &&
    install -v -dm755           $KF6_PREFIX/{etc,share} &&
    ln -sfv /etc/dbus-1         $KF6_PREFIX/etc         &&
    ln -sfv /usr/share/dbus-1   $KF6_PREFIX/share       &&
    ln -sfv /usr/share/polkit-1 $KF6_PREFIX/share       &&
    install -v -dm755           $KF6_PREFIX/lib         &&
    ln -sfv /usr/lib/systemd    $KF6_PREFIX/lib

First, start a subshell that will exit on error:

    bash -e

Install all of the packages by running the following commands:

    while read -r line; do

        # Get the file name, ignoring comments and blank lines
        if $(echo $line | grep -E -q '^ *$|^#' ); then continue; fi
        file=$(echo $line | cut -d" " -f2)

        pkg=$(echo $file|sed 's|^.*/||')          # Remove directory
        packagedir=$(echo $pkg|sed 's|\.tar.*||') # Package directory

        name=$(echo $pkg|sed 's|-6.*$||') # Isolate package name

        tar -xf $file
        pushd $packagedir

          # kapidox is a python module
          case $name in
            kapidox)
              pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD
              as_root pip3 install --no-index --find-links dist --no-user kapidox
              popd
              rm -rf $packagedir
              continue
              ;;
          esac

          mkdir build
          cd    build

          cmake -D CMAKE_INSTALL_PREFIX=$KF6_PREFIX \
                -D CMAKE_INSTALL_LIBEXECDIR=libexec \
                -D CMAKE_PREFIX_PATH=$QT6DIR        \
                -D CMAKE_SKIP_INSTALL_RPATH=ON      \
                -D CMAKE_BUILD_TYPE=Release         \
                -D BUILD_TESTING=OFF                \
                -D BUILD_PYTHON_BINDINGS=OFF        \
                -W no-dev ..
          make
          as_root make install
        popd

      as_root rm -rf $packagedir
      as_root /sbin/ldconfig

    done < frameworks-6.23.0.md5

    exit

### Note

Any modules that have been omitted can be installed later by using the same mkdir build; cd build; cmake; make; make install procedure as above.

Sometimes the installation paths are hardcoded into installed files. If the installed directory is not /usr, rename the directory and create a symlink:

    mv -v /opt/kf6 /opt/kf6-6.23.0
    ln -sfvn kf6-6.23.0 /opt/kf6

## Command Explanations

`-D CMAKE_PREFIX_PATH=$QT6DIR`: This switch is used to allow cmake to find the proper Qt libraries.

`-D CMAKE_BUILD_TYPE=Release`: This switch is used to apply higher level of the compiler optimizations.

`-D BUILD_TESTING=OFF`: This switch is used to prevent building test programs and libraries that are of no use to an end user.

`-D BUILD_PYTHON_BINDINGS=OFF`: This switch is used to prevent building Python modules that require external optional dependencies.

## Contents

Installed Programs: balooctl6, baloosearch6, balooshow6, checkXML6, kbuildsycoca6, kcmshell6, kded6, kde-geo-uri-handler, kiconfinder6, knewstuff-dialog6, kpackagetool6, kquitapp6, kreadconfig6, ksecretd, ksyntaxhighlighter6, ktelnetservice6, ktexteditor-script-tester6, ktrash6, kwalletd6, kwallet-query, kwriteconfig6, meinproc6, parsetrigrams6, and solid-hardware6
Installed Libraries: libkdeinit6_klauncher.so, libKF6Archive.so, libKF6Attica.so, libKF6AuthCore.so, libKF6Baloo.so, libKF6BluezQt.so, libKF6Bookmarks.so, libKF6BookmarksWidgets.so, libKF6CalendarCore.so, libKF6CalendarEvents.so, libKF6Codecs.so, libKF6ColorScheme.so, libKF6Completion.so, libKF6ConfigCore.so, libKF6ConfigGui.so, libKF6ConfigQml.so, libKF6ConfigWidgets.so, libKF6Contacts.so, libKF6CoreAddons.so, libKF6Crash.so, libKF6DAV.so, libKF6DBusAddons.so, libKF6DNSSD.so, libKF6DocTools.so, libKF6FileMetaData.so, libKF6GlobalAccel.so, libKF6GuiAddons.so, libKF6Holidays.so, libKF6I18n.so, libKF6I18nLocaleData.so, libKF6I18nQml.so, libKF6IconThemes.so, libKF6IconWidgets.so, libKF6IdleTime.so, libKF6ItemModels.so, libKF6ItemViews.so, libKF6JobWidgets.so, libKF6KCMUtils.so, libKF6KCMUtilsCore.so, libKF6KCMUtilsQuick.so, libKF6KIOCore.so, libKF6KIOFileWidgets.so, libKF6KIOGui.so, libKF6KIOWidgets.so, libKF6ModemManagerQt.so, libKF6NetworkManagerQt.so, libKF6NewStuffCore.so, libKF6NewStuffWidgets.so, libKF6Notifications.so, libKF6NotifyConfig.so, libKF6Package.so, libKF6Parts.so, libKF6PeopleBackend.so, libKF6People.so, libKF6PeopleWidgets.so, libKF6Plotting.so, libKF6PrisonScanner.so, libKF6Prison.so, libKF6Pty.so, libKF6Purpose.so, libKF6PurposeWidgets.so, libKF6Runner.so, libKF6Service.so, libKF6Solid.so, libKF6SonnetCore.so, libKF6SonnetUi.so, libKF6StatusNotifierItem.so, libKF6Style.so, libKF6Su.so, libKF6Svg.so, libKF6Syndication.so, libKF6SyntaxHighlighting.so, libKF6TextEditor.so, libKF6TextTemplate.so, libKF6TextWidgets.so, libKF6ThreadWeaver.so, libKF6UnitConversion.so, libKF6UserFeedbackCore.so, libKF6UserFeedbackWidgets.so, libKF6Wallet.so, libKF6WidgetsAddons.so, libKF6WindowSystem.so, libKF6XmlGui.so, libKirigamiDelegates.so, libKirigamiDialogs.so, libKirigamiLayoutsPrivate.so, libKirigamiLayouts.so, libKirigamiPlatform.so, libKirigamiPolyfill.so, libKirigamiPrimitives.so, libKirigamiPrivate.so, libKirigami.so, libKirigamiLayouts.so, libkuriikwsfiltereng_private.so, libQuickCharts.so, and libQuickChartsControls.so
Installed Directories: /opt/kf6 (symlink to /opt/kf6-6.23.0) if installing in /opt

### Short Descriptions

checkXML6 | is a tool to check for syntax errors in KDE DocBook XML files
kbuildsycoca6 | rebuilds the KService desktop file system configuration cache
kcmshell6 | starts a single System Settings module, which can be useful when debugging problems with the System Settings application
kded6 | consolidates several small services into a single process
kde-geo-uri-handler | processes URIs that contain geolocation information
kiconfinder6 | locates an icon based on it's name
knewstuff-dialog6 | displays a KNSRC file (which uses the KNewStuff framework) to the user
kpackagetool6 | is a command line tool for managing KDE packages
kquitapp6 | is a command line tool to safely force a D-Bus enabled application to exit
kreadconfig6 | is a command line tool to retrieve values from KDE configuration files
ksecretd | starts the KDE Wallet service, which is used to manage a user's saved passwords and certificates
ksyntaxhighlighter6 | is a command line syntax highlighter that uses the syntax definitions from KSyntaxHighlighting
ktelnetservice6 | is used by Konsole to handle Telnet and SSH schemes
ktexteditor-script-tester6 | is a command line tool to validate and test Kate command scripts
ktrash6 | is a helper program to handle the KDE trash can
kwalletd6 | is a compatibility service for KWallet, wrapping around libsecret and ksecretd
kwallet-query | is a command line tool to query KWallet and ksecretd and list the entries in the user's wallet, as well as read or set a password
kwriteconfig6 | is a command line tool to write values in KDE configuration files
meinproc6 | converts DocBook files to HTML
parsetrigrams6 | is a command line tool to parse trigrams
solid-hardware6 | is a command line tool to investigate available devices on a system

- Prev

  KDE Frameworks 6 Pre-installation Configuration

- Next

  KDE Frameworks 6 Based Applications

- Up
- Home