|
|
(20 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| In the following we give the dependencies to install. However it might change and this page might be quickly outdated.
| | See https://develop.kde.org/docs/getting-started/building/help-dependencies |
| | |
| {{Note|If some packages fail to install, you can try removing the ones that don't work from the list.}}
| |
| | |
| Reading the <code>CMakeLists.txt</code> of the packages you want to install should help you finding what you '''really''' need to install. Or read the error logs (see below).
| |
| | |
| If you need help, see https://community.kde.org/Get_Involved#Getting_in_Touch_and_Working_Together
| |
| | |
| === Enable the source repositories ===
| |
| | |
| <pre class="ml-0 pre-input" style="display: inline;">Set up kdesrc-build - Step 4/6.</pre>
| |
| | |
| Some operating systems also require that you enable on the source repositories before you can install build dependencies. Do that now, if necessary:
| |
| * KDE neon/Debian/Ubuntu/Kubuntu: <code>sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list && sudo apt update</code> . Open the file <code>/etc/apt/sources.list</code> in a text editor and make sure that each line that starts with "deb " is followed by an identical line but which starts with "deb-src ". For more information, see https://askubuntu.com/questions/158871/how-do-i-enable-the-source-code-repositories. Note: if the file <code>/etc/apt/sources.list</code> does not contain commented out deb-src lines starting with "#deb-src " and <code>apt build-dep</code> returns errors (e.g. <code>E: You must put some 'deb-src' URIs in your sources.list</code>). Then you should duplicate the lines starting with "deb " and in the copied/duplicated lines, replace "deb " with "deb-src ".
| |
| * openSUSE Leap & Tumbleweed: <code>sudo zypper mr -e $(zypper repos | awk '/source/{print $5}')</code>
| |
| * Gentoo is all built from sources anyway, so in most cases all necessary build dependencies for installed packages will be available from the get-go, but for convenience this page will refer to sets available from [https://wiki.gentoo.org/wiki/KDE/Ebuild_repository KDE ebuild repository]:<br /><code>emerge eselect-repository && eselect repository enable kde</code>
| |
| <br />
| |
| If you don't see your distro in the above list, then there's nothing you need to do here and you can safely move on.
| |
| <br />
| |
| | |
| == How to install the dependencies of one package ==
| |
| === KDE neon, Debian, Ubuntu, Kubuntu ===
| |
| All the build packages known by the package you want to build can be installed by running:
| |
| | |
| <code>sudo apt build-dep <package you want to build></code>
| |
| | |
| For example, to install the build dependencies for Dolphin, run:
| |
| | |
| <code>sudo apt build-dep dolphin</code>
| |
| | |
| === Fedora===
| |
| If dependencies are missing for a specific RPM package, you can run:
| |
| | |
| <code>sudo dnf builddep <name_of_rpm_package></code>
| |
| | |
| For example, to install the build dependencies for Dolphin, run:
| |
| | |
| <code>sudo dnf builddep dolphin</code>
| |
| | |
| === openSUSE ===
| |
| Generally you can install the required -devel packages that are needed to build some KDE software from source by using <code>zypper</code> (as root, or by using <code>sudo</code>), e.g. to install the -devel packages required to build dolphin from source:
| |
| {{Input|1=<nowiki>
| |
| # zypper --plus-content repo-source source-install --build-deps-only dolphin
| |
| </nowiki>}}
| |
| | |
| replace ''dolphin'' with some other package name, e.g. to build ''ktexteditor'' from source:
| |
| {{Input|1=<nowiki>
| |
| # zypper --plus-content repo-source source-install --build-deps-only ktexteditor
| |
| </nowiki>}}
| |
| | |
| Note that the <code>--plus-content</code> option in the above commands means you don't need to have the source repository enabled all the time, <code>--plus-content</code> will make zypper temporarily enable it to get the info it needs.
| |
| | |
| openSUSE (and most other RPM-based Linux distributions) support cmake() BuildRequires, which means you can install a development package like so:
| |
| {{Input|1=<nowiki>
| |
| # zypper install 'cmake(KF5KIO)'
| |
| </nowiki>}}
| |
| | |
| the part between the parenthesis ''KF5KIO'' is going to be in the error message that CMake will print in the terminal if you try to build something that requires e.g. KIO if KIO development headers aren't installed.
| |
| | |
| == For all of the KDE Frameworks 5 ==
| |
| | |
| <pre class="ml-0 pre-input" style="display: inline;">Set up kdesrc-build - Step 5/6.</pre>
| |
| | |
| All the dependencies needed for building all of the KDE Frameworks 5 (<code>kdesrc-build frameworks</code>) can be installed by running:
| |
| | |
| === Arch and Manjaro ===
| |
| <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
| |
| $ sudo pacman -Syu --needed phonon-qt5 qt5-script qt5-svg qt5-tools qt5-x11extras enchant jasper openexr libutempter docbook-xsl shared-mime-info giflib libxss upower udisks2 bzr git doxygen perl-json perl-libwww perl-xml-parser perl-io-socket-ssl akonadi xorg-server-devel libpwquality fontforge eigen libfakekey qca-qt5 xapian-core xsd gperf perl-yaml-syck intltool kdesdk qrencode libdmtx boost ruby-test-unit
| |
| </pre>
| |
| | |
| === KDE neon, Debian, Ubuntu, Kubuntu ===
| |
| | |
| <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
| |
| $ sudo apt build-dep polkit-qt-1 kwindowsystem kwallet-kf5 kirigami2 kjs kfilemetadata-kf5 kcalcore kdewebkit khtml modemmanager-qt dolphin plasma-desktop plasma-workspace kwin
| |
| </pre>
| |
| | |
| === Fedora===
| |
| | |
| ==== Fedora KDE Plasma Desktop Spin 37 ====
| |
| | |
| <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
| |
| $ sudo dnf builddep dolphin plasma-desktop plasma-workspace kwin kf5-kwallet kf5-kirigami2 kf5-kjs kf5-kcalendarcore kf5-kdewebkit
| |
| </pre>
| |
| | |
| === Gentoo ===
| |
| Make use of sets provided by KDE ebuild repository to ensure all frameworks packages are installed, thus pulling in all necessary dependencies.
| |
| <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
| |
| # emerge --ask --verbose @kde-frameworks
| |
| </pre>
| |
| Pay attention to the resulting list of packages to be installed and enable additional USE flags to ensure optional dependencies are installed as well.
| |
| | |
| === openSUSE Tumbleweed ===
| |
| This more complete list allows to compile everything that kdesrc-build's default setup (kf5-qt5-build-include) compiles. Note that it doesn't contain Qt or Qt-based libs, you need that on top, or to compile your own Qt (and then include custom-qt5-libs-build-include in kdesrc-buildrc).
| |
| | |
| <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
| |
| $ sudo zypper install aspell-devel atkmm-devel at-spi2-core-devel audiofile-devel autoconf binutils-devel bluez-devel boost-devel cdparanoia-devel cmake cmark-devel cups-devel cyrus-sasl-devel docbook2X docbook-xsl-stylesheets doxygen eigen3-devel enchant-devel libexiv2-devel farstream-devel fdupes ffmpeg-4-libavcodec-devel ffmpeg-4-libavformat-devel ffmpeg-devel fftw3-devel flac-devel flatpak-devel fuse3-devel fwupd-devel gdk-pixbuf-devel gettext-tools giflib-devel git glew-devel grantlee5-devel graphviz-devel gstreamer-devel gstreamermm-devel gstreamer-plugins-bad gstreamer-plugins-base-devel gstreamer-rtsp-server-devel gstreamer-transcoder-devel gstreamer-validate-devel gtk2-devel gtk3-devel hunspell-devel ibus-devel id3lib-devel intltool kColorPicker-devel kdsoap-devel kImageAnnotator-devel libaccounts-glib-devel libaccounts-qt5-devel libacl-devel libarchive-devel libassuan-devel libatasmart-devel libattr-devel libblkid-devel libbotan-devel libcanberra-devel libcap-devel libdiscid-devel libdmtx-devel libdwarf-devel libelf-devel libepoxy-devel libepub-devel libepubgen-devel libexiv2-devel libfakekey-devel libffmpegthumbnailer-devel libgbm-devel libgit2-devel libgpgme-devel libgphoto2-devel libgpgmepp-devel libgssglue-devel libgumbo-devel libical-devel libicecream-devel libicu-devel libidn-devel libimobiledevice-devel libiodbc-devel libjasper-devel libkdsoap2 libkolabxml-devel libksane-devel liblcms2-devel libMagick++-devel libmlt++-devel libmms-devel libmtp-devel libmusicbrainz-devel libmysqlclient-devel libmysqld-devel libnl3-devel liboauth-devel libopenssl-devel libopus-devel libotr-devel liboyranos-devel libpcap-devel libpgf-devel libpoppler-devel libpulse-devel libpwquality-devel libqalculate-devel libqgpgme-devel libQt5Charts5-devel libQt5Core-private-headers-devel libQt5PlatformSupport-private-headers-devel libQt5PrintSupport-private-headers-devel libqt5-qtcharts-imports libqt5-qtwayland-private-headers-devel libQt5QuickControls2-devel libraw-devel libsamplerate-devel libsensors4-devel libsignon-qt5-devel libsmbclient-devel libsndfile-devel libspeechd-devel libssh2-devel libssh-devel libudev-devel libusb-1_0-devel libusb-compat-devel libv4l-devel LibVNCServer-devel libvorbis-devel libwacom-devel libxapian-devel libXcm-devel libxkbcommon-devel libxslt-devel libXtst-devel libzeitgeist-devel llvm-clang-devel llvm-devel lmdb-devel make ModemManager-devel mpfr-devel mtdev-devel mozilla-nss-devel NetworkManager-devel openal-soft-devel openconnect-devel opencv-devel openjpeg2-devel openslp-devel PackageKit-devel PackageKit-Qt-devel pam-devel pango-devel parted-devel patterns-kde-devel_kde_frameworks patterns-kde-devel_qt5 pciutils-devel pcre-devel pipewire-devel plymouth-devel polkit-devel postgresql-devel python3 python3-devel python3-openpyxl python3-pycairo python3-python-dateutil qca-qt5-devel qrencode-devel qtkeychain-qt5-devel sane-backends-devel sassc speex-devel taglib tesseract-ocr-devel utempter-devel vlc-devel wayland-protocols-devel wayland-utils xcb-util-cursor-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel xf86-input-evdev-devel xf86-input-libinput-devel xf86-input-synaptics-devel xf86-input-wacom-devel xorg-x11-devel xorg-x11-server-sdk xorg-x11-util-devel xz-devel
| |
| </pre>
| |
| | |
| * OPEN ISSUES:
| |
| ** libeigen2-devel is no longer available on Tumbleweed via official repos, though it's only needed for kdelibs4support
| |
| | |
| == For Plasma ==
| |
| * Arch/Manjaro: <code>sudo pacman -Syu --needed plasma-desktop plasma-wayland-session plasma-workspace kwin</code>
| |
| * Fedora: <code>sudo dnf builddep plasma-desktop plasma-workspace kwin</code> or <code>sudo dnf install libpcap-devel libnl3-devel libsecret-devel; sudo dnf builddep bluedevil breeze-gtk kde-gtk-config kgamma kscreen kwin plasma-breeze plasma-desktop plasma-discover plasma-disks plasma-drkonqi plasma-firewall plasma-integration plasma-milou plasma-nm plasma-pa plasma-systemmonitor plasma-systemsettings plasma-thunderbolt plasma-vault plasma-wayland-protocols plasma-workspace plasma-workspace-geolocation plasma-workspace-wallpapers plymouth-kcm powerdevil sddm-kcm</code>
| |
| * Gentoo: <code>emerge --ask --verbose @kde-plasma</code>
| |
| * KDE neon/Debian/Ubuntu/Kubuntu: <code>sudo apt build-dep plasma-desktop plasma-workspace kwin appstream</code>
| |
| * openSUSE Leap & Tumbleweed: <code>sudo zypper si -d plasma5-desktop plasma5-workspace kwin5</code>
| |
| | |
| Any other dependencies can be figured out and installed as you continue building the modules one by one.
| |
| | |
| == Quick fixes for package manager errors ==
| |
| The above lists might not always be working out of the box on your specific distribution or might be out of date for individual packages. In many cases removing single packages from the lists above still allows you to build many KDE frameworks and applications.
| |
| | |
| In case it is a package added by a regex, you can exclude the specific package by a workaround using sed. Let us assume for an example that we want to install "libkf5.*-dev" on deb-based systems but have uninstallable packages libkf5example1-dev, libkf5example2-dev. Then we install all "libkf5.*-dev" packages excluding libkf5example1-dev and libkf5example2-dev through:
| |
| <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">$ sudo apt install $(apt-cache search -n "libkf5.*-dev" | sed 's/ - .*//' | sed '/libkf5example1-dev/d' | sed '/libkf5example2-dev/d')</pre>
| |