Short version: Using exactly the same recipe and environment you used to build kdesupport build the core KDE modules from Git in the following order:

Short version: Using exactly the same recipe and environment you used to build kdesupport build the core KDE modules from Git in the following order:

−

kdlibs

+

kdelibs

kdepimlibs

kdepimlibs

kde-runtime

kde-runtime

Revision as of 12:47, 6 March 2011

Warning

These pages are currently being completely re-written to reflect the new KDE infrastructure and may not be in a consistent state. Information and commands on some page may no longer be valid and should be used with care.

Introduction

This page provides an overview of the KDE build process.

Extra Information

The build process described in these pages is kept as simple and generic as possible, but it is generally assumed you are building KDE4 on Linux. Extra information about building KDE Software on specific distributions or platforms, or certain conditions can be found at the following links:

Build Steps

This section will briefly explain the concepts and steps involved in building software so you are not being asked to blindly follow some recipes you do not understand.

It is assumed you are at least familiar with the basics of using the command line.

Source

The Source step is obtaining a local copy of the source code that you want to build. There are 3 main ways of doing this:

Download a tarball snapshot of the code as at a given time or release. This is most commonly done if you do not want to develop the code itself but just want to use it for a stable system installation, testing a release, or developing applications outside of the KDE SC.

Clone a copy of the project repository from Git

Checkout a copy of the project repository from Subversion

For developing on the unstable branch of the KDE SC it is recommended you Clone or Checkout the required repositories.

Note that Checkout has a different meaning in Git than it does in Subversion.

Configure

Build

Install

Update

Example Build

The following example recipe shows the sequence of commands you would need to enter into the command line to build a typical KDE module:

Various options can be passed to CMake to control how a project gets built, but these are the most common:

The first line tells CMake where it can find the source code that is to be built.

The second line tells CMake what type of build is required, in this example a debugfull build that will include useful information for when we are debugging any the software.

The third line tells CMake we also want the unit tests to be built.

The fourth line tells CMake where to install the software.

Build

Update

Scripted Builds

The easiest way to build the KDE SC from scratch is to use one of the build scripts that are available. This approach is highly recommended for those new to building KDE SC as it takes care of the Source, Configure, Build, Install and Update steps for you. The builds remain compatible with the manual methods of building KDE SC so you can change later if you want.

Troubleshooting The Build

Compile and Linking errors are frequent sources of discouragement. Make careful note of the first occurrence of an error in your build process. It could be as simple as a bad environment variable, an unexpected version of a library or missing prerequisite. Please read the instructions carefully.

Please review your logs and do searches for fixes. If you cannot find a solution, try the Troubleshooting page. If you still cannot resolve the problem then please ask for help on IRC or a Mailing List.