KDevelop/HowToCompile v5

Jump to: navigation, search

See also: http://kfunk.org/2016/02/16/building-kdevelop-5-from-source-on-ubuntu-15-10/

NOTE: This page is about KDevelop 5, i.e. version that depends on Qt5 and KF5. For instructions on how to build KDevelop 4 against KDELibs4 and Qt4 head over to KDevelop/HowToCompile_v4.

The way to download, compile, install and run KDevelop depends on how you want to download it and where do you want to install it to. So follow the step by step instructions below.

WARNING: You have to remove all KDevelop packages provided by your distribution. If you don't do that, binary compatibility issues will eventually lead to crashes and undefined behavior. To make sure, you can search for KDevelop libraries with this command:

   find /usr/ -type f -name "*kdev*.so*"

If no results are returned, you should be on the safe side.

1. Building with kdesrc-build

The recommended way to install KDevelop 5 is using kdesrc-build. You can find more information on how to set it up here: https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source

Once done, building KDevelop and all its dependencies is as simple as running

   kdesrc-build --include-dependencies kdevelop

Note though that this will also install the KF5 frameworks. The initial compile step will thus take a bit of time, but subsequent updates using the same command above are usually much faster.

Building only the essential modules of KDevelop is as simple as running

   kdesrc-build kdevelop-pg-qt kdevelop

To install the essential dependencies, run this command: (the list is not yet complete)

1. deb-based distributions (Debian, Neon, Kubuntu...)

   sudo apt-get install libbz2-dev libxslt-dev libxml2-dev shared-mime-info oxygen-icon-theme libgif-dev libvlc-dev libvlccore-dev doxygen gperf bzr libxapian-dev fontforge libgcrypt20-dev libattr1-dev network-manager-dev libgtk-3-dev xsltproc xserver-xorg-dev xserver-xorg-input-synaptics-dev libpwquality-dev modemmanager-dev libxcb-keysyms1-dev libepoxy-dev libpolkit-agent-1-dev libnm-util-dev libnm-glib-dev libegl1-mesa-dev libxcb-xkb-dev libqt5x11extras5-dev libwww-perl libxml-parser-perl libjson-perl libboost-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libarchive-dev liblmdb-dev cmake git extra-cmake-modules "libkf5.*-dev" llvm libclang-dev

2. Arch Linux

   pacman -Sy --needed extra-cmake-modules clang llvm

3. openSUSE Tumbleweed

   zypper install libboost_headers-devel grantlee5-devel karchive-devel kcmutils-devel kconfig-devel kcrash-devel kdeclarative-devel kdevelop5-pg-qt kdoctools-devel kf5-filesystem kguiaddons-devel ki18n-devel kiconthemes-devel kio-devel kitemmodels-devel kitemviews-devel kjobwidgets-devel knewstuff-devel knotifications-devel knotifyconfig-devel kparts-devel krunner-devel kservice-devel ktexteditor-devel kwidgetsaddons-devel kwindowsystem-devel kxmlgui-devel libksysguard5-devel llvm-clang-devel pkgconfig plasma-framework-devel shared-mime-info threadweaver-devel libkomparediff2-kf5-devel purpose-devel libQt5Concurrent-devel libQt5Core-devel libQt5DBus-devel  libqt5-qttools-devel libqt5-qtdeclarative-devel libQt5Test-devel libqt5-qtwebengine-devel libQt5Widgets-devel subversion-devel okteta-devel

2. Get and install plugins (optional)

If you need extra functionality, you can get and install additional plugins for KDevelop using kdesrc-build. E.g. to install kdev-php and kdev-python, run

   kdesrc-build kdev-php kdev-python

3. Run KDevelop

Make sure your environment is setup correctly according to https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source#Set_up_the_runtime_environment. Most notably, ensure that you configured QT_PLUGIN_PATH properly, otherwise KDevelop won't work properly as it is heavily plugin based.

Once done, execute KDevelop, either by putting $KF5/bin into your PATH, or by running it directly:


4. Contact the development team, or report bugs or wishes

If you find any compile problems with KDevelop please report them on our developer mailing-list. If you find problems while using KDevelop, please report these issues to the bugzilla bug database which is only for bugs (not for compilation issues).

If you find bugs that cause program to crash and you are going to make bug report out of it, please re-compile the program with debug symbols. This is done with the option -DCMAKE_BUILD_TYPE=debug passed to CMake in configuration step. Also be sure to update KDevelop and any separate kdev-* plugin you might use to newest version, your bug might be already fixed.

5. Keeping it up-to-date with the latest fixes

Just rerun the kdesrc-build command above to update KDevelop and its dependencies.

You can also see here the latest changes in the KDevelop projects:

6. Manual compilation without kdesrc-build

This approach is useful if you just want to compile and use KDevelop5 on your day to day system. This works on a Debian system, and probably on Debian derived distributions such as Ubuntu or KDE NEON.

Follow instructions at "https://wiki.debian.org/BuildingTutorial" or similar to download & build the source packages of kdevelop + its dependencies, including running these commands:

   sudo apt-get source kdevelop
   sudo apt-get build-dep kdevelop

This page was last modified on 16 August 2017, at 22:11. Content is available under Creative Commons License SA 4.0 unless otherwise noted.