Get Involved/development/More: Difference between revisions
Thiagosueto (talk | contribs) →Option 2. distrobox: Moved to Develop |
→Develop in a Linux container: KDE PIM docker uses a too old docker image from 2022 |
||
(17 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
This page is the continuation with more advanced topics of the page [[Get_Involved/development]]. | This page is the continuation with more advanced topics of the page [[Get_Involved/development]]. | ||
kde-builder has replaced the previous KDE build framework named kdesrc-build. | |||
kdesrc-build | |||
== Develop in a Linux container == | == Develop in a Linux container == | ||
When you start programming for KDE, it is recommended that you [[Get_Involved/development|use | When you start programming for KDE, it is recommended that you [[Get_Involved/development|use kde-builder in your main operating system or in a virtual machine]] running on a [[Get_Involved/development#Operating_system|Linux operating system that is better supported by kde-builder]]. | ||
As an alternative, you can run | As an alternative, you can run kde-builder in a Linux container (docker, podman, toolbx, distrobox). | ||
=== | === distrobox === | ||
It is possible to start developing KDE software using container images that are able to see inside your home folder. This can be done using distrobox and podman. | It is possible to start developing KDE software using container images that are able to see inside your home folder. This can be done using distrobox and podman. | ||
This solution is particularly useful for users on immutable distributions like Fedora Kinoite, openSUSE Kalpa or | This solution is particularly useful for users on immutable distributions like Fedora Kinoite, openSUSE Kalpa or Valve's SteamOS 3 | ||
To learn how to build KDE software with distrobox, see: https://develop.kde.org/docs/getting-started/building/containers-distrobox/ | To learn how to build KDE software with distrobox, see: https://develop.kde.org/docs/getting-started/building/containers-distrobox/ | ||
Line 31: | Line 19: | ||
== Other operating systems == | == Other operating systems == | ||
=== Kubuntu >= | === Kubuntu >= 24.10 === | ||
The default configuration of | The default configuration of kde-builder requires Qt version 6.7. Kubuntu 24.10 has Qt version 6.6. It is recommended that you use a [[Get_Involved/development#Operating_system|Linux OS that is better supported by kde-builder]]. | ||
If you are a more seasoned developer you might be able to use Kubuntu for | If you are a more seasoned developer you might be able to use Kubuntu for kde-builder by [https://develop.kde.org/docs/getting-started/building/kde-builder-setup/#qt6-online installing Qt6 using the Qt online installer] or by [https://develop.kde.org/docs/getting-started/building/kde-builder-setup/#qt6-build building Qt6 using kde-builder]. | ||
=== Alpine Linux === | === Alpine Linux === | ||
Line 55: | Line 43: | ||
</pre> | </pre> | ||
Then set up | Then set up kde-builder using the same procedure as when installing kde-builder on a Linux operating system. FreeBSD is currently supported by kde-builder. See https://www.youtube.com/watch?v=AhDHUg81M_I and https://www.youtube.com/watch?v=HRiKzaw8cAw . | ||
=== OpenBSD >= 7.5 === | === OpenBSD >= 7.5 === | ||
Line 65: | Line 53: | ||
cp /etc/examples/doas.conf /etc/doas.conf | cp /etc/examples/doas.conf /etc/doas.conf | ||
exit | exit | ||
# | # kde-builder needs sudo. | ||
mkdir -p ~/.local/bin ; ln -s /usr/bin/doas ~/.local/bin/sudo | mkdir -p ~/.local/bin ; ln -s /usr/bin/doas ~/.local/bin/sudo | ||
echo "export PATH=~/.local/bin:\$PATH" >> ~/.bashrc | echo "export PATH=~/.local/bin:\$PATH" >> ~/.bashrc | ||
Line 86: | Line 74: | ||
</pre> | </pre> | ||
After you install | After you install kde-builder: | ||
<pre> | <pre> | ||
# Edit the kdesrc-buildrc file e.g.: | # Edit the kdesrc-buildrc file e.g.: | ||
Line 104: | Line 92: | ||
You can build and develop KDE projects using the [[Get_Involved/development/Mac|Apple macOS]] operating system. | You can build and develop KDE projects using the [[Get_Involved/development/Mac|Apple macOS]] operating system. | ||
== Project Documentation == | == Project Documentation == | ||
* | * https://kde-builder.kde.org | ||
* https://invent.kde.org/sdk/kde-builder | |||
* | |||
== kf6-qt6 vs. kf5-qt5 == | == kf6-qt6 vs. kf5-qt5 == | ||
Many KDE git repositories can build correctly and run correctly using " | Many KDE git repositories can build correctly and run correctly using "kde-builder kf6-qt6". | ||
The KDE git repositories that can build correctly and run correctly using " | The KDE git repositories that can build correctly and run correctly using "kde-builder kf6-qt6" have two long lived git branches: | ||
* A long lived git branch that does not contain the deprecated symbols from kf5-qt5, named e.g. "master". | * A long lived git branch that does not contain the deprecated symbols from kf5-qt5, named e.g. "master". | ||
* And another long lived git branch for qt5-kf5, where the deprecated symbols still exist. | * And another long lived git branch for qt5-kf5, where the deprecated symbols still exist. | ||
What is "kf6-qt6"? You just set up | What is "kf6-qt6"? You just set up kde-builder following the procedure. The resulting kde-builder installation will be of type kf6-qt6. In kde-builder.yaml in the "global:" section you will have "branch-group: kf6-qt6". The git repositories that have only one long lived git branch e.g. named "master" will use that. The git repositories that have a second long lived git branch, will use the git branch where the deprecated symbols do not exist e.g. named "master". | ||
What is "kf5-qt5"? Follow the chapter "kde-builder Qt5". The resulting kde-builder installation will be of type kf5-qt5. In kde-builder.yaml in the "global:" section you will have "branch-group: kf5-qt5". The git repositories that have only one long lived git branch e.g. named "master" will use that. The git repositories that have a second long lived git branch where the deprecated symbols still exist e.g. named "kf5" will use that. | |||
== Two independent kde-builder configurations: kf6-qt6 and kf5-qt5 == | |||
== Two independent | |||
You can switch between configurations with {{ic|--rc-file}} command line option. Generate another config, make the changes for the {{ic|source-dir}}, {{ic|build-dir}}, {{ic|install-dir}}, | You can switch between configurations with {{ic|--rc-file}} command line option. Generate another config, make the changes for the {{ic|source-dir}}, {{ic|build-dir}}, {{ic|install-dir}}, | ||
Line 218: | Line 130: | ||
}} | }} | ||
== Other CPU architectures than x86_64/amd64 | == Other CPU architectures than x86_64/amd64 == | ||
You can build and develop KDE projects using a Linux OS installed on an | You can build and develop KDE projects using a Linux OS installed on an [[Get_Involved/development/ARM|ARM]] architecture CPU. | ||
== | == kde-builder issues == | ||
=== "kde-builder kpat" fails because of black-hole-solitaire === | |||
=== " | |||
This happens on Debian/Ubuntu/Kubuntu. Because there is no Linux distribution binary package for https://github.com/shlomif/black-hole-solitaire. | This happens on Debian/Ubuntu/Kubuntu. Because there is no Linux distribution binary package for https://github.com/shlomif/black-hole-solitaire. | ||
Line 235: | Line 145: | ||
cmake-options -DWITH_BH_SOLVER=OFF | cmake-options -DWITH_BH_SOLVER=OFF | ||
end options | end options | ||
</pre> | </pre> |
Latest revision as of 23:17, 22 December 2024
This page is the continuation with more advanced topics of the page Get_Involved/development.
kde-builder has replaced the previous KDE build framework named kdesrc-build.
Develop in a Linux container
When you start programming for KDE, it is recommended that you use kde-builder in your main operating system or in a virtual machine running on a Linux operating system that is better supported by kde-builder.
As an alternative, you can run kde-builder in a Linux container (docker, podman, toolbx, distrobox).
distrobox
It is possible to start developing KDE software using container images that are able to see inside your home folder. This can be done using distrobox and podman.
This solution is particularly useful for users on immutable distributions like Fedora Kinoite, openSUSE Kalpa or Valve's SteamOS 3
To learn how to build KDE software with distrobox, see: https://develop.kde.org/docs/getting-started/building/containers-distrobox/
Other operating systems
Kubuntu >= 24.10
The default configuration of kde-builder requires Qt version 6.7. Kubuntu 24.10 has Qt version 6.6. It is recommended that you use a Linux OS that is better supported by kde-builder.
If you are a more seasoned developer you might be able to use Kubuntu for kde-builder by installing Qt6 using the Qt online installer or by building Qt6 using kde-builder.
Alpine Linux
apk add git perl doas-sudo-shim
FreeBSD
Install the latest release of FreeBSD with KDE Plasma Desktop on your hardware computer or in a virtual machine.
Your user should be member of the "wheel" user group (e.g. this can be configured in the FreeBSD installer, when creating your user you can select additional user groups for your user). Your user should be able to use sudo:
pkg install sudo visudo # Uncomment the line: %wheel ALL=(ALL:ALL) ALL
Then set up kde-builder using the same procedure as when installing kde-builder on a Linux operating system. FreeBSD is currently supported by kde-builder. See https://www.youtube.com/watch?v=AhDHUg81M_I and https://www.youtube.com/watch?v=HRiKzaw8cAw .
OpenBSD >= 7.5
Install OpenBSD version greater than or equal to 7.5. In the installer keep the defaults, the user created by the installer is named "administrator" in this example.
# Enable doas su - cp /etc/examples/doas.conf /etc/doas.conf exit # kde-builder needs sudo. mkdir -p ~/.local/bin ; ln -s /usr/bin/doas ~/.local/bin/sudo echo "export PATH=~/.local/bin:\$PATH" >> ~/.bashrc # Test doas. doas su # kde-builder needs bash. pkg_add bash chsh -s /usr/local/bin/bash exit # As user administrator chsh -s /usr/local/bin/bash # As per https://rsadowski.de/posts/2024-01-09-openbsd-kde/ , https://openports.pl/path/meta/kde,-plasma doas su pkg_add kde-plasma kate # I recommend that you use tigervnc. https://nmariusp.github.io/install-os.html#openbsd--75
After you install kde-builder:
# Edit the kdesrc-buildrc file e.g.: cmake-options -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKF_IGNORE_PLATFORM_CHECK=ON # Also set environment variable: export CMAKE_PREFIX_PATH=/usr/local/lib/qt6/cmake # Or export CMAKE_PREFIX_PATH=/usr/local/lib/qt5/cmake
Microsoft Windows
You can build and develop KDE projects using the Microsoft Windows operating system.
Apple macOS
You can build and develop KDE projects using the Apple macOS operating system.
Project Documentation
kf6-qt6 vs. kf5-qt5
Many KDE git repositories can build correctly and run correctly using "kde-builder kf6-qt6".
The KDE git repositories that can build correctly and run correctly using "kde-builder kf6-qt6" have two long lived git branches:
- A long lived git branch that does not contain the deprecated symbols from kf5-qt5, named e.g. "master".
- And another long lived git branch for qt5-kf5, where the deprecated symbols still exist.
What is "kf6-qt6"? You just set up kde-builder following the procedure. The resulting kde-builder installation will be of type kf6-qt6. In kde-builder.yaml in the "global:" section you will have "branch-group: kf6-qt6". The git repositories that have only one long lived git branch e.g. named "master" will use that. The git repositories that have a second long lived git branch, will use the git branch where the deprecated symbols do not exist e.g. named "master".
What is "kf5-qt5"? Follow the chapter "kde-builder Qt5". The resulting kde-builder installation will be of type kf5-qt5. In kde-builder.yaml in the "global:" section you will have "branch-group: kf5-qt5". The git repositories that have only one long lived git branch e.g. named "master" will use that. The git repositories that have a second long lived git branch where the deprecated symbols still exist e.g. named "kf5" will use that.
Two independent kde-builder configurations: kf6-qt6 and kf5-qt5
You can switch between configurations with --rc-file
command line option. Generate another config, make the changes for the source-dir
, build-dir
, install-dir
,
and other changes you want. Make sure you use different value for persistent-data-file
option, to not mix things up.
As an alternative, you can utilize custom variable to make switch from a single config:
global
_ver 5 # <-- Change this to switch
source-dir ~/kde${_ver}/src
build-dir ~/kde${_ver}/build
install-dir ~/kde${_ver}/usr
persistent-data-file ~/kde${_ver}/persistent-options.json
end global
include ~/.local/share/kdesrc-build/data/build-include/kf${_ver}-qt${_ver}.ksb
Other CPU architectures than x86_64/amd64
You can build and develop KDE projects using a Linux OS installed on an ARM architecture CPU.
kde-builder issues
"kde-builder kpat" fails because of black-hole-solitaire
This happens on Debian/Ubuntu/Kubuntu. Because there is no Linux distribution binary package for https://github.com/shlomif/black-hole-solitaire.
Solution: append at the end of kdesrc-buildrc file:
options kpat cmake-options -DWITH_BH_SOLVER=OFF end options