Build and Setup Qt6 on Debian 12 / Ubuntu 24.04
Page Navigation
Table of Contents
3. Build, install and setup Qt6⌗
Build Qt6 using kdesrc-build.
3.1 Add qt-install-dir to ~/.config/kdesrc-buildrc [normal user]⌗
Modify ~/.config/kdesrc-buildrc and add qt-install-dir row to global section.
global
qt-install-dir ~/kde/usr
branch-group kf6-qt6
# Finds and includes *KDE*-based dependencies into the build. This makes
...
end global
3.2 Install needed dependencies [root]⌗
Enable backports repo
deb http://deb.debian.org/debian bookworm-backports main contrib non-free
apt update
Install depencies
apt install libb2-dev libproxy-dev libmd4c-dev libmd4c-html0-dev libxcb-xinput-dev \
libatspi2.0-dev libsqlite3-dev unixodbc-dev libmariadb-dev postgresql-client \
libecpg-dev libpq-dev libsctp-dev libts-dev nodejs libdbus-1-dev libxcomposite-dev \
libxshmfence-dev libxdamage-dev libharfbuzz-dev libvpx-dev libpci-dev libevent-dev \
libre2-dev libsnappy-dev libcups2-dev libxkbfile-dev xcb-proto libxcb-dri3-dev \
libcap-dev libdisplay-info-dev xdotool xserver-xorg-input-libinput-dev xserver-xorg-dev \
libxkbregistry-dev sass python3-flask python3-lxml
## for Flatpak ##
libarchive-dev libdconf-dev \
libmalcontent-0-dev libfuse-dev libfuse3-dev libappstream-dev libgdk-pixbuf-2.0-dev \
libseccomp-dev
3.3 Add qtwebengine to build list [normal user]⌗
Modify file ~/.local/state/sysadmin-repo-metadata/module-definitions/qt6.ksb
Add qtwebengine after qtwebchannel and comment ignore-modules qtwebengine
...
use-modules qtbase qttools qtshadertools qtdeclarative qtsvg \
qtimageformats qtmultimedia qtwayland \
qtwebsockets qtwebchannel qtwebengine qtwebview qtsensors \
qtnetworkauth qt5compat qtdoc qtpositioning \
qtlocation qtvirtualkeyboard qttranslations \
qtlanguageserver qtspeech
# if you want qtwebengine, add it to use-modules after "qtwebchannel" and
# comment this out. Note qtwebengine has significant and different build
# requirements of its own.
#ignore-modules qtwebengine
...
3.4 Build Qt6 [normal user]⌗
kdesrc-build qt6-set
...
Building qtlanguageserver from qt6-set (21/22)
Cloning qtlanguageserver
Source update complete for qtlanguageserver: 70 files affected.
Preparing build system for qtlanguageserver.
Running cmake targeting Ninja...
Compiling... succeeded (after 54 seconds)
Installing qtlanguageserver succeeded (after 0 seconds)
Building qtspeech from qt6-set (22/22)
Cloning qtspeech
Source update complete for qtspeech: 159 files affected.
Preparing build system for qtspeech.
Running cmake targeting Ninja...
Compiling... succeeded (after 13 seconds)
Installing qtspeech succeeded (after 0 seconds)
<<< PACKAGES SUCCESSFULLY BUILT >>>
Built 22 modules
:-)
Your logs are saved in /home/inttf/kde/src/log/2024-05-24-02
(additional logs are saved in /home/inttf/.local/state/log/2024-05-24-05)
3.5 Add libgpg-error to build list [normal user]⌗
This fixes problem with too old libgpg-error version.
echo 'third-party/gpgme: third-party/libgpg-error' >> ~/.local/state/sysadmin-repo-metadata/dependencies/dependency-data-kf6-qt6
3.6 Add following build options to ~/.config/kdesrc-buildrc [normal user]⌗
options gpgme
configure-flags --enable-maintainer-mode --enable-languages=cpp,qt6 --disable-gpgsm-test --disable-static --disable-fd-passing --disable-gpg-test --disable-gpgconf-test
end options
3.7 Build workspace [normal user]⌗
kdesrc-build workspace
Page Navigation