<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Developer – Compiling with kde-builder</title><link>/docs/getting-started/building/kde-builder/</link><description>Recent content in Compiling with kde-builder on Developer</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/getting-started/building/kde-builder/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: Set up a development environment</title><link>/docs/getting-started/building/kde-builder/kde-builder-setup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started/building/kde-builder/kde-builder-setup/</guid><description>
&lt;p&gt;Source code for KDE software lives on &lt;a href="https://invent.kde.org" &gt;KDE Invent&lt;/a&gt;. Before you can work on it, you'll need to set up a &lt;strong&gt;development environment&lt;/strong&gt;: a set of tools that allows you to access and edit the source code, compile it into a form that the computer can run, and deploy it to a safe location. To accomplish this, you will need to enter commands using a terminal program.&lt;/p&gt;
&lt;p&gt;If you're not familiar with the command line interface, you can &lt;a href="https://community.kde.org/Get_Involved/development/Learn#Unix_command_line" &gt;find tutorials here&lt;/a&gt;. However, advanced command line skills are not required, and you will learn what you need along the way.&lt;/p&gt;
&lt;p&gt;If you're a visual learner, we also provide &lt;a href="https://community.kde.org/Get_Involved/development/Video" &gt;useful video tutorials&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The tool we will be using here for setting up a development environment and building KDE software is &lt;a href="https://kde-builder.kde.org/" &gt;kde-builder&lt;/a&gt;. It will let you set up your development environment and compile applications on Linux and FreeBSD. You can find out more about it in its &lt;a href="https://invent.kde.org/sdk/kde-builder" &gt;repository&lt;/a&gt; and the &lt;a href="https://invent.kde.org/sdk/kde-builder/-/blob/master/README.md" &gt;README&lt;/a&gt;.&lt;/p&gt;
&lt;div class="d-flex align-items-center notecard notecard--success" role="alert"&gt;
&lt;span&gt;
&lt;p class="h4 mt-0"&gt;💡 Keep in mind&lt;/p&gt;You only need to set up your environment once, and then you will be able to compile (and recompile) KDE software as often as needed later on.
&lt;/span&gt;
&lt;/div&gt;
&lt;h2 id="why-kde-builder"&gt;Why kde-builder?&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;kde-builder&lt;/code&gt; is the official KDE meta build system tool. It is used to manage the building of many software repositories in an automated fashion.&lt;/p&gt;
&lt;p&gt;Its primary purpose is to &lt;em&gt;manage dependencies&lt;/em&gt;. Every software has dependencies: other pieces of software that provide lower-level functionality they rely on. In order to compile any piece of software, its dependencies must be available.&lt;/p&gt;
&lt;p&gt;KDE software has two types of dependencies:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;dependencies on other pieces of KDE software&lt;/li&gt;
&lt;li&gt;dependencies on 3rd-party software&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, the KDE application &lt;a href="https://apps.kde.org/kcalc/" &gt;KCalc&lt;/a&gt; depends on more than 20 other KDE libraries as well as the Qt toolkit.&lt;/p&gt;
&lt;p&gt;Some Linux distributions do not provide development packages for &lt;a href="https://develop.kde.org/products/frameworks/" &gt;KDE Frameworks&lt;/a&gt; and of other libraries that are up-to-date enough for us to build from the &lt;code&gt;master&lt;/code&gt; branch of the KDE git repositories (the branch where the development of the next software versions takes place), so we use &lt;code&gt;kde-builder&lt;/code&gt; to compile them ourselves. The goal is to avoid using KDE binaries, KDE libraries and other KDE files from the operating system where possible.&lt;/p&gt;
&lt;h2 id="set-up-kde-builder"&gt;Set up kde-builder&lt;/h2&gt;
&lt;p&gt;Before setting things up, you will need to make sure you have some free disk space. &lt;code&gt;kde-builder&lt;/code&gt; itself is a very lightweight tool, but downloading the source code of lots of software, generating build artifacts during compilation, and installing the necessary files takes space.&lt;/p&gt;
&lt;p&gt;If you plan on &lt;a href="/docs/getting-started/building/kde-builder-compile#application" &gt;building an application&lt;/a&gt; or on following our &lt;a href="/docs/getting-started/kirigami" &gt;Kirigami tutorial&lt;/a&gt;, you should allocate at least 15 GB of storage space.&lt;/p&gt;
&lt;p&gt;If you plan on &lt;a href="/docs/getting-started/building/kde-builder-compile#plasma" &gt;building Plasma Desktop&lt;/a&gt;, you should allocate at least 50 GB of storage space.&lt;/p&gt;
&lt;p&gt;If you cannot afford this storage, you might want to consider &lt;a href="/docs/getting-started/building/cmake-build" &gt;building projects manually&lt;/a&gt; or with &lt;a href="/docs/getting-started/building/containers-distrobox" &gt;distrobox&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then install &lt;code&gt;git&lt;/code&gt; and &lt;code&gt;uv&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Then run the following:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv tool install git+https://invent.kde.org/sdk/kde-builder.git&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will install &lt;code&gt;kde-builder&lt;/code&gt;, so you can run it from the terminal, as in the next step.&lt;/p&gt;
&lt;p&gt;After the initial setup, you will need to generate a configuration file for kde-builder. Run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --generate-config&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will create a new file &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt;. See the &lt;a href="https://kde-builder.kde.org/en/configuration/config-file-overview.html" &gt;documentation&lt;/a&gt; for a list of available options.&lt;/p&gt;
&lt;div id="debian-ubuntu-based-distributions"&gt;&lt;/div&gt;
&lt;div class="d-flex align-items-center notecard notecard--warning" role="alert"&gt;
&lt;span&gt;
&lt;p class="h4 mt-0"&gt;Debian/Ubuntu-based distributions&lt;/p&gt;&lt;p&gt;Some distributions need source repositories enabled before you can install the development packages you need. Do that now, &lt;em&gt;if needed&lt;/em&gt;:&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;Click here to see how to enable source repos&lt;/summary&gt;
&lt;br&gt;
&lt;p&gt;&lt;strong&gt;If the file /etc/apt/sources.list exists&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open the file &lt;code&gt;/etc/apt/sources.list&lt;/code&gt; with a text editor such as &lt;a href="https://kate-editor.org/" &gt;Kate&lt;/a&gt; or &lt;code&gt;nano&lt;/code&gt;. Each line that starts with &lt;code&gt;deb &lt;/code&gt; should be followed by a similar line beginning with &lt;code&gt;deb-src &lt;/code&gt;, for example:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;deb http://us.archive.ubuntu.com/ubuntu/ noble main restricted
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;deb-src http://us.archive.ubuntu.com/ubuntu/ noble main restricted&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note: The URL might differ depending on your country, and instead of &lt;code&gt;noble&lt;/code&gt; the name of the Debian or Ubuntu version should appear instead, for example &lt;code&gt;bookworm&lt;/code&gt; or &lt;code&gt;jammy&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the &lt;code&gt;deb-src&lt;/code&gt; line is commented out with a &lt;code&gt;#&lt;/code&gt;, remove the &lt;code&gt;#&lt;/code&gt; character.&lt;/p&gt;
&lt;p&gt;Lastly, run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;If the file /etc/apt/sources.list does not exist&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Starting with Kubuntu 24.04, the configuration file for apt repositories has moved to &lt;code&gt;/etc/apt/sources.list.d/ubuntu.sources&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Open the file &lt;code&gt;/etc/apt/sources.list.d/ubuntu.sources&lt;/code&gt; with an editor like &lt;a href="https://kate-editor.org/" &gt;Kate&lt;/a&gt; or &lt;code&gt;nano&lt;/code&gt;. Change the contents of the file by replacing all occurrences of &lt;code&gt;Types: deb&lt;/code&gt; with &lt;code&gt;Types: deb deb-src&lt;/code&gt;. For example, replacing the following:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Types: deb
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;URIs: http://archive.ubuntu.com/ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Suites: noble noble-updates noble-backports
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Components: main universe restricted multiverse
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;With:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Types: deb deb-src
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;URIs: http://archive.ubuntu.com/ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Suites: noble noble-updates noble-backports
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Components: main universe restricted multiverse
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note: The URL might differ depending on your country, and instead of &lt;code&gt;noble&lt;/code&gt; the name of the Debian or Ubuntu version should appear instead, for example &lt;code&gt;bookworm&lt;/code&gt; or &lt;code&gt;jammy&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Lastly, run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/details&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;h3 id="install-dependencies"&gt;Install dependencies&lt;/h3&gt;
&lt;p&gt;During initial setup, &lt;code&gt;kde-builder&lt;/code&gt; installed the essentials to run the tool itself. To install the distribution packages required to actually build KDE software, run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --install-distro-packages&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="d-flex align-items-center notecard notecard--success" role="alert"&gt;
&lt;span&gt;
&lt;p class="h4 mt-0"&gt;💡 A chance to contribute&lt;/p&gt;If you discover any external dependencies needed to build KDE software that were not installed with &lt;code&gt;kde-builder --install-distro-packages&lt;/code&gt;, for example using our guide on &lt;a href="/docs/getting-started/building/help/dependencies/" &gt;Installing Build Dependencies&lt;/a&gt;, please send a merge request to the &lt;a href="https://invent.kde.org/sysadmin/repo-metadata/-/tree/master/distro-dependencies" &gt;repo-metadata/distro-dependencies&lt;/a&gt; repository to include the needed packages in the list.
&lt;/span&gt;
&lt;/div&gt;
&lt;h3 id="first-build--hello-world"&gt;First build – Hello, World!&lt;/h3&gt;
&lt;p&gt;Finally, perform your first build:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will build &lt;a href="https://apps.kde.org/kcalc/" &gt;KCalc&lt;/a&gt;, a calculator app, and its KDE dependencies. If you happen to find any build issues, don't fret! That means kde-builder is working.&lt;/p&gt;
&lt;p&gt;In the next section, &lt;a href="/docs/getting-started/building/kde-builder/kde-builder-compile/" &gt;Building KDE software with kde-builder&lt;/a&gt;, we have a more in-depth look into the build process. To solve any build issues, you can check out &lt;a href="/docs/getting-started/building/help/dependencies/" &gt;Installing build dependencies&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;kde-builder&lt;/code&gt; is now set up for building! 🎉&lt;/p&gt;
&lt;div class="d-flex align-items-center notecard notecard--success" role="alert"&gt;
&lt;span&gt;
&lt;p class="h4 mt-0"&gt;💡 A chance to contribute&lt;/p&gt;If you discover any external dependencies needed to build KDE software that were not installed with &lt;code&gt;kde-builder --install-distro-packages&lt;/code&gt;, for example using our guide on &lt;a href="/docs/getting-started/building/help/dependencies/" &gt;Installing Build Dependencies&lt;/a&gt;, please send a merge request to the &lt;a href="https://invent.kde.org/sysadmin/repo-metadata/-/tree/master/distro-dependencies" &gt;repo-metadata/distro-dependencies&lt;/a&gt; repository to include the needed packages in the list.
&lt;/span&gt;
&lt;/div&gt;
&lt;h3 id="updating-kde-builder"&gt;Updating kde-builder&lt;/h3&gt;
&lt;p&gt;You should occasionally update &lt;code&gt;kde-builder&lt;/code&gt; to get its latest changes.&lt;/p&gt;
&lt;p&gt;This can be done by running&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;uv tool upgrade kde-builder&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="setting-up-qt"&gt;Setting up Qt&lt;/h2&gt;
&lt;p&gt;Qt is the fundamental framework that is needed for all KDE development. A recent enough version of Qt6 is required to proceed.&lt;/p&gt;
&lt;p&gt;Any of the &lt;strong&gt;recommended&lt;/strong&gt;, &lt;strong&gt;sufficiently up-to-date&lt;/strong&gt; Linux distributions listed in &lt;a href="/docs/getting-started/building/" &gt;Building KDE software&lt;/a&gt; should have recent enough Qt6.&lt;/p&gt;
&lt;p&gt;The initial setup of &lt;code&gt;kde-builder&lt;/code&gt; should have installed the required Qt6 packages for you already, in which case you &lt;strong&gt;DON'T&lt;/strong&gt; need to do anything and may skip directly to the &lt;a href="#configure-git" &gt;Configure git&lt;/a&gt; section.&lt;/p&gt;
&lt;p&gt;If your Linux distribution does &lt;strong&gt;NOT&lt;/strong&gt; provide a recent enough version of Qt, see the dedicated page &lt;a href="/docs/getting-started/building/kde-builder/kde-builder-qt6/" &gt;Setting up Qt&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="configure-git"&gt;Configure git&lt;/h2&gt;
&lt;p&gt;To properly track who created a commit, your name and email must be configured in git. If this is not done correctly, &lt;a href="https://invent.kde.org" &gt;invent.kde.org&lt;/a&gt; might reject your changes when you push them.
To configure name and email, run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git config --global user.name &lt;span class="s2"&gt;&amp;#34;Your Name&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git config --global user.email &lt;span class="s2"&gt;&amp;#34;you@email.com&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The name given here must be a human name, not the username of your KDE account or similar. The email should be the same as configured in GitLab and for your account on &lt;a href="https://bugs.kde.org" &gt;bugs.kde.org&lt;/a&gt;, if you have one. This is required for some integrations to work correctly.&lt;/p&gt;
&lt;p&gt;You should take the chance to create a &lt;a href="https://identity.kde.org" &gt;KDE Identity account&lt;/a&gt; that you can use to access KDE's Gitlab instance where all KDE code resides, &lt;a href="https://invent.kde.org" &gt;Invent&lt;/a&gt;. Take a look at &lt;a href="https://community.kde.org/Infrastructure/GitLab" &gt;Infrastructure: GitLab&lt;/a&gt; to learn more about this.&lt;/p&gt;
&lt;p&gt;For convenience, you can enable a feature that will become useful when starting to push code to GitLab:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git config --global push.autoSetupRemote true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Next, in order to authenticate yourself when pushing code changes, you need to add an SSH key to your Invent profile as described in the &lt;a href="https://invent.kde.org/help/user/ssh.md" &gt;Invent SSH documentation&lt;/a&gt;. Once you are done, we can start using &lt;code&gt;kde-builder&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="disable-indexing-for-your-development-environment"&gt;Disable indexing for your development environment&lt;/h2&gt;
&lt;p&gt;You'll want to disable indexing for your development-related git repos and the files they will build and install.&lt;/p&gt;
&lt;p&gt;To do that, add the &lt;code&gt;~/kde&lt;/code&gt; directory to the exclusions list in &lt;code&gt;System Settings&lt;/code&gt; › &lt;code&gt;Search&lt;/code&gt; › &lt;code&gt;File Search&lt;/code&gt; &amp;gt; &lt;code&gt;Stop Indexing a Folder...&lt;/code&gt;&lt;/p&gt;
&lt;figure class="text-center mr-5 pr-5"&gt;&lt;img src="/docs/getting-started/building/kde-builder/kde-builder-setup/search-kdesrc-build.webp"
alt="The Search field in System Settings."&gt;&lt;figcaption&gt;
&lt;p&gt;The Search field in System Settings.&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="next-steps"&gt;Next Steps&lt;/h2&gt;
&lt;p&gt;Your development environment is now set up and ready to build software.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You installed &lt;a href="https://kde-builder.kde.org/" &gt;kde-builder&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You generated a &lt;a href="https://kde-builder.kde.org/en/configuration/config-file-overview.html" &gt;configuration file&lt;/a&gt; for it.&lt;/li&gt;
&lt;li&gt;You installed the necessary packages to start building KDE software.&lt;/li&gt;
&lt;li&gt;You have set it up to use Qt (optional).&lt;/li&gt;
&lt;li&gt;You have set up git so you can start working on code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The next section explains how to use &lt;code&gt;kde-builder&lt;/code&gt; to build software from source code.&lt;/p&gt;</description></item><item><title>Docs: Building KDE software with kde-builder</title><link>/docs/getting-started/building/kde-builder/kde-builder-compile/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started/building/kde-builder/kde-builder-compile/</guid><description>
&lt;p&gt;In this section, you will learn how to use KDE's &lt;code&gt;kde-builder&lt;/code&gt; tool to build KDE software once you have a development environment set up.&lt;/p&gt;
&lt;p&gt;If you haven't set up kde-builder already, please follow the steps in &lt;a href="/docs/getting-started/building/kde-builder/kde-builder-setup/" &gt;Set up a development environment&lt;/a&gt; before proceeding.&lt;/p&gt;
&lt;p&gt;It can take an hour or more to compile a KDE application, Framework, or Plasma itself for the first time. The reason for this is that &lt;code&gt;kde-builder&lt;/code&gt; also builds all KDE dependencies of a project by default. The next time you want to compile that or any other piece of KDE software, it will be much faster since most of the dependencies will have already been compiled.&lt;/p&gt;
&lt;p&gt;If you don't want to build all dependencies (for instance if you are using a rolling release distro that provides recent versions of software), you can:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;edit the &lt;a href="https://kde-builder.kde.org/en/configuration/config-file-overview.html" &gt;configuration file&lt;/a&gt; at &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt; and set &lt;code&gt;include-dependencies: false&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;or add the &lt;code&gt;--no-include-dependencies&lt;/code&gt; &lt;a href="https://kde-builder.kde.org/en/cmdline/supported-cmdline-params.html#cmdline-include-dependencies" &gt;flag&lt;/a&gt; when running &lt;code&gt;kde-builder&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="application"&gt;Building and running applications&lt;/h2&gt;
&lt;p&gt;To build KCalc for example, run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can replace &lt;code&gt;kcalc&lt;/code&gt; with any other project. You can also build more than one project by listing them here.
When you tell kde-builder to build a module, it will automatically download the sources using git, configure, build, and install them.&lt;/p&gt;
&lt;p&gt;The project's source code is downloaded to a folder under &lt;code&gt;~/kde/src&lt;/code&gt;. The build files are stored under &lt;code&gt;~/kde/build&lt;/code&gt;, and installed to &lt;code&gt;~/kde/usr&lt;/code&gt;.
If the build failed for any reason, please see our instructions on how to proceed with &lt;a href="/docs/getting-started/building/kde-builder/kde-builder-failure/" &gt;Troubleshooting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To run the self-compiled KCalc, use the &lt;code&gt;kde-builder --run&lt;/code&gt; command, which launches the built-from-source version of KCalc (from the directory &lt;code&gt;~/kde/usr&lt;/code&gt;) instead of the version installed using your package manager.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --run kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Did it run? If so, then congratulations, you just compiled your own version of KCalc from source code! 🎉&lt;/p&gt;
&lt;h2 id="plasma"&gt;Building and Running Plasma&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;kde-builder&lt;/code&gt; has several aliases for building groups of modules that belong together. These include&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;workspace&lt;/code&gt;: All projects necessary to run a full Plasma Desktop session.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mobile&lt;/code&gt;: All projects required for running a Plasma Mobile session.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can build these like you would a single project, for example with:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder workspace&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;After building the &lt;code&gt;workspace&lt;/code&gt; alias, &lt;code&gt;kde-builder&lt;/code&gt; will prompt you for password in order to install session files in your system. After this, you can start your self-built Plasma session by choosing it in SDDM before logging in.&lt;/p&gt;
&lt;p&gt;You can also install these files manually by running a script that is provided by &lt;code&gt;plasma-workspace&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;~/kde/build/plasma-workspace/login-sessions/install-sessions.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="d-flex align-items-center notecard notecard--info" role="alert"&gt;
&lt;span&gt;
&lt;p class="h4 mt-0"&gt;About SELinux&lt;/p&gt;SELinux can interfere with the new D-Bus services working correctly, and the path of least resistance may be to turn off enforcement if you are using a distro that ships with it on by default (like Fedora). To do this, set the value of &lt;code&gt;SELINUX&lt;/code&gt; to &lt;code&gt;permissive&lt;/code&gt; in the file &lt;code&gt;/etc/selinux&lt;/code&gt;.
&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;Alternatively, you can run the new instance of Plasma on top of your existing system for quick testing like so:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;source&lt;/span&gt; ~/kde/build/plasma-workspace/prefix.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;~/kde/usr/bin/plasmashell --replace&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="plasma-mobile"&gt;Plasma Mobile&lt;/h3&gt;
&lt;p&gt;You can run your custom-built Plasma Mobile in an emulated phone session using a phone-sized window within your existing desktop.
To do this, we first set some environment variables that configure the session to behave like a phone and then start a nested KWin session with the mobile shell:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;XDG_RUNTIME_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;QT_QPA_PLATFORM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;wayland
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;QT_QPA_PLATFORMTHEME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;KDE
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;QT_WAYLAND_DISABLE_WINDOWDECORATION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;XDG_CURRENT_DESKTOP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;KDE
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;KSCREEN_BACKEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;QScreen
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;KDE_FULL_SESSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;KDE_SESSION_VERSION&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;QT_QUICK_CONTROLS_MOBILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;PLASMA_PLATFORM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;phone:handheld
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;dbus-launch&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;source&lt;/span&gt; ~/kde/build/plasma-mobile/prefix.sh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dbus-run-session kwin_wayland --width &lt;span class="m"&gt;360&lt;/span&gt; --height &lt;span class="m"&gt;720&lt;/span&gt; --xwayland &lt;span class="s2"&gt;&amp;#34;plasmashell -p org.kde.plasma.mobileshell&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Plasma Mobile can also be run on a mobile device itself. For more information, see the &lt;a href="https://community.kde.org/Plasma/Mobile/DevGuide#Mobile_device_running_plasma_mobile" &gt;Plasma Mobile Development Guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="building-custom-projects"&gt;Building custom projects&lt;/h2&gt;
&lt;p&gt;Sometimes you want to build your own project using kde-builder, or you'd like to build with a fork of an existing KDE project.&lt;/p&gt;
&lt;p&gt;To do this, you can use kde-builder's
&lt;a href="https://kde-builder.kde.org/en/configuration/config-file-overview.html#project-configuration" &gt;project&lt;/a&gt; configuration option.&lt;/p&gt;
&lt;h3 id="new-projects"&gt;New projects&lt;/h3&gt;
&lt;p&gt;If your project is completely new (not present in the &lt;a href="https://invent.kde.org/sysadmin/repo-metadata" &gt;KDE repo-metadata&lt;/a&gt;), like in the case of the
&lt;a href="/docs/getting-started/kirigami/setup-cpp/#kde-builder" &gt;Kirigami&lt;/a&gt; or
&lt;a href="/docs/getting-started/kxmlgui/hello_world/#kde-builder" &gt;KXmlGui&lt;/a&gt;
tutorials, you can create a &lt;code&gt;project&lt;/code&gt; at the end of your &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;project kirigami-tutorial&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;no-src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then you may use &lt;code&gt;kde-builder&lt;/code&gt; to compile the dependencies needed for your project, and after that your project:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kirigami ki18n kcoreaddons breeze kiconthemes qqc2-desktop-style
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kirigami-tutorial&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="existing-projects"&gt;Existing projects&lt;/h3&gt;
&lt;p&gt;You may want to work on an existing KDE project, for example, KCalc. KDE Builder can handle this case:
you can build a project with your changes.&lt;/p&gt;
&lt;p&gt;First, build the project as normal.
This will download the latest source code of the project and its dependencies, and build them.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Go to the project directory and create a branch whose name starts with &amp;quot;work/&amp;quot;.
When kde-builder detects a work branch, it will not update the sources of the project.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/kde/src/kcalc
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git branch work/username/cool_feature
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git switch work/username/cool_feature&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Make your changes in the source code.&lt;/p&gt;
&lt;p&gt;After that, rebuild the project. This time, you can skip building dependencies, as they are already built.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kcalc --no-include-dependencies&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Next, you may want to push your changes to prepare a merge request.
If you have a developer account, you can push your work branch to the original repo.
If you do not have a KDE developer account, you can add your fork remote, and push changes to it.
See &lt;a href="https://community.kde.org/Infrastructure/GitLab#Submitting_a_merge_request" &gt;wiki page&lt;/a&gt; for more information.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/kde/src/kcalc
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git remote add fork git@invent.kde.org:username/kcalc.git
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git push fork&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To summarize, you have now seen how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;compile standalone apps, frameworks, or other projects: &lt;code&gt;kde-builder kcalc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;compile Plasma Desktop: &lt;code&gt;kde-builder workspace&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;compile Plasma Mobile: &lt;code&gt;kde-builder mobile&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;run what you've built: &lt;code&gt;kde-builder --run kcalc&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="useful-flags"&gt;Useful flags&lt;/h2&gt;
&lt;p&gt;The following sections will show some useful options for &lt;code&gt;kde-builder&lt;/code&gt;. They're not required for normal operation, but can be useful in some situations. If you want, you can skip this part and get started with developing.&lt;/p&gt;
&lt;h3 id="check-the-list-of-things-that-will-be-built"&gt;Check the list of things that will be built&lt;/h3&gt;
&lt;p&gt;To get a general idea of how many and which dependencies are going to be built for a certain project, you can use the &lt;code&gt;--pretend&lt;/code&gt; or &lt;code&gt;--dry-run&lt;/code&gt; flag:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --pretend kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="rebuild-a-project-and-stay-on-current-branch"&gt;Rebuild a project and stay on current branch&lt;/h3&gt;
&lt;p&gt;Code changes should be done in a separate git branch, not in the &lt;code&gt;master&lt;/code&gt; branch.&lt;/p&gt;
&lt;p&gt;By default, kde-builder will always attempt to go back to the &lt;code&gt;master&lt;/code&gt; branch before rebuilding. To avoid this, you can use the &lt;code&gt;--no-src&lt;/code&gt; flag:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --no-src kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="rebuild-only-a-single-project-without-updating-the-source-code"&gt;Rebuild only a single project without updating the source code&lt;/h3&gt;
&lt;p&gt;As mentioned above, there are times when you want to rebuild the project in the current branch.&lt;/p&gt;
&lt;p&gt;By default, kde-builder will rebuild a project and all its dependencies. To avoid this, you can use the &lt;code&gt;--no-include-dependencies&lt;/code&gt; flag:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --no-include-dependencies --no-src kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="build-a-specific-project-while-skipping-certain-modules"&gt;Build a specific project while skipping certain modules&lt;/h3&gt;
&lt;p&gt;Sometimes a particular program somewhere down the dependency chain fails to build and isn't strictly required for a certain project to compile properly, or sometimes you want to use the program installed from your distribution.&lt;/p&gt;
&lt;p&gt;In that case, you can avoid building a project by using the &lt;code&gt;--ignore-projects&lt;/code&gt; flag, which should come after the module name:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kcalc --ignore-projects gpgme&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="specifying-executable-names-when-running"&gt;Specifying executable names when running&lt;/h3&gt;
&lt;p&gt;To run an application, use the flag &lt;code&gt;--run&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --run plasma-discover&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Note that in Discover's case, the name of the project is &lt;code&gt;discover&lt;/code&gt;, but the name of the executable is &lt;code&gt;plasma-discover&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If a project provides more than one executable, you can specify the executable you want as long as you have built the module that provides it:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --run kate-syntax-highlighter --list-themes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Alternatively, most applications can be run directly from their build directory.&lt;/p&gt;
&lt;h3 id="running-an-application-after-making-changes-to-one-of-its-dependencies"&gt;Running an application after making changes to one of its dependencies&lt;/h3&gt;
&lt;p&gt;Let's say you want to make a change to the KConfig library that should change a behavior in KCalc. In this case, you don't want kde-builder to discard your changes to KConfig. So first build KConfig separately, on its own, without doing a source code update:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kconfig --no-src --no-include-dependencies --refresh-build&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will build just KConfig and install the needed build products into &lt;code&gt;~/kde/usr&lt;/code&gt;. Now we want to run KCalc in such a way that it makes use of those changed files. Do it like so:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder kcalc --no-src --no-include-dependencies --refresh-build
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder --run kcalc&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="next-steps"&gt;Next Steps&lt;/h2&gt;
&lt;p&gt;What now?&lt;/p&gt;
&lt;p&gt;Perhaps you went through this whole procedure and still have no idea what to work on:&lt;/p&gt;
&lt;p&gt;In this case, &lt;a href="/docs/getting-started/building/help/choosing/" &gt;choose what to work on&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Or perhaps you'd like to further adapt kde-builder to your needs by setting up your preferred IDE. If that's what you need, have a look at &lt;a href="/docs/getting-started/building/ide/" &gt;IDE Configuration&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you already know what you want to work on and you are in fact already working on it, then it might be time to learn how to make a merge request and send your changes. See &lt;a href="https://community.kde.org/Infrastructure/GitLab#Submitting_a_merge_request" &gt;Submit your new software changes for review&lt;/a&gt; for more information.&lt;/p&gt;</description></item><item><title>Docs: Setting up Qt</title><link>/docs/getting-started/building/kde-builder/kde-builder-qt6/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started/building/kde-builder/kde-builder-qt6/</guid><description>
&lt;p&gt;If your Linux distribution does &lt;strong&gt;NOT&lt;/strong&gt; provide a recent enough version of Qt, you have the following options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;a href="/docs/getting-started/building/containers/distrobox/" &gt;containers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#qt6-online" &gt;Install Qt6 using the Qt online installer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#qt6-aqtinstall" &gt;Install Qt6 using the unofficial aqtinstall installer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#qt6-build" &gt;Build Qt6 using kde-builder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Switch to a &lt;a href="/docs/getting-started/building/#choosing" &gt;more up-to-date distro&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="qt6-version"&gt;Finding the latest Qt version&lt;/h2&gt;
&lt;p&gt;To find out the latest release of Qt, you can visit &lt;a href="https://invent.kde.org/qt/qt/qt5" &gt;KDE's Qt repository mirror&lt;/a&gt; and check for the right branch:&lt;/p&gt;
&lt;figure class="text-center"&gt;&lt;img src="/docs/getting-started/building/kde-builder/kde-builder-qt6/qt-latest-release.png"
alt="A screenshot of the main page of the Qt repository mirror showing the branch list that appears once you click on the combobox that has &amp;#39;dev&amp;#39; written on it."&gt;
&lt;/figure&gt;
&lt;h2 id="qt6-online"&gt;Use Qt6 from the online installer&lt;/h2&gt;
&lt;p&gt;Instead of letting &lt;code&gt;kde-builder&lt;/code&gt; build Qt for you, you may want to use Qt's official installer.&lt;/p&gt;
&lt;p&gt;First, create an account on &lt;a href="https://www.qt.io/" &gt;Qt's website&lt;/a&gt;. Then, download the installer from the &lt;a href="https://www.qt.io/download-qt-installer-oss" &gt;Qt for Open Source Development&lt;/a&gt; page.&lt;/p&gt;
&lt;p&gt;Run the downloaded file, log in with your Qt account, and follow the wizard. During the installation, choose the option &lt;code&gt;Custom installation&lt;/code&gt;, and:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Uncheck &lt;code&gt;Qt Design Studio&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Uncheck &lt;code&gt;Qt Creator&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Make sure the &lt;code&gt;Desktop&lt;/code&gt; item for the latest version of Qt is selected&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This will install only the essential Qt libraries in &lt;code&gt;~/Qt&lt;/code&gt; by default, occupying a little less than 2 GB of storage.&lt;/p&gt;
&lt;p&gt;Once installed, open &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt;, uncomment the line with &lt;code&gt;qt-install-dir: ~/kde/qt&lt;/code&gt;, and change it to point to your Qt installation. The actual path should be similar to this, depending on your Qt version:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;qt-install-dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;~/Qt/6.9.0/gcc_64&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once this is done, &lt;code&gt;kde-builder&lt;/code&gt; will know to use the Qt provided by the online installer to build KDE software.&lt;/p&gt;
&lt;p&gt;If you ever need to install more Qt components, you can do so using the &lt;code&gt;Qt Maintenance Tool&lt;/code&gt; that was added by the installer.&lt;/p&gt;
&lt;h2 id="qt6-aqtinstall"&gt;Use Qt6 from aqtinstall&lt;/h2&gt;
&lt;p&gt;If you do not want to create a Qt account to use Qt's official installer and do not want to build Qt yourself,
you can try using the unofficial installer &lt;code&gt;aqtinstall&lt;/code&gt; which downloads
Qt from the same sources as the official installer.&lt;/p&gt;
&lt;p&gt;First, install &lt;code&gt;aqtinstall&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pipx install aqtinstall&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you don't have &lt;code&gt;pipx&lt;/code&gt; installed, you can install it from your distribution.&lt;/p&gt;
&lt;p&gt;You can then install Qt using:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;aqt install-qt linux desktop 6.9 linux_gcc_64 --outputdir ~/Qt --modules all&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;replacing &lt;code&gt;6.9&lt;/code&gt; with the latest Qt version number. See &lt;a href="#qt6-version" &gt;Finding the latest Qt version&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This will install all Qt modules available in the latest version and will occupy a bit more than 8 GB of storage.&lt;/p&gt;
&lt;p&gt;Once installed, open the file &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt;, uncomment the line with &lt;code&gt;qt-install-dir: ~/kde/qt&lt;/code&gt;, and change it to point to your Qt installation. The actual path should be similar to this, depending on your Qt version:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;qt-install-dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;~/Qt/6.9.0/gcc_64&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once this is done, &lt;code&gt;kde-builder&lt;/code&gt; will know to use the Qt provided by the online installer to build KDE software.&lt;/p&gt;
&lt;h2 id="qt6-build"&gt;Build Qt6 using kde-builder&lt;/h2&gt;
&lt;p&gt;It is possible to build Qt with kde-builder, but it requires a minimum of 30 GB of storage and has a long compilation time, up to a few hours depending on your machine.&lt;/p&gt;
&lt;p&gt;To do this, open the file &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt; and uncomment the line containing:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;qt-install-dir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;~/kde/qt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Near the end of the file, add an override so you build Qt from the latest release instead of the development branch (the default):&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;override qt6-set&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;6.9&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;See &lt;a href="#qt6-version" &gt;Finding the latest Qt version&lt;/a&gt; to get the correct version number.&lt;/p&gt;
&lt;p&gt;Then run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder qt6-set&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This will take a long time.&lt;/p&gt;</description></item><item><title>Docs: Basic troubleshooting</title><link>/docs/getting-started/building/kde-builder/kde-builder-failure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started/building/kde-builder/kde-builder-failure/</guid><description>
&lt;h2 id="the-project-has-failed-to-build"&gt;The project has failed to build&lt;/h2&gt;
&lt;p&gt;Did one or more modules fail to build (displayed in red font) using &lt;code&gt;kde-builder&lt;/code&gt;?
This page should tell you the most likely causes and how to fix them.&lt;/p&gt;
&lt;p&gt;Remember that you can &lt;a href="/docs/getting-started/building/help/developers/" &gt;contact the development team&lt;/a&gt; to get assistance with kde-builder.&lt;/p&gt;
&lt;h3 id="missing-dependencies"&gt;Missing dependencies&lt;/h3&gt;
&lt;p&gt;The most likely reason is that you are missing the dependencies necessary for the failing module.
Once &lt;code&gt;kde-builder&lt;/code&gt; finishes its build and fails, it will display the path to the module's CMake log files (for example: &lt;code&gt;~/kde/src/log/latest/kwallet/error.log&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;You should take a look at the log files to see if anything is missing: you can read more about how to understand the errors you get from CMake in &lt;a href="/docs/getting-started/building/help/dependencies/" &gt;Install the dependencies&lt;/a&gt;.
That page will also tell you how to search for dependencies in your distribution.&lt;/p&gt;
&lt;p&gt;When you have the necessary dependencies, you can save time and resume from the failing module with the &lt;code&gt;--resume-from&lt;/code&gt; flag:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;kde-builder [module you want to build] --resume-from [the module that failed]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h3 id="old-cache"&gt;Old cache&lt;/h3&gt;
&lt;p&gt;Sometimes a project has suffered big enough changes to its code that its cache starts to affect subsequent builds.&lt;/p&gt;
&lt;p&gt;To clear the cache, you can use the &lt;code&gt;--refresh-build&lt;/code&gt; flag:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;kde-builder [failing module] --refresh-build --no-include-dependencies&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h3 id="broken-master-branch"&gt;Broken master branch&lt;/h3&gt;
&lt;p&gt;It is rare, but if the master branch of a project contains faulty code, it will not compile with kde-builder.&lt;/p&gt;
&lt;p&gt;To check, look at the &lt;a href="https://invent.kde.org" &gt;Invent&lt;/a&gt;, KDE's Gitlab instance where all code is stored.
If the project has a GitLab build pipeline and the pipeline is broken, then it's not your fault.&lt;/p&gt;
&lt;figure class="text-center mr-5 pr-5"&gt;&lt;img src="/docs/getting-started/building/kde-builder/kde-builder-failure/gitlab-successful.webp"
alt="Where to see if the pipeline is working."&gt;&lt;figcaption&gt;
&lt;p&gt;Where to see if the pipeline is working.&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="the-project-has-failed-to-run"&gt;The project has failed to run&lt;/h2&gt;
&lt;p&gt;Did the project build successfully, but it does not run as intended?
Here are a few reasons why.&lt;/p&gt;
&lt;h3 id="changes-to-the-installed-files"&gt;Changes to the installed files&lt;/h3&gt;
&lt;p&gt;Sometimes some changes to a project's code (or one of its dependency libraries) lead to its installed files to be renamed or moved.
When that happens, the old files might still linger in &lt;code&gt;~/kde/usr&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;There are multiple ways to address this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can just always run kde-builder with the &lt;code&gt;--use-clean-install&lt;/code&gt; flag. This will call the uninstall target of CMake that KDE projects using extra-cmake-modules have, uninstalling previously installed files before installing new ones. This will decrease the speed of installing files built with kde-builder.&lt;/li&gt;
&lt;li&gt;You can nuke your current installed files with &lt;code&gt;rm -rf ~/kde/usr&lt;/code&gt; and then rerun kde-builder.&lt;/li&gt;
&lt;li&gt;You can start with a new and clean kde-builder installation. This can be done by creating a new user and installing kde-builder from scratch. Another possibility is to rename your existing development setup with &lt;code&gt;mv ~/kde ~/kde~bak&lt;/code&gt; and then rerun kde-builder.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="common-problems-in-stable-distributions"&gt;Common problems in stable distributions&lt;/h2&gt;
&lt;p&gt;Distributions that are &lt;a href="/docs/getting-started/building/#choosing" &gt;not sufficiently up-to-date&lt;/a&gt; may encounter unavoidable problems that will need to be addressed to .&lt;/p&gt;
&lt;p&gt;Sometimes lack a required library for building a specific project, and if you have followed our &lt;a href="/docs/getting-started/building/kde-builder/kde-builder-setup/#setting-up-qt" &gt;Qt setup with the online installer&lt;/a&gt;, you might have noticed that the default recommended installation is lean by default, which means you might be missing some Qt library.&lt;/p&gt;
&lt;h3 id="cannot-build-python-bindings--missing-stddefh"&gt;Cannot build Python bindings / missing stddef.h&lt;/h3&gt;
&lt;p&gt;To build the &lt;a href="/docs/getting-started/python/python-bindings/" &gt;Python bindings for KDE Frameworks&lt;/a&gt;, the following packages are required:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;python3-build&lt;/li&gt;
&lt;li&gt;python3-shiboken6 and respective development package&lt;/li&gt;
&lt;li&gt;python3-pyside6 and respective development package&lt;/li&gt;
&lt;li&gt;clang&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The names may vary according to the distribution.&lt;/p&gt;
&lt;p&gt;If you get an error similar to this:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;(kcoreaddons) Clang: 1 diagnostic messages:
/usr/include/c&amp;#43;&amp;#43;/14/cstddef:50:10: fatal: &amp;#39;stddef.h&amp;#39; file not found&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This means you need to install clang.&lt;/p&gt;
&lt;p&gt;If you encounter other errors referencing shiboken or pyside, you might be missing some of the other packages.&lt;/p&gt;
&lt;p&gt;Note that by default you won't encounter this issue on most major distributions if you have allowed kde-builder to install the necessary distro packages with either &lt;code&gt;kde-builder --initial-setup&lt;/code&gt; or &lt;code&gt;kde-builder --install-distro-packages&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Alternatively, you may disable building the Python bindings altogether by adding the following to the global &lt;code&gt;cmake-options&lt;/code&gt; section of your &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DBUILD_WITH_PYTHON_BINDINGS=OFF&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="qt-online-installer-missing-libraries"&gt;Qt online installer: missing libraries&lt;/h3&gt;
&lt;p&gt;We opt to recommend a leaner installation of Qt with the online installer in our &lt;a href="/docs/getting-started/building/kde-builder/kde-builder-setup/#setting-up-qt" &gt;Qt setup&lt;/a&gt;, but sometimes this might mean you will end up missing a major optional Qt library such as QtWebengine, QtTextToSpeech, or QtVirtualKeyboard.&lt;/p&gt;
&lt;p&gt;To install the missing libraries, open the &amp;quot;Qt Maintenance Tool&amp;quot; entry in your menu and select the optional library that you need that matches the Qt version you have installed.&lt;/p&gt;
&lt;p&gt;Alternatively, many projects offer to disable specific features that require optional libraries. To do this, first attempt to compile them once with kde-builder. Afterwards, run &lt;code&gt;ccmake&lt;/code&gt; in its respective build directory:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ccmake ~/kde/build/ktextwidgets&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You will see that in the KTextWidgets case there is a setting to disable building &lt;code&gt;WITH_TEXT_TO_SPEECH&lt;/code&gt;, which bypasses the need for you to have QtTextToSpeech installed on your system.&lt;/p&gt;
&lt;p&gt;You can then override KTextWidgets to disable this option by adding the following to the end of your &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt; file:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;override ktextwidgets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DWITH_TEXT_TO_SPEECH=OFF&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="missing-non-kde-library-that-is-not-managed-by-kde-builder"&gt;Missing non-KDE library that is not managed by kde-builder&lt;/h3&gt;
&lt;p&gt;By default kde-builder does build third-party libraries that are required by bleeding edge KDE applications or libraries, such as gpgme, poppler and wayland-protocols. You can list them with &lt;code&gt;kde-builder --dry-run workspace | grep third&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Sometimes a KDE application might require a third-party library that is not managed by kde-builder and is not available on your distribution. For such cases, the only solution is to build that library manually with kde-builder. This makes sure that the library will be accessible by applications compiled and run with kde-builder, as it will be installed in &lt;code&gt;~/kde/usr&lt;/code&gt; like the rest of the compiled projects.&lt;/p&gt;
&lt;p&gt;To achieve this, you may add a &lt;code&gt;project&lt;/code&gt; to your &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt;, similarly to &lt;a href="/docs/getting-started/building/kde-builder/kde-builder-compile/#new-projects" &gt;Building custom projects&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;project outside-project&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;repository&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;git@invent.kde.org:youruser/outside-project.git&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Thus allowing you to run:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;kde-builder outside-project&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Docs: Tips and tricks</title><link>/docs/getting-started/building/kde-builder/kde-builder-tips/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/getting-started/building/kde-builder/kde-builder-tips/</guid><description>
&lt;h2 id="directlogs"&gt;Opening logs directly from Konsole / Yakuake&lt;/h2&gt;
&lt;p&gt;Konsole and Yakuake, two terminal applications by KDE, have the ability to open files by clicking directly on their path on the screen.&lt;/p&gt;
&lt;p&gt;For example, if you build Kirigami using kde-builder and you happen to face an error like this:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;&amp;lt;&amp;lt;&amp;lt; PACKAGES FAILED TO BUILD &amp;gt;&amp;gt;&amp;gt;
kirigami - /home/youruser/kde/src/log/2024-03-17-01/kirigami/build.log&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Clicking on the file path text will open the log file with your preferred text editor.&lt;/p&gt;
&lt;p&gt;To enable this functionality in Konsole or Yakuake:&lt;/p&gt;
&lt;p&gt;Right click the terminal -&amp;gt; Edit Current Profile... -&amp;gt; Mouse -&amp;gt; Miscellaneous -&amp;gt; enable Underline Files.&lt;/p&gt;
&lt;h2 id="colorizing-build-logs-correctly-in-kate"&gt;Colorizing build logs correctly in Kate&lt;/h2&gt;
&lt;p&gt;By default, when you open a &lt;code&gt;.log&lt;/code&gt; file in Kate, its syntax will be highlighted as &amp;quot;Log File (simplified)&amp;quot;.
The mode &amp;quot;Log File (advanced)&amp;quot; applies full syntax highlighting which makes it easier to read log files.&lt;/p&gt;
&lt;p&gt;There are two ways to change from simplified to advanced mode:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Through the menu: &lt;strong&gt;Tools | Highlighting | Other | Log File (advanced)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Through the syntax highlighting button at the bottom right of Kate (where it says &amp;quot;Log File (simplified)&amp;quot;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To avoid applying this manually each time you open log file, change the priority of the Filetype:&lt;/p&gt;
&lt;p&gt;In the main menu, go to &lt;strong&gt;Settings | Configure Kate&lt;/strong&gt;. In the &lt;em&gt;Configure Kate&lt;/em&gt; window choose
&lt;strong&gt;Open/Save | Modes &amp;amp; Filetypes&lt;/strong&gt;. In the Filetype dropdown list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;select &lt;em&gt;Other/Log File (advanced)&lt;/em&gt; and set its &lt;em&gt;Priority&lt;/em&gt; to &amp;quot;-10&amp;quot;&lt;/li&gt;
&lt;li&gt;select &lt;em&gt;Other/Log File (simplified)&lt;/em&gt; and set its &lt;em&gt;Priority&lt;/em&gt; to &amp;quot;-11&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Apply changes and close the window.&lt;/p&gt;
&lt;h2 id="viewing-colored-build-logs"&gt;Viewing colored build logs&lt;/h2&gt;
&lt;p&gt;The log files include escape symbols (that are used to color the text, or format it as bold for example). To view it properly, you will need to open the log with a suitable tool.&lt;/p&gt;
&lt;p&gt;There are two main possibilities for this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Opening the log files with your preferred text editor.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Any editor that does syntax highlighting for &lt;code&gt;.log&lt;/code&gt; files will do. KDE provides Kate / KWrite, which has both &amp;quot;Log File (simple)&amp;quot; and &amp;quot;Log File (advanced)&amp;quot; highlighting options selectable from the bottom right of the window.&lt;/p&gt;
&lt;p&gt;Sublime Text has the &lt;a href="https://github.com/aziz/SublimeANSI" &gt;ANSI color&lt;/a&gt; plugin.&lt;/p&gt;
&lt;p&gt;This method also works with the above tip &lt;a href="#directlogs" &gt;Open logs directly with Konsole / Yakuake&lt;/a&gt;.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Opening the log files with a terminal application.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can view log files with a terminal application like &lt;code&gt;cat&lt;/code&gt; or &lt;a href="https://github.com/sharkdp/bat" &gt;bat&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="preventing-accidental-src-folder-deletion"&gt;Preventing accidental src/ folder deletion&lt;/h2&gt;
&lt;p&gt;When you want to start the whole build from scratch, by deleting your &lt;code&gt;~/kde/build&lt;/code&gt; and &lt;code&gt;~/kde/usr&lt;/code&gt;, you may accidentally delete your &lt;code&gt;~/kde/src&lt;/code&gt;. To protect yourself from that, you &lt;a href="https://wiki.archlinux.org/title/File_permissions_and_attributes#File_attributes" &gt;can set the immutable flag to that directory&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;sudo chattr &amp;#43;i ~/kde/src&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Now you have write permissions to the folder, but you cannot delete it.&lt;/p&gt;
&lt;h2 id="faster-compile-times"&gt;Faster compile times&lt;/h2&gt;
&lt;p&gt;It is possible to change various CMake options globally in kde-builder so that projects will build faster, which is convenient especially for building KDE software on weaker machines. By setting these options globally, if you ever need them enabled for a specific project, you can then use &lt;a href="https://kde-builder.kde.org/en/configuration/config-file-overview.html#overriding-configuration" &gt;kde-builder config overrides&lt;/a&gt;.&lt;/p&gt;
&lt;div class="d-flex align-items-center notecard notecard--warning" role="alert"&gt;
&lt;span&gt;
&lt;p class="h4 mt-0"&gt;⚠️ Tread with caution&lt;/p&gt;Disabling certain CMake options, while providing build speed improvements, can make major changes to your build, most notably CMAKE_BUILD_TYPE and BUILD_TESTING. You should be aware of these customizations and mention them whenever you request for assistance from other developers.
&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;These options can be set in the global section of your &lt;code&gt;~/.config/kde-builder.yaml&lt;/code&gt;, under &lt;code&gt;cmake-options&lt;/code&gt;, for example:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-&lt;span class="l"&gt;DOPTION=OFF -DANOTHER_OPTION=value2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or with multiline:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DOPTION=OFF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DANOTHER_OPTION=value&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then, at the end of the file, you can set overrides for each individual option that go against the global &lt;code&gt;cmake-options&lt;/code&gt; values:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;override kirigami&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-&lt;span class="l"&gt;DOPTION=ON&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If it is a custom project (not a KDE project), you can use &lt;code&gt;project&lt;/code&gt; instead:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;project kirigami-tutorial&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-&lt;span class="l"&gt;DOPTION=ON&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="faster-iterative-compiling-with-debug-mode"&gt;Faster iterative compiling with Debug mode&lt;/h3&gt;
&lt;p&gt;By default, kde-builder compiles projects in &lt;code&gt;RelWithDebInfo&lt;/code&gt; mode, that is, Release with Debug Info.&lt;/p&gt;
&lt;p&gt;You might want to set it to Debug mode which is optimal for iterative compilation:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DCMAKE_BUILD_TYPE=Debug&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="building-without-tests"&gt;Building without tests&lt;/h3&gt;
&lt;p&gt;All KDE projects that use extra-cmake-modules have &lt;a href="https://api.kde.org/ecm/kde-module/KDECMakeSettings.html#testing" &gt;tests set to build by default&lt;/a&gt; together with the main project. This ensures that developers catch bugs easily and quickly, but it also takes significant time when building dozens of modules.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DBUILD_TESTING=OFF&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="building-without-docs"&gt;Building without docs&lt;/h3&gt;
&lt;p&gt;KDE projects can make use of multiple ways of generating documentation: &lt;a href="https://doc.qt.io/qt-6/qthelp-framework.html" &gt;Qt Help projects (.qhp) and compressed Qt Help files (.qch)&lt;/a&gt;, &lt;a href="https://www.doxygen.nl/" &gt;Doxygen HTML or manpages&lt;/a&gt;, Sphinx, and recently QDoc. The first two can be globally disabled, although the speed improvements are not as significant as the build type or tests.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DBUILD_QTHELP_DOCS=OFF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DBUILD_QCH=OFF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DBUILD_HTML_DOCS=OFF
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DBUILD_MAN_DOCS=OFF&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="building-with-a-different-linker"&gt;Building with a different linker&lt;/h3&gt;
&lt;p&gt;On Linux, the default linker used for C and C++ is LD (using the GNU BFD library) which is single threaded.&lt;/p&gt;
&lt;p&gt;You can take advantage of the multithreaded nature of LLVM's &lt;a href="https://lld.llvm.org/" &gt;LLD linker&lt;/a&gt; to speed compile times significantly:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DCMAKE_LINKER_TYPE=LLD&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="building-with-ccache-or-sccache"&gt;Building with ccache or sccache&lt;/h3&gt;
&lt;p&gt;Compiler cache, or &lt;code&gt;ccache&lt;/code&gt;, can be used to increase build speed only when recompiling projects.&lt;/p&gt;
&lt;p&gt;Running it your first time building KDE projects will not make any difference whatsoever, and even subsequent runs will only see some improvement. Where &lt;code&gt;ccache&lt;/code&gt; excels at is when switching between different branches, stashes, rebases or bisects and recompiling repeatedly, that is to say, when you are developing a patch.&lt;/p&gt;
&lt;div class="d-flex align-items-center notecard notecard--warning" role="alert"&gt;
&lt;span&gt;
&lt;p class="h4 mt-0"&gt;⚠️ Tread with caution&lt;/p&gt;&lt;p&gt;There are certain caveats that you must be aware when using &lt;code&gt;ccache&lt;/code&gt;, most notably that you can have compilation failures caused specifically by ccache, and that lookup in large caches can actually make compilation slower. See &lt;a href="https://wiki.archlinux.org/title/Ccache#Caveat" &gt;Ccache caveats on the Arch wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;While you will still likely perceive some improvement by setting this globally, you might prefer to override each individual project you are likely to work on instead to minimize these issues.&lt;/p&gt;
&lt;p&gt;Before reporting compilation issues, disable this option for the project you are working on.&lt;/p&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;p&gt;To use &lt;code&gt;ccache&lt;/code&gt; you will first need to install it.&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DCMAKE_C_COMPILER_LAUNCHER=ccache
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DCMAKE_CXX_COMPILER_LAUNCHER=ccache&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you prefer, you may also want to experiment with &lt;a href="https://github.com/mozilla/sccache" &gt;sccache&lt;/a&gt;, a newer alternative to accomplish the same job:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DCMAKE_C_COMPILER_LAUNCHER=sccache
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DCMAKE_CXX_COMPILER_LAUNCHER=sccache&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id="building-without-po-processing"&gt;Building without PO processing&lt;/h3&gt;
&lt;p&gt;By default, KDE projects will always include translations during compilation. This is ordinarily not a problem, but KDE infrastructure uses an automated script to update translations via commits. It might not be desirable to always recompile a project whenever a new translation gets added or changed.&lt;/p&gt;
&lt;p&gt;Whether to process new translations can be disabled globally in the configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DKF_SKIP_PO_PROCESSING=ON&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="enabling-the-qml-language-server"&gt;Enabling the QML language server&lt;/h2&gt;
&lt;p&gt;Up until Qt 6.10, the QML language server &lt;code&gt;qmlls&lt;/code&gt; only works if you write or generate a &lt;code&gt;.qmlls.ini&lt;/code&gt; file in the source of your project.&lt;/p&gt;
&lt;p&gt;It is possible to generate it for all projects built with kde-builder with a CMake option:&lt;/p&gt;
&lt;div class="highlight"&gt;
&lt;pre tabindex="0" class="chroma" style="margin-top: 0;
padding-top: 0.4em;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;cmake-options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; -DQT_QML_GENERATE_QMLLS_INI=ON&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It will be located in the same directory where a &lt;code&gt;qt_add_qml_module()&lt;/code&gt; or &lt;code&gt;ecm_add_qml_module()&lt;/code&gt; call is made.&lt;/p&gt;
&lt;p&gt;After Qt 6.10, &lt;code&gt;.qmlls.ini&lt;/code&gt; is no longer necessary and you only need the &lt;code&gt;qmlls&lt;/code&gt; language server to be running. You may still configure its behavior with the INI file.&lt;/p&gt;</description></item></channel></rss>