#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 30. KDE Frameworks 6

- Prev

  KDE Frameworks 6 Pre-installation Configuration

- Next

  KDE Frameworks 6 Based Applications

- Up
- Home

# Building KDE Frameworks 6.11.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).

This package is known to build and work properly using an LFS 12.3 platform.

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.11

- Download MD5 sum: See Below

- Download size: 108 MB

- Estimated disk space required: 2.9 GB (188 MB installed)

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

### KF6 Dependencies

#### Required

extra-cmake-modules-6.11.0, breeze-icons-6.11.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libgcrypt-1.11.0, libical-3.0.19, libxslt-1.1.42, lmdb-0.9.31, qca-2.3.9, qrencode-4.1.1, plasma-wayland-protocols-1.16.0, PyYAML-6.0.2, shared-mime-info-2.4, URI-5.31, and Wget-1.25.0 (required to download the packages)

#### Recommended

Aspell-0.60.8.1 (Dictionary backend for Sonnet), Avahi-0.8 (DNS-SD backend for KDNSSD), ModemManager-1.18.12 (needed to build ModemManager-Qt), NetworkManager-1.50.0 (needed to build NetworkManager-Qt), polkit-qt-0.200.0 (Authentication backend for KAuth), Vulkan-Loader-1.4.304 (Add support for Vulkan graphics drivers), and zxing-cpp-2.3.0 (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.79 (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.13.2 (Run time), doxypypy-0.8.8.7, doxyqml-0.5.3, and requests-2.32.3

#### Additional image formats support in KImageFormats

libavif-1.2.0, libjxl-0.11.1, libraw-0.21.3, libheif, OpenEXR

#### Optional dependencies for Solid

UDisks-2.10.1, UPower-1.90.7 and media-player-info (runtime)

#### Optional dependency for KWallet

GPGME-1.24.2, built with C++ bindings (which is the default).

#### 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.11/
    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.11.0.md5 << "EOF"
    9359cfb89031abeeff8616d73e161415  attica-6.11.0.tar.xz
    #22bce8bd85c1ead07bda8a00518d1120  extra-cmake-modules-6.11.0.tar.xz
    647b2f9cfd55930e86ebb8c1734df140  kapidox-6.11.0.tar.xz
    20c3fbf44d196d578bf9b76d0631a1ad  karchive-6.11.0.tar.xz
    4b4af41ab285dda00a660b34e21e2f8c  kcodecs-6.11.0.tar.xz
    b0e4142ee55abf3cb38fe6cdf5a0fe71  kconfig-6.11.0.tar.xz
    6fa75ef6c2e9ce2fc9b7fb7f77e8db53  kcoreaddons-6.11.0.tar.xz
    2ee71003f7887b6ac6646abd134e23ba  kdbusaddons-6.11.0.tar.xz
    ead6114916c7aa01a8f6c3965315e9ec  kdnssd-6.11.0.tar.xz
    7679bb9a2a0e817f9660ec775f93dc04  kguiaddons-6.11.0.tar.xz
    27a6809407ea64c9db9bbb595cfe1282  ki18n-6.11.0.tar.xz
    16d30e56e423668c27bfcbd2425a19da  kidletime-6.11.0.tar.xz
    4f035f9b0466e297bd95ee57eb53f820  kimageformats-6.11.0.tar.xz
    7e48fb5e56bcedff3281d64115d85699  kitemmodels-6.11.0.tar.xz
    df934558aaa739a50b16677a3cdc97f7  kitemviews-6.11.0.tar.xz
    cbe17f3ad215492a6d3d60d1b161a056  kplotting-6.11.0.tar.xz
    85234f0053b4cf6ac5492ba92db2d648  kwidgetsaddons-6.11.0.tar.xz
    0fe4524579013c8e9fcf7adf43ea844e  kwindowsystem-6.11.0.tar.xz
    72fbceb5e5b990d501a1ba3684c78ad0  networkmanager-qt-6.11.0.tar.xz
    05d5c3b1277129f4e5fa1e3db9077e10  solid-6.11.0.tar.xz
    cc92475aacad8a29de2029e6483ff0b2  sonnet-6.11.0.tar.xz
    5236898e85ea7b2b8124ffe21e2e8a51  threadweaver-6.11.0.tar.xz
    efe35421eb54433599bb5724bd4b2312  kauth-6.11.0.tar.xz
    33067f4f53c2e0e0da9d1324f01af19a  kcompletion-6.11.0.tar.xz
    1562644115cb4a3d8f5e847c196a6e1b  kcrash-6.11.0.tar.xz
    52d5e6b18613fd23ba09d05459812062  kdoctools-6.11.0.tar.xz
    0cadf6b126b5ed62393b99146bbdaec9  kpty-6.11.0.tar.xz
    6d306e6f78769cb8405f909e26db3d76  kunitconversion-6.11.0.tar.xz
    b0a6afbdee57b249771017be13b5e9cf  kcolorscheme-6.11.0.tar.xz
    b2c09a5d3fdcfa3c7fc88617590ac694  kconfigwidgets-6.11.0.tar.xz
    71abec8311c27c7b3f8652da220011b8  kservice-6.11.0.tar.xz
    357c4a01badb564c4a66ce3503bb7493  kglobalaccel-6.11.0.tar.xz
    772720c4f1b51589abd1964750ef96e6  kpackage-6.11.0.tar.xz
    6de72206275db095889d5ef02ecfeaae  kdesu-6.11.0.tar.xz
    f7c14bb2f32943060553c517956bcd36  kiconthemes-6.11.0.tar.xz
    3a502ab55f0ca2f1a5e5ab69de951932  knotifications-6.11.0.tar.xz
    e3056aadf29ca9a09f015632f5c851d8  kjobwidgets-6.11.0.tar.xz
    fe6ac2b10dcadad94e2b54dfd8788fc1  ktextwidgets-6.11.0.tar.xz
    cbecf5de939fa3c2340abf4c1c34a550  kxmlgui-6.11.0.tar.xz
    83d780dba76ffdb59b119513a94cfaa0  kbookmarks-6.11.0.tar.xz
    c69002e34487b8182a7b248265846a8f  kwallet-6.11.0.tar.xz
    e68dc289e81b20bf781ca7920133ae37  kded-6.11.0.tar.xz
    76a597b191d8a1ff103dec70137635a7  kio-6.11.0.tar.xz
    092619893a0c6e0e9e735e2396f9518b  kdeclarative-6.11.0.tar.xz
    90434f367fce9f8ea1cfaccc4642efef  kcmutils-6.11.0.tar.xz
    c12b36fecb8f26b48d793fe7e3a29405  kirigami-6.11.0.tar.xz
    3227ac57ecdaed4c0d4c6b6b48b81ac4  syndication-6.11.0.tar.xz
    096b9d761ee2997f34de83a9cee5062d  knewstuff-6.11.0.tar.xz
    e5ba9f692c12dc7f3f4e2291aca802d7  frameworkintegration-6.11.0.tar.xz
    138bf9e51cadd7381a9de428345c78c2  kparts-6.11.0.tar.xz
    f75164871c6e7594f81c71d0849f90d3  syntax-highlighting-6.11.0.tar.xz
    5ece9440ecedae18706884501e8deae4  ktexteditor-6.11.0.tar.xz
    cc4b04c3c42a54259d704534b083f991  modemmanager-qt-6.11.0.tar.xz
    fb993807e86e8f1679a6ea59aed71c1e  kcontacts-6.11.0.tar.xz
    1545793a6da6d4b67f42959dc49d4cef  kpeople-6.11.0.tar.xz
    e55224a99439e7bb1abf7eab2cd2ef75  bluez-qt-6.11.0.tar.xz
    43e1dba98100aebf27297815a0fb8296  kfilemetadata-6.11.0.tar.xz
    5e4b41a45872794d45038ca66125cbf8  baloo-6.11.0.tar.xz
    #8989043ad5c6bae49cb2abb3e88490aa  breeze-icons-6.11.0.tar.xz
    d336f55f2747377d0b8f388263749fe4  krunner-6.11.0.tar.xz
    5291071632d3296b6d1201622fe1f54e  prison-6.11.0.tar.xz
    eb72c496e3e6ba0ea66aa96a81683491  qqc2-desktop-style-6.11.0.tar.xz
    89a6c13f89e6ac7ae5cd36c28ea51ba4  kholidays-6.11.0.tar.xz
    0f72d877a62f5697c08c3649d0dc61cc  purpose-6.11.0.tar.xz
    268c7ca1ba88d7cd544914760d1862a6  kcalendarcore-6.11.0.tar.xz
    3b5c13512812315c913e936d8c14298d  kquickcharts-6.11.0.tar.xz
    29c0bab2e75f093cbfb1630f349959a3  knotifyconfig-6.11.0.tar.xz
    eb41b80c24a0768b915dab171d3db5c3  kdav-6.11.0.tar.xz
    56e50e418a25fd981a11553f0e313800  kstatusnotifieritem-6.11.0.tar.xz
    1e757bef30a30391eafe34ac06b5d281  ksvg-6.11.0.tar.xz
    cdb940239552ee0c70fab32f496bc592  ktexttemplate-6.11.0.tar.xz
    ee50bf09b87548e416b60826b6086041  kuserfeedback-6.11.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.

- The icon package is covered separately at breeze-icons-6.11.0.

## 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.16p2 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

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                \
                -W no-dev ..
          make
          as_root make install
        popd

      as_root rm -rf $packagedir
      as_root /sbin/ldconfig

    done < frameworks-6.11.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.

Useless systemd units have been installed in `$KF6_PREFIX/lib`. Remove them now (as `root`):

    rm -rf $KF6_PREFIX/lib/systemd

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.11.0
    ln -sfvn kf6-6.11.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.

## Contents

Installed Programs: balooctl, baloo_file, baloo_file_extractor, baloosearch, balooshow, checkXML6, depdiagram-generate, depdiagram-generate-all, depdiagram-prepare, desktoptojson, gentrigrams, kactivities-cli, kapidox_generate, kate-syntax-highlighter, kbuildsycoca6, kcookiejar6, kdebugdialog6, kded6, kdeinit6, kdeinit6_shutdown, kdeinit6_wrapper, kf6-config, kf6kross, kgendesignerplugin, kglobalaccel6, kiconfinder6, kjs6, kjscmd6, kjsconsole, knewstuff-dialog, kpackagelauncherqml, kpackagetool6, kquitapp6, kreadconfig6, kshell6, ktelnetservice6, ktrash6, kwalletd6, kwallet-query, kwrapper6, kwriteconfig6, meinproc6, parsetrigrams, plasmapkg2, preparetips6, protocoltojson, and solid-hardware6
Installed Libraries: libkdeinit6_klauncher.so, libKF6Activities.so, libKF6ActivitiesStats.so, libKF6Archive.so, libKF6Attica.so, libKF6AuthCore.so, libKF6Auth.so, libKF6Baloo.so, libKF6BluezQt.so, libKF6Bookmarks.so, libKF6CalendarCore.so, libKF6CalendarEvents.so, libKF6Codecs.so, libKF6Completion.so, libKF6ConfigCore.so, libKF6ConfigGui.so, libKF6ConfigWidgets.so, libKF6Contacts.so, libKF6CoreAddons.so, libKF6Crash.so, libKF6DAV.so, libKF6DBusAddons.so, libKF6Declarative.so, libKF6DNSSD.so, libKF6DocTools.so, libKF6Emoticons.so, libKF6FileMetaData.so, libKF6GlobalAccel.so, libKF6GuiAddons.so, libKF6Holidays.so, libKF6I18n.so, libKF6IconThemes.so, libKF6IdleTime.so, libKF6ItemModels.so, libKF6ItemViews.so, libKF6JobWidgets.so, libKF6JSApi.so, libKF6JsEmbed.so, libKF6JS.so, libKF6KCMUtils.so, libKF6KDELibs4Support.so, libKF6KHtml.so, libKF6KIOCore.so, libKF6KIOFileWidgets.so, libKF6KIOGui.so, libKF6KIONTLM.so, libKF6KIOWidgets.so, libKF6Kirigami2.so, libKF6KrossCore.so, libKF6KrossUi.so, libKF6MediaPlayer.so, libKF6NetworkManagerQt.so, libKF6NewStuffCore.so, libKF6NewStuff.so, libKF6Notifications.so, libKF6NotifyConfig.so, libKF6Package.so, libKF6Parts.so, libKF6PeopleBackend.so, libKF6People.so, libKF6PeopleWidgets.so, libKF6PlasmaQuick.so, libKF6Plasma.so, libKF6Plotting.so, libKF6Prison.so, libKF6Pty.so, libKF6Purpose.so, libKF6PurposeWidgets.so, libKF6QuickAddons.so, libKF6Runner.so, libKF6Service.so, libKF6Solid.so, libKF6SonnetCore.so, libKF6SonnetUi.so, libKF6Style.so, libKF6Su.so, libKF6SyntaxHighlighting.so, libKF6TextEditor.so, libKF6TextWidgets.so, libKF6ThreadWeaver.so, libKF6UnitConversion.so, libKF6Wallet.so, libKF6WaylandClient.so, libKF6WaylandServer.so, libKF6WidgetsAddons.so, libKF6WindowSystem.so, libKF6XmlGui.so, libKF6XmlRpcClient.so, and libkwalletbackend6.so
Installed Directories: /opt/kf6 (symlink to /opt/kf6-6.11.0) if installing in /opt

### Short Descriptions

checkXML6 | is a tool to check for syntax errors in KDE DocBook XML files
depdiagram-generate | is a tool to generate a dependency diagram
depdiagram-generate-all | is a tool to generate a dependency diagram for all frameworks at once
depdiagram-prepare | is a tool to prepare dot files
desktoptojson | is a tool to convert a .desktop file to a .json file
kbuildsycoca6 | rebuilds the KService desktop file system configuration cache
kcookiejar6 | is a command line interface to the HTTP cookie store used by KDE, a D-BUS service to store/retrieve/clean cookies
kded6 | consolidates several small services in one process
kdeinit6 | is a process launcher somewhat similar to the famous init used for booting UNIX
kf6-config | is a command line program used to retrieve information about KDE installation or user paths
kf6kross | executes kross scripts written in KDE Javascript, Python, Ruby, Java and Falcon
kgendesignerplugin | generates widget plugins for Qt(TM) Designer
kglobalaccel6 | is a daemon use to register the key bindings and for getting notified when the action triggered
kjs6 | is KDE ECMAScript/JavaScript engine
kjscmd6 | is a tool for launching KJSEmbed scripts from the command line
kjsconsole | is a console for kjs6
kpackagelauncherqml | is a commandline tool for launching kpackage QML application
kpackagetool6 | is a command line kpackage tool
kreadconfig6 | is a command line tool to retrieve values from KDE configuration files
kshell6 | start applications via kdeinit
ktelnetservice6 | is a telnet service
ktrash6 | is a helper program to handle the KDE trash can
kwalletd6 | is the wallet manager daemon
kwriteconfig6 | is a command line tool to write values in KDE configuration files
meinproc6 | converts DocBook files to HTML
plasmapkg2 | is a tool to install, list, remove Plasma packages
preparetips6 | is a script to extract the text from a tips file
solid-hardware6 | is a command line tool to investigate available devices

- Prev

  KDE Frameworks 6 Pre-installation Configuration

- Next

  KDE Frameworks 6 Based Applications

- Up
- Home