Building KDE Frameworks 6.29.0 (KF6)

#### Beyond Linux® From Scratch (System V Edition) - Version r13.0-1374

### Chapter 30. KDE Frameworks 6

- Prev

  KDE Frameworks 6 Pre-installation Configuration

- Next

  KDE Frameworks 6 Based Applications

- Up
- Home

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

This version of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable version of the System V 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.29

- Download MD5 sum: See Below

- Download size: 364 MB

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

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

### KF6 Dependencies

#### Required

Extra-CMake-Modules-6.29.0, breeze-icons-6.29.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libdmtx-0.7.8, libgcrypt-1.12.2, libical-4.0.5, libsecret-0.21.7, libxslt-1.1.45, lmdb-1.0.1, oxygen-icons-6.29.0, qca-2.3.10, libqrencode-4.1.1, plasma-wayland-protocols-1.21.0, PyYAML-6.0.3, shared-mime-info-2.5.1, URI-5.35, and Wget-1.25.0 (required to download the packages)

#### Recommended

Aspell-0.60.8.2 (Dictionary backend for Sonnet), Avahi-0.9-rc5 (DNS-SD backend for KDNSSD), ModemManager-1.24.2 (needed to build ModemManager-Qt), NetworkManager-1.58.1 (needed to build NetworkManager-Qt), polkit-qt-0.201.1 (Authentication backend for KAuth), Vulkan-Loader-1.4.357.0 (Add support for Vulkan graphics drivers), and zxing-cpp-3.1.1 (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.87 (needed to build Bluez-Qt)

#### Runtime dependency for FrameworkIntegration

Noto fonts

#### Additional recommended dependencies for kapidox

Doxygen-1.18.0 (Run time), doxypypy-0.8.8.7, doxyqml-0.5.3, and requests-2.34.2

#### Additional image formats support in KImageFormats

Imath-3.2.2, libavif-1.4.2, libheif-1.23.1, libjxl-0.12.0, libraw-0.22.2, OpenEXR

#### Optional dependencies for Solid

UDisks-2.11.2, UPower-1.91.3 and media-player-info (runtime)

#### Optional dependency for KWallet

gpgmepp-2.1.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.29/
    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.29.0.md5 << "EOF"
    04136d69a5f340514fad6352629adb28  attica-6.29.0.tar.xz
    #b3795f9b843a58746ca5461713c088d8  extra-cmake-modules-6.29.0.tar.xz
    c1888280d30447724d491e688e03cf45  kapidox-6.29.0.tar.xz
    e897f5323b32c6bdd477369a61972b2e  karchive-6.29.0.tar.xz
    03a439a6c3d78eebd5484cf69c5c41a3  kcodecs-6.29.0.tar.xz
    194b8c40c5c7e143b44ee2f8dadae775  kconfig-6.29.0.tar.xz
    9513021c1335227ec38b7cc7b92152f2  kcoreaddons-6.29.0.tar.xz
    a566661bbfde2500f39c3bfe6fd700e2  kdbusaddons-6.29.0.tar.xz
    47784b5619d1864be4d19621b9da67a2  kdnssd-6.29.0.tar.xz
    9f1d2a5324752fc1e376f1a44d82e59f  kguiaddons-6.29.0.tar.xz
    e15d397fe3e5d6a17f16c04d0a013e04  ki18n-6.29.0.tar.xz
    212c502ef7cf38f31ec3aea352a7e401  kidletime-6.29.0.tar.xz
    791f33fe494e4295e411b3ecd5920015  kimageformats-6.29.0.tar.xz
    eda9e59655995a0e037a3bc42eb1a9e8  kitemmodels-6.29.0.tar.xz
    82038eec5c422b3b138507ab8964ad9e  kitemviews-6.29.0.tar.xz
    356da5eb2050defa1aed5c206eb834c0  kplotting-6.29.0.tar.xz
    ced1d43c0ca814defbca2a91ed700fcc  kwidgetsaddons-6.29.0.tar.xz
    d996373ba3aeda5299c92d9b9f05244a  kwindowsystem-6.29.0.tar.xz
    0348f0661a6c347f02a7416acdfa5aec  networkmanager-qt-6.29.0.tar.xz
    7098fdaa4c55a369813a70a2c952a7cc  solid-6.29.0.tar.xz
    1d4ad3f264af279d92a0d7228726bda3  sonnet-6.29.0.tar.xz
    3e14a2b5cb689cc9583f4d9838e2c1e2  threadweaver-6.29.0.tar.xz
    ff94c0e5bbdaf953d4615106557e6074  kauth-6.29.0.tar.xz
    5ea24f2fb7026f0d63cdba7afb8acac4  kcompletion-6.29.0.tar.xz
    eb5be13f4db87848f962f45beadb8911  kcrash-6.29.0.tar.xz
    af09e18cebf69e98630e4d06440b5707  kdoctools-6.29.0.tar.xz
    64f0223b5b3d8d0c87d5951787a844cf  kpty-6.29.0.tar.xz
    1dbc1a568c3991bfd9c8780659c61558  kunitconversion-6.29.0.tar.xz
    f316ed426e1df0616143a9f4bc43554a  kcolorscheme-6.29.0.tar.xz
    21d71db72c242423c2758c84e8d2ebfd  kconfigwidgets-6.29.0.tar.xz
    52d2f3b7108240e1a745a6dd2058eb72  kservice-6.29.0.tar.xz
    4d90ee680058f485acf896fa222f0f6b  kglobalaccel-6.29.0.tar.xz
    ba00e16aba965de53ed0493d45aba61c  kpackage-6.29.0.tar.xz
    b90309874fe6bc26298c4114401bb9ca  kdesu-6.29.0.tar.xz
    38c9b27fadd91131092df1ac17484a4b  kiconthemes-6.29.0.tar.xz
    95a52444c959d82e83d8506756b1498d  knotifications-6.29.0.tar.xz
    d6434be49817654e9d878fa3f8862539  kjobwidgets-6.29.0.tar.xz
    32155a4d6ca2ffbb79980b51d034d480  ktextwidgets-6.29.0.tar.xz
    43aec19a04194118ade54d584691fe3c  kxmlgui-6.29.0.tar.xz
    ab9726b47279b62fba2b02d1be1e7f8e  kbookmarks-6.29.0.tar.xz
    87babe498d81765fe042f334e5af63fe  kwallet-6.29.0.tar.xz
    2a8f180ed2a5ce15f0652c71a0250bbd  kded-6.29.0.tar.xz
    f8c4b4fa54a4e4ab590b7eb2303bf383  kio-6.29.0.tar.xz
    eb444e38b4fd327c22d34486f21b42b6  kdeclarative-6.29.0.tar.xz
    e3ea9add856c983ae55a5e88675f5cd9  kirigami-6.29.0.tar.xz
    47eb021fa35e71e4f73bff439748f0cc  kcmutils-6.29.0.tar.xz
    b3d793178f7c51b5b5cec6ef5c47c186  syndication-6.29.0.tar.xz
    807986b129cdab88939191fc8c3f11d9  knewstuff-6.29.0.tar.xz
    233ebeb1da81ad27819f61aa6adb3b3b  frameworkintegration-6.29.0.tar.xz
    10caf984c5962c1f28a733a5e6e88bc5  kparts-6.29.0.tar.xz
    1b572fc268b2a120734889176449b654  syntax-highlighting-6.29.0.tar.xz
    3fdffb930818a22986a83089face1c48  ktexteditor-6.29.0.tar.xz
    3bbc95743bf4670bdd23d3c092483bf9  modemmanager-qt-6.29.0.tar.xz
    0adc3ad17ebdf1aae35c4c8af2c94fc1  kcontacts-6.29.0.tar.xz
    065da273e8f478c3745f52faed468034  kpeople-6.29.0.tar.xz
    c0ee97a3f6b78782eb378ca05a89a653  bluez-qt-6.29.0.tar.xz
    77f3350bffaa76b4a73b10912c5ac183  kfilemetadata-6.29.0.tar.xz
    5b6c49bc217f4450dfee982188621f90  baloo-6.29.0.tar.xz
    #04a8c3e8651fdf4dead94221a3451f93  breeze-icons-6.29.0.tar.xz
    #cd2fc88992a0da5b7b9bd16288e2f36f  oxygen-icons-6.29.0.tar.xz
    1ac31cccd071ea20a3a01fbc5c328ffc  krunner-6.29.0.tar.xz
    24db2c46e60ef7354a915f36c4b10d9e  prison-6.29.0.tar.xz
    4ab0da283adbfdb5e1ae48bf03d63871  qqc2-desktop-style-6.29.0.tar.xz
    74e7b660e4f6993cd95e9fd961e34d0b  kholidays-6.29.0.tar.xz
    c69b4b08b3ef3bffe0feceece70ed5e3  purpose-6.29.0.tar.xz
    de97d121b2f24c03e9bce05edb7a6294  kcalendarcore-6.29.0.tar.xz
    b7c39a611d24d8083014dfbb69c41d99  kquickcharts-6.29.0.tar.xz
    e59ca085f17cde7cc6c3ff0cbc180073  knotifyconfig-6.29.0.tar.xz
    73c667bd31a69d3f5b24dac9f5b9f9cc  kdav-6.29.0.tar.xz
    5fcdedf1670d11de1ef3ed3ee0195802  kstatusnotifieritem-6.29.0.tar.xz
    8ae0ac197fffbc36dc1fba0634d3b0c9  ksvg-6.29.0.tar.xz
    f382cd12656952d85178985ae92be71b  ktexttemplate-6.29.0.tar.xz
    182e7df4d6a35c2e0dd0cf9f50d99b85  kuserfeedback-6.29.0.tar.xz
    8163ee41e712b70f72a52f6547975e35  kmime-6.29.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 packages are covered separately at breeze-icons-6.29.0 and oxygen-icons-6.29.0. They are 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.

## 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

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-author ..
          make
          as_root make install
        popd

      as_root rm -rf $packagedir
      as_root /sbin/ldconfig

    done < frameworks-6.29.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.29.0
    ln -sfvn kf6-6.29.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.29.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