KDE TechBase
  • Page
  • Discussion
  • Edit
  • History
KDE TechBase is a Wiki - You can help! Please contribute! Questions?

Getting Started/Build/KDE4 Alpha 2

< Getting Started | Build
Building KDE 4.0 Alpha2 From Source
Tutorial Series   Getting Started
Prerequisites   None
What's Next   None
Further Reading   None

Contents

  • 1 Abstract
  • 2 Environment
    • 2.1 Required Software
      • 2.1.1 Distro Recipes
        • 2.1.1.1 Debian Etch
    • 2.2 Create a user account for KDE4 development
      • 2.2.1 Recipe
        • 2.2.1.1 Generic Recipe
        • 2.2.1.2 Distro Specific Recipes
          • 2.2.1.2.1 Debian 4.0 Recipe
      • 2.2.2 What's Happening
        • 2.2.2.1 Generic
        • 2.2.2.2 Distro Specific
          • 2.2.2.2.1 Debian 4.0
      • 2.2.3 Sign in as kde-devel
        • 2.2.3.1 Recipe
    • 2.3 Bash Settings
      • 2.3.1 Recipe
      • 2.3.2 What's Happening
    • 2.4 Source/File Structure
      • 2.4.1 Recipe
  • 3 Qt
    • 3.1 The Recipe
    • 3.2 What's Happening

[edit] Abstract

This tutorial shows one way to get KDE 4.0 Alpha2 running on a Linux/BSD system from the source files as released here. If you are interested in building on another system please visit the Build page.

[edit] Environment

This section will prepare your system for the build.

[edit] Required Software

TODO:

  • Confirm


The following must be installed to successfully complete this tutorial:

  • gcc and g++ from the gcc project, preferably version 4.1 or higher
  • pkg-config
  • development libraries and headers for X11, OpenGL (mesa-common-dev and libglu1-mesa-dev), libjpeg, libpng, libungif, libclucene, librdf, libxml2, libxslt and strigi
  • the shared-mime-info package, which is the freedesktop MIME standard KDE is using now
  • D-Bus >=1.0
  • CMake >=2.4.5

[edit] Distro Recipes

[edit] Debian Etch

TODO:

  • Create apt-get install list


sudo apt-get install


[edit] Create a user account for KDE4 development

Some people like to have a separate account for development (for instance, an old bug deleted files by mistake); the tutorial is written with this approach. An alternative approach can be found here.


Tip
noframe
If your system does not have the sudo command try:
su -c "command"
For example,
su -c "make install"


[edit] Recipe

As usual there are many ways to go about this. I have tried to include a generic recipe, but it has only been tested on one system. If the this recipe works for you please edit the list to include your distro, thanks.

[edit] Generic Recipe
sudo groupadd kde-devel
sudo useradd -s /bin/bash -g kde-devel -m -k /dev/null kde-devel
sudo passwd kde-devel

Known to work with (by Distro):

  • Debian 4.0 (Etch)
[edit] Distro Specific Recipes
[edit] Debian 4.0 Recipe
sudo useradd -s /bin/bash -m -k /dev/null kde-devel
sudo passwd kde-devel

[edit] What's Happening

[edit] Generic

We are creating a group for our kde-devel account (line 1), creating the user (line 2), and setting the user's password (line 3).


Tip
noframe
You can skip line 1 and edit line 2 replacing "-g kde-devel" with "-g yourgroup" where yourgroup is a group that already exists on your system, maybe your main account's group.


Line 2 Broken down:

  • -s /bin/bash makes bash the new user's default shell.
  • -g kde-devel adds our new user the kde-devel group.
  • -m creates a home directory for the new user.
  • -k /dev/null prevents possible copying of files from a skeleton directory.
  • kde-devel the new user's account name.
[edit] Distro Specific
[edit] Debian 4.0

We are creating a user and group with the name kde-devel, creating a empty home directory, and setting bash as our default shell (line 1). Then setting the new user's password (line 2).

[edit] Sign in as kde-devel

From this point forward you should be logged in as kde-devel.

[edit] Recipe

If you have KDE 3.5 I suggest logging in via your desktop manager, but for building the following should be sufficient (don't forget the dash, it ensures your environment is set up properly).

su - kde-devel


Warning
noframe
It is assumed you have followed one of the recipes to create the kde-devel account, you are logged in, and you have a bash shell.


[edit] Bash Settings

The approach used here is to use the system's default settings and to edit bash's setting as little as possible.

[edit] Recipe

cat > ~/.bash_profile << "EOF"
PATH=$HOME/kde-3.91.0/qt-copy/bin:$HOME/kde-3.91.0/bin:$PATH
EOF
source ~/.bash_profile

[edit] What's Happening

We are creating the .bash_profile file in our home directory and altering the order that our computer searches directories (line 1-3). And then telling our computer to reread bash's settings (i.e. we are making sure that the stuff we install gets run)(line 4).


Sanity Check
The output produced from
echo $PATH

begins with
/home/kde-devel/kde-3.91.0/qt-copy/bin:/home/kde-devel/kde-3.91.0/bin:


Do not continue until you have confirmed this. You may need to log out and log back in for $PATH to be updated.


[edit] Source/File Structure

We need a couple of directories in place and the source files.

[edit] Recipe

mkdir -p ~/kde-3.91.0/{src,bin}

and,
copy source files to ~/kde-3.91.0/src/


Note
noframe
KDE4 Specifics Begin Here.


[edit] Qt

TODO:

  • Recipe
    • Remove dependency on an edited .bashrc


Next we need to get the Qt4 that is in KDE's source repository. KDE is guaranteed to build against any Qt 4.3. Qt 4.2 and earlier are not supported and will not work. Qt 4.3 is still in beta version, so your distribution probably doesn't have packages for it. You should use the copy tarball included in the KDE 4 Alpha 1 release.

[edit] The Recipe

cs
tar jxf qt-copy-20070423.tar.bz2
mv qt-copy-20070423 qt-copy
cd qt-copy
./configure -qt-gif -no-exceptions -debug -fast \
 -prefix $QTDIR -qdbus -pch -nomake examples \
 -nomake demos
make sub-src sub-tools
make install

[edit] What's Happening

We switch to the user's $HOME/kde/src directory (line 1) and unpack the tarball (line 2). We then move/rename the unpacked tarball's contents to qt-copy (line 3) and change into the resulting directory (line 4).

We set up the build using the configure script (line 5-7). The various command line options used are explained in the qt-copy/README.qt-copy file. Finally, we build the minimal requirements for KDE (line 8) and install (line 9). If you want all the example and demo applications, you can either build them individually or simply do a make from the qt-copy directory.

Note that the installation does not require root as it installs Qt locally into $QTDIR.

Retrieved from "http://techbase.kde.org/Getting_Started/Build/KDE4_Alpha_2"

Category: Tutorial

Navigation

  • Home
  • Help
  • Recent changes

Sections

  • Getting started
  • Development
  • Schedules
  • Policies
  • Contribute
  • Projects

Toolbox

  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link

Personal tools

  • Log in / create account
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. Qt® and Trolltech® are registered trademarks of Trolltech ASA. Linux® is a registered Trademark of Linus Torvalds. | Legal