<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/api.php?action=feedcontributions&amp;user=Kunalthakar&amp;feedformat=atom</id>
		<title>KDE TechBase - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/api.php?action=feedcontributions&amp;user=Kunalthakar&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Special:Contributions/Kunalthakar"/>
		<updated>2013-05-24T00:56:02Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/User_talk:Dhaumann</id>
		<title>User talk:Dhaumann</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User_talk:Dhaumann"/>
				<updated>2007-11-07T18:51:49Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Its fine to delete the kdesvn-build page. I will merge my content into the existing page. Also, I will also modify the link from the Getting Started page to point to the existing kdesvn-build page.&lt;br /&gt;
[[User:Kunalthakar|Kunalthakar]] 19:51, 7 November 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Thanks ==&lt;br /&gt;
Thanks for the information.. If I got more questions, can I ask you then?&lt;br /&gt;
: Of course -- [[User:Dhaumann|Dhaumann]]&lt;br /&gt;
&lt;br /&gt;
== Movinh Content ==&lt;br /&gt;
Hi, Thanks for movinh Qualig?ty team to a another place.. I did ngot know where to  place it.. I'm going to move more from quality.kde.org, should I move it to the same folder or what?&lt;br /&gt;
&lt;br /&gt;
== Title Translation ==&lt;br /&gt;
&lt;br /&gt;
Hi guy !!!&lt;br /&gt;
I would like to know if menu bar translation is possible... If true, how could I do this?&lt;br /&gt;
Thank you...&lt;br /&gt;
&lt;br /&gt;
:You can use the template &amp;lt;nowiki&amp;gt;{{DISPLAYTITLE:foo}}&amp;lt;/nowiki&amp;gt;, where 'foo' is the translation. However, the display title reflects the wiki link, that's why a text &amp;quot;link to this page as &amp;lt;nowiki&amp;gt;[[...]]&amp;lt;/nowiki&amp;gt;&amp;quot; will appear then. --[[User:Dhaumann|Dhaumann]] 15:40, 18 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
::Actually not, I have hidden that text with display:none for on-screen printing. One bug though: When using DISPLAYTITLE, the &amp;lt;title&amp;gt; tag is not filled for some reason... --[[User:Danimo|Danimo]] 16:33, 18 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:::Damn... If you need help with this, you can ask me as you want for help... ;) --[[User:Fatalerrors|Fatalerrors]] 10:52, 20 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Hi, Dhaumann, can you read and write Chinese? Cool! --[[User:Liangqi|Liangqi]] 23:00, 18 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
: Unfortunately no. I can't read nor write it. But I still try my best to fix links in a language where I mostly see squares :-) --[[User:Dhaumann|Dhaumann]] 23:22, 18 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:: I see, I had found it in the diff. Thanks. I had mentioned this link problem in our mailing list. --[[User:Liangqi|Liangqi]] 11:36, 20 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Thanks ==&lt;br /&gt;
&lt;br /&gt;
Hi, Dhaumann, thanks for links fixes.&lt;br /&gt;
I had fixed the link you were talking about.&lt;br /&gt;
Thanks a lot.&lt;br /&gt;
--[[User:Powerfox|Powerfox]] 19:15, 31 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Trank you ==&lt;br /&gt;
&lt;br /&gt;
Thank you a lot for fixing the links of galician tech base ;).&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/kdesvn-build</id>
		<title>Getting Started/Build/KDE4/kdesvn-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/kdesvn-build"/>
				<updated>2007-11-07T18:27:11Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: Structural changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is a simple and automatic way for building KDE4 using the kdesvn-build script. Download the latest release of the kdesvn-build script from http://kdesvn-build.kde.org/. Your distribution might have a package with kdesvn-build script but most probably that will be dated. So download the latest release from the website. As mentioned in the [[../|Getting Started]] page, install all the required packages for your distribution. Also, create a new user kde-devel as explained [[../|here]]. &lt;br /&gt;
Log into your new user and untar the kdesvn-build tarball to your home folder. Now, use the sample buildrc file to create your buildrc file.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cp kdesvn-build/kdesvn-buildrc-sample ~/.kdesvn-buildrc&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Modify the .kdesvn-buildrc file for selecting which modules to compile and which to leave out.&lt;br /&gt;
Add kdesvn-build/ folder to your path by adding this line to your .bashrc&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
export PATH=~/kdesvn-build/:$PATH&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now, all that remains to do is run the script!&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
kdesvn-build&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4</id>
		<title>Getting Started/Build/KDE4</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4"/>
				<updated>2007-11-07T18:11:12Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: Linking to kdesvn-build wiki instead of external site&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/KDE4}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Getting Started|&lt;br /&gt;
&lt;br /&gt;
name=Building KDE4 From Source|&lt;br /&gt;
&lt;br /&gt;
pre=[[../../Sources/Anonymous_SVN|Anonymous SVN Quickstart Guide]]|&lt;br /&gt;
&lt;br /&gt;
next=[[../../Set_up_KDE_4_for_development|Set up KDE 4 for development]]|&lt;br /&gt;
&lt;br /&gt;
reading=[[../KDE4/kdesvn-build|kdesvn-build: The KDE From Subversion Build Tool]]&amp;lt;br&amp;gt;[[../../Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&amp;lt;br&amp;gt;[[Development/Tutorials/CMake |Introduction to CMake]]&amp;lt;br&amp;gt;[[../KDE4/FreeBSD|FreeBSD notes]]&amp;lt;br&amp;gt;[[../KDE4/Mac OS X|Instructions for Mac OS X]]&amp;lt;br&amp;gt;[[../KDE4/Windows|Instructions for MS Windows]]|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This tutorial shows one way to get KDE from trunk running on Linux/BSD systems. There are also tutorials for [[/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[/Mac OS X|Mac OS X]] and [http://solaris.kde.org/ Solaris]. Throughout the tutorial the bash shell is used.&lt;br /&gt;
&lt;br /&gt;
{{warning|Expect a higher risk of build failure '''on Mondays''' when most kdelibs changes are committed. [http://developer.kde.org/~dirk/dashboard/ Dashboard] reports unexpected breakages. You are encouraged to fix failing modules.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The following must be installed first before you can successfully complete this tutorial:&lt;br /&gt;
* gcc and g++, preferably version 4.2 or higher&lt;br /&gt;
* svn, the subversion revision control client&lt;br /&gt;
* pkg-config&lt;br /&gt;
* development libraries and headers for X11, OpenGL (mesa-common-dev and libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 and libxslt&lt;br /&gt;
* the &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, which is part of kdesdk. You can install it as part of kdesdk (kdesdk-scripts on Debian) or similar package, or just download it itself from [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* the [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], which is the freedesktop MIME standard KDE is using now&lt;br /&gt;
* [http://boost.org/ boost], needed by kdebase; after compiling and/or installing boost, in order to make cmake aware about its location (FindBoost),  add boost directory (the one containing include subdirectory) to CMAKE_INCLUDE_PATH or set an environment variable called BOOST_ROOT pointing to boost directory.&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
In Ark Linux, the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy devel-core libxml-devel libxslt-devel bzip2-devel \&lt;br /&gt;
clucene-core-devel librdf-devel shared-mime-info xorg-Mesa-libGL-devel \&lt;br /&gt;
subversion boost-devel doxygen giflib-devel dbus-devel openssl-devel \&lt;br /&gt;
alsa-lib-devel kdesdk-scripts qt4-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mission Control.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus and Qt - you can skip steps 5, 6 and 7.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Some of the required packages for building KDE4 on Fedora 7 or higher:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
yum install clucene-core-devel libxml-devel libxslt-devel \&lt;br /&gt;
dbus-devel boost-devel bzip2-devel openssl-devel alsa-lib-devel \&lt;br /&gt;
redland-devel rasqal-devel raptor-devel hspell-devel aspell-devel \&lt;br /&gt;
cups-devel xine-lib-devel avahi-devel gamin-devel OpenEXR-devel \&lt;br /&gt;
enchant-devel jasper-devel ilmbase-devel pcre-devel gpgme-devel \&lt;br /&gt;
libxklavier-devel glib-devel libusb-devel libsmbclient-devel \&lt;br /&gt;
libxcb-devel NetworkManager-devel lm_sensors-devel libraw1394-devel \&lt;br /&gt;
bluez-libs-devel &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - It may be simpler to spin RPMs. Note that you can edit the variables in /etc/rpm/macros.kde4 (which is provided by Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
The build stage then looks like:&lt;br /&gt;
&lt;br /&gt;
%build&lt;br /&gt;
&lt;br /&gt;
mkdir -p %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
pushd %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
%{cmake_kde4} ..&lt;br /&gt;
&lt;br /&gt;
popd&lt;br /&gt;
&lt;br /&gt;
make %{?_smp_mflags} -C %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
I have had better results with creating a kdesupport rpm which means that you should not install the soprano and strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu and Debian ===&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.04 (Feisty) and Debian (Testing/Unstable) the build dependencies you need are installed with:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential cdbs debhelper cmake \&lt;br /&gt;
libxml2-dev libxslt1-dev libbz2-dev libclucene-dev librdf-dev \&lt;br /&gt;
shared-mime-info libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \&lt;br /&gt;
libxext-dev libjpeg-dev libpng-dev subversion libsm-dev libxinerama-dev \&lt;br /&gt;
libxrender-dev libfontconfig-dev libboost-dev libxcursor-dev doxygen \&lt;br /&gt;
libungif4-dev libdbus-1-dev libssl-dev libgpgme11-dev \&lt;br /&gt;
libasound2-dev kdesdk-scripts libpth-dev libjasper-dev \&lt;br /&gt;
ssh libxine-dev libqimageblitz-dev libqimageblitz4 libglib2.0-dev \&lt;br /&gt;
libxkbfile-dev libenchant-dev libbluetooth-dev network-manager-dev \&lt;br /&gt;
libsmbclient-dev libxcb1-dev libcaptury-dev libxcomposite-dev \&lt;br /&gt;
libxdamage-dev libusb-dev libgpgme11-dev libldap2-dev &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.10 (Gutsy) and Debian unstable you have to add:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install dbus-x11  libqt4-dev libqca2-dev libeigen-dev \&lt;br /&gt;
libstreamanalyzer-dev libsoprano-dev libstrigiqtdbusclient-dev \ &lt;br /&gt;
libxklavier11-dev libxml2-utils libdbus-1-dev libxslt1-dev cmake libbz2-dev \&lt;br /&gt;
libungif4-dev libgpgme11-dev libboost-dev libxine-dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided in these packages. Skip down to the [[#kdelibs|kdelibs section]] and continue from there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a fully functional API documentation framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
In openSUSE 10.2 and newer, you can install packages using [http://en.opensuse.org/Zypper Zypper]:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
sudo zypper install &amp;lt;package-name&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In older releases of SUSE, you can use YaST:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
yast -i &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Required Packages'''&lt;br /&gt;
&lt;br /&gt;
The packages you will need to install are:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
xorg-x11-devel&lt;br /&gt;
libxml2-devel &lt;br /&gt;
kdesdk3 &lt;br /&gt;
clucene-core-devel &lt;br /&gt;
boost-devel&lt;br /&gt;
libjpeg-devel &lt;br /&gt;
liblrdf-devel &lt;br /&gt;
libpng-devel &lt;br /&gt;
libxslt-devel &lt;br /&gt;
libredland-devel&lt;br /&gt;
Mesa-devel &lt;br /&gt;
giflib-devel &lt;br /&gt;
subversion &lt;br /&gt;
gcc &lt;br /&gt;
gcc-c++&lt;br /&gt;
gmp-devel (needed to build kdesupport)&lt;br /&gt;
gpgme-devel (needed to build kdepimlibs)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Optional Packages'''&lt;br /&gt;
&lt;br /&gt;
You can skip the manual and painful installation kdesupport and its dependencies ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano and other Nepomuk dependencies) by adding the KDE:KDE4 repository from&lt;br /&gt;
the [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] to your installation sources. &lt;br /&gt;
&lt;br /&gt;
For openSUSE 10.2 and newer do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo zypper service-add http://software.opensuse.org/download/KDE:/KDE4/openSUSE_10.2 KDE4-102&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For older versions of SUSE Linux do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
installation_sources -a http://software.opensuse.org/download/KDE:/KDE4/[YOUR SUSE LINUX VERSION]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now install the following packages:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cmake&lt;br /&gt;
dbus-1-devel&lt;br /&gt;
libqt4-devel&lt;br /&gt;
libqca2-devel&lt;br /&gt;
libsoprano-devel&lt;br /&gt;
libqimageblitz-devel&lt;br /&gt;
strigi&lt;br /&gt;
strigi-ui&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot more packages that are needed to satisfy the config-check, such as libusb-devel, bison etc., so look out for the config notifications and install accordingly. Please remember to skip any instructions that refer to kdesupport below. Start to compile with kdelibs. &lt;br /&gt;
&lt;br /&gt;
And for fully functional apidox framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CMake binary packages for openSUSE are available from the KDE:KDE4 repository as well as from the [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Install by hand ====&lt;br /&gt;
&lt;br /&gt;
You can use stable ebuilds just remember to sync your portage before you begin.&lt;br /&gt;
&lt;br /&gt;
Remember: All commands are executed as root.&lt;br /&gt;
&lt;br /&gt;
Required:&lt;br /&gt;
&lt;br /&gt;
We need to allow the following keyword masked ebuilds.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-util/cmake' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
echo 'dev-cpp/clucene' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the berkdb USE flag for redland, otherwise nepomuk won't work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-libs/redland berkdb' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the packages you will need to emerge, I included the update option into the emerge command so you will not re-emerge anything that you might already have installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -avu 'sys-devel/gcc' \&lt;br /&gt;
  'dev-util/subversion' \&lt;br /&gt;
  'dev-util/pkgconfig'  \&lt;br /&gt;
  'x11-base/xorg-x11' \&lt;br /&gt;
  'virtual/glut' \&lt;br /&gt;
  'media-libs/mesa' \&lt;br /&gt;
  'media-libs/jpeg' \&lt;br /&gt;
  'media-libs/libpng' \&lt;br /&gt;
  'media-libs/giflib' \&lt;br /&gt;
  'dev-cpp/clucene' \&lt;br /&gt;
  'dev-util/cppunit' \&lt;br /&gt;
  'media-libs/liblrdf' \&lt;br /&gt;
  'dev-libs/libxml2' \&lt;br /&gt;
  'dev-libs/libxslt' \&lt;br /&gt;
  'x11-misc/shared-mime-info' \&lt;br /&gt;
  'dev-libs/boost' \&lt;br /&gt;
  'dev-util/cmake' \&lt;br /&gt;
  'dev-libs/redland' \&lt;br /&gt;
  'sys-apps/dbus' \&lt;br /&gt;
  'sys-apps/hal' \&lt;br /&gt;
  'x11-libs/qt'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You will also need to emerge either 'kde-base/kdesdk' or kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
If you emerged DBUS, CMAKE, QT or HAL you may skip those sections respectively.&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
==== Install via portage ====&lt;br /&gt;
&lt;br /&gt;
Also you can install the KDE 4 packages directly via &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -a &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the things you need, [http://gentoo-wiki.com/TIP_Overlays#Layman install layman] and then pull in the &amp;quot;kde&amp;quot; overlay (which contains experimental KDE ebuilds): &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
layman -a kde&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
After this you need to adjust some USE-flags for KDE 4 and tell portage to use the testing KDE 4 ebuilds instead of the stable KDE 3 ones. &lt;br /&gt;
&lt;br /&gt;
That way portage will do the dependency tracking for you. &lt;br /&gt;
&lt;br /&gt;
Detailed instructions on building KDE 4 in Gentoo via portage can be found in the [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. They are discussed in the thread [http://forums.gentoo.org/viewtopic-t-530111-postdays-0-postorder-asc-start-0.html KDE 4 monolithic ebuilds].&lt;br /&gt;
&lt;br /&gt;
=== Mandriva ===&lt;br /&gt;
In Mandriva the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
urpmi gcc-c++ cmake libxml2-devel libbzip2_1-devel \&lt;br /&gt;
libclucene0-devel liblrdf2-devel libmesagl1-devel \&lt;br /&gt;
subversion doxygen libdbus-1_3-devel libopenssl0.9.8-devel \&lt;br /&gt;
libalsa2-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're running 64-bit environment you should replace all packages starting with &amp;quot;lib...&amp;quot; to &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus - you can skip steps 5 and 6.&lt;br /&gt;
&lt;br /&gt;
== Create a user account for KDE4 development ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Some people like to have a separate user account for KDE 4 (for instance an old bug deleted files by mistake), and the instructions below were written with that approach.&lt;br /&gt;
&lt;br /&gt;
However it is much more efficient to do everything with a single user account, see [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&lt;br /&gt;
for more details. &lt;br /&gt;
&lt;br /&gt;
You can still follow the instructions below, but don't put the environment variables in your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, put them in a separate file that you source to switch to the KDE 4 environment.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Command Line ===&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
useradd -m kde-devel&lt;br /&gt;
passwd kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Using KControl ===&lt;br /&gt;
&lt;br /&gt;
Instead of using the commands above, you can also use the User module in the KDE Control Center if you already have KDE3 installed.&lt;br /&gt;
&lt;br /&gt;
=== Setting up the environment ===&lt;br /&gt;
&lt;br /&gt;
Copy the {{path|~/.bashrc}} from your normal user account to the new kde-devel account. Next, copy and paste the contents of the [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|example .bashrc]] into {{path|~kde-devel/.bashrc}}. Be sure to comment out the line &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; if you do not have the &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt; command available. You will probably also want to modify the path to make sure it doesn't include your kde3 paths. Also if you want to use KDevelop to develop KDE 4 applications you may pass the ''-GKDevelop3'' flag to the ''cmake'' command (to make CMake generate KDevelop project files, it will help to avoid rebuilding in the future, see [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|this]]).  &lt;br /&gt;
To make it run, you have to open a new bash or to execute &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will provide access to commands such as &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; that are used in this tutorial as well as ensure that the proper paths are in place for Qt, KDE and CMake binaries.&lt;br /&gt;
&lt;br /&gt;
For more information, please read the [[Getting Started/Increased Productivity in KDE4 with Scripts]] tutorial.&lt;br /&gt;
&lt;br /&gt;
=== Switching to the New User ===&lt;br /&gt;
Switch to the user kde-devel: (don't forget the dash)&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
ssh -X kde-devel@localhost&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If the ssh command fails, check out the [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] section of the [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== The development user's shell ==&lt;br /&gt;
&lt;br /&gt;
On some systems a new user is configured by default to use {{path|/bin/sh}}. If this is not the case on your system, you can skip this section. Using {{path|/bin/sh}} can be very inconvenient to work with and you may want to change it to {{path|/bin/bash}} or another shell.&lt;br /&gt;
On Ark Linux and Fedora, you can skip this step - {{path|/bin/sh}} is {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Option 1: As the kde-devel user ===&lt;br /&gt;
&lt;br /&gt;
If you don't have root privileges and your system supports the changing of your own shell with the &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt; application, then you could try to change your shell to {{path|/bin/bash}} by using:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
chsh -s /bin/bash kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: As the root user ===&lt;br /&gt;
&lt;br /&gt;
If your system comes with the &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; application you can run the following command as root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Another option is to use the &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; application as root to safely edit your {{path|/etc/passwd}}. Locate 'kde-devel' in the the file. Change '{{path|/bin/sh}}' at the end of the line to read '{{path|/bin/bash}}', save your changes and exit.&lt;br /&gt;
&lt;br /&gt;
The new shell will be started automatically when you log in as the kde-devel user again.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
QtDBus and KDE are known to work with D-Bus versions 0.62, as well as 0.92 and upwards. Versions 0.60 and 0.61 may work too but are not tested. Versions 0.90 and 0.91 are known not to work. We recommend using post-1.0 release versions (at least 0.94), so consider upgrading if you haven't done so.&lt;br /&gt;
&lt;br /&gt;
You may skip this section if you have a recent D-Bus version or if you don't want to upgrade. You probably want to skip building the bindings until/unless you know you will be building HAL (see below).&lt;br /&gt;
&lt;br /&gt;
Before running these steps in the recipe, make sure your X11 headers and libraries are available. The configure script run on line 5 of the following instructions should output:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Make sure you did set up your environment correctly as described [[Getting_Started/Build/KDE4#Setting_up_the_environment|above]]. This is necessary for the &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; functions to work.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]] &lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz&lt;br /&gt;
 tar -xvzf dbus-1.0.2.tar.gz&lt;br /&gt;
 cd dbus-1.0.2/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR --localstatedir=/var&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo dbus-uuidgen --ensure&lt;br /&gt;
&lt;br /&gt;
 cs # see above&lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.74.tar.gz&lt;br /&gt;
 tar -xvzf dbus-glib-0.74.tar.gz&lt;br /&gt;
 cd dbus-glib-0.74/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 cb&lt;br /&gt;
 sudo chown -R kde-devel:kde-devel *&lt;br /&gt;
&lt;br /&gt;
=== What's Happening === &lt;br /&gt;
After changing into the source directory (line 1), D-Bus source code is downloaded from freedesktop.org (line 2) and unpacked (line 3). After going into the newly created D-Bus directory (line 4), the build is set up using the supplied {{path|configure}} script (line 5). After building (line 6) and installing (line 7) D-Bus, we use the &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; tool to install a machine identification file that allows the bus to start automatically when the desktop session starts (line 8).&lt;br /&gt;
&lt;br /&gt;
Note that you need write access to {{path|/var}} for the last two steps. If your system does not have the sudo command, you can use the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; command instead, e.g. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The steps for building the glib bindings are similar to the above.&lt;br /&gt;
&lt;br /&gt;
When these two packages are done building, we must fix the file ownership because 'sudo make install' has created root owned files and directories in ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Skip this if you have [http://cmake.org/ CMake] &amp;gt;=2.4.5 installed. &lt;br /&gt;
You should be able to directly use the binary packages available on the [http://www.cmake.org/HTML/Download.html CMake site]. There are also distribution specific packages available.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click Here to learn more]] &lt;br /&gt;
 wget http://www.cmake.org/files/v2.4/cmake-2.4.6.tar.gz&lt;br /&gt;
 tar -zxf cmake-2.4.6.tar.gz&lt;br /&gt;
 mkdir cmake-build&lt;br /&gt;
 cd cmake-build &lt;br /&gt;
 ../cmake-2.4.6/bootstrap&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
First, we go back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's source directory (line 1), get the CMake sources (line 2) and unpack them (line 3). We create a directory to build CMake in (line 4) and go into it (line 5). We then run the CMake bootstrap script to set up the CMake build (line 6), then make (line 7) and install it (line 8) using the root user.&lt;br /&gt;
&lt;br /&gt;
If your system does not have the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; command, you can instead do &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Qt ==&lt;br /&gt;
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. You should use the copy in the KDE Subversion servers. (note: some distros, like Debian or openSUSE, tend to supply Qt with patches from KDE svn applied, so you may want to cheat and use precompiled Qt from your distro, because they will work just as well). KDE tries to guarantee that the source is compileable with a plain, unpatched Qt 4.3.0, but you might get additional bugfixes by using qt-copy (however, usually your distribution takes care of backporting necessary bugfixes so overall you're most likely better off with sticking to the distro provided one if it is recent enough). Refer to the distribution specific sections above for more information. &lt;br /&gt;
&lt;br /&gt;
As for now Qt3 compatibility layer in Qt 4 is mandatory, so please &amp;lt;b&amp;gt;avoid&amp;lt;/b&amp;gt; using &amp;quot;-no-qt3support&amp;quot; option when building Qt4 from sources.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd # Note: qt-copy lives in $HOME/qt-copy. See $QTDIR in [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|&amp;lt;font color=red&amp;gt;.bashrc&amp;lt;/font&amp;gt;]] &lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/qt-copy&lt;br /&gt;
 cd qt-copy&lt;br /&gt;
 ./apply_patches&lt;br /&gt;
 ./configure -qt-gif -no-exceptions -debug -fast \&lt;br /&gt;
  -prefix $QTDIR -nomake examples -nomake demos&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
 # if we don't install, we'll just clear obj files to&lt;br /&gt;
 # save disk space&lt;br /&gt;
 if [ $QTDIR = `pwd` ]; then \&lt;br /&gt;
 find . -name '*.o' -delete ; \&lt;br /&gt;
 else make install; fi;&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We switch back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's home directory (line 1) and download the source code using subversion (svn) from KDE's repository (line 2). After changing into the resulting {{path|qt-copy}} directory (line 3), we run a script that manages the patches that come with &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (line 4). &lt;br /&gt;
&lt;br /&gt;
Once the patches have been applied, we then set up the build using the &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script (line 5-6). The various command line options used are explained in the {{path|qt-copy/README.qt-copy}} file. Finally, we build the minimal requirements for KDE (line 7) and install (line 10) Qt. If install dir is the same as the current dir (line 8), then we just free some space (line 9) instead. If you want all the example and demo applications, you can either build them individually or simply do a &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; from the {{path|qt-copy}} directory. &lt;br /&gt;
&lt;br /&gt;
Note that the installation does not require root as it installs Qt locally into {{path|$QTDIR}}. Anyway, installation is only needed if {{path|$QTDIR}} differs from {{path|$HOME/qt-copy}}, which is not the case if you have exactly followed the instructions.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &amp;quot;error: X11/Xlib.h: No such file or directory&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;xorg&amp;lt;/tt&amp;gt; (the actual name may vary between operating systems, for example it is &amp;lt;tt&amp;gt;xorg-dev&amp;lt;/tt&amp;gt; on Ubuntu based systems such as Kubuntu). &lt;br /&gt;
&lt;br /&gt;
If you get an error in the configure step about missing defines, check the value of &amp;lt;tt&amp;gt;$QMAKESPEC&amp;lt;/tt&amp;gt;.  Some distributions set this to point directly to the system-installed Qt.  If &amp;lt;tt&amp;gt;unset QMAKESPEC&amp;lt;/tt&amp;gt; solves the problem, you probably want to add it to the &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
If you get an error &amp;quot;.pch/debug-shared/QtCore&amp;quot;, this is because Qt-4.3 enables precompiled headers if your gcc supports it, but for some reason it doesn't work for you. If you use distcc, configure qt with -no-pch. If you use icecream, update to the latest icecream from svn trunk.&lt;br /&gt;
&lt;br /&gt;
Try running any Qt program, like {{program|assistant}}. '''Note:''' You may need to run &amp;lt;tt&amp;gt;xhost +local:kde-devel&amp;lt;/tt&amp;gt; as your regular kde3 user to run this application.  If it crashes in QSpanData::adjustSpanMethods, then your problem is the oxygen style. Try removing {{path|lib/kde4/plugins/styles/kstyle-oxygen.so}} and {{path|lib/kde4/plugins/styles/oxygen.so}} if they exist in the KDE install prefix.&lt;br /&gt;
&lt;br /&gt;
== HAL ==&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use qdbusviewer to see if you have org.freedesktop.hal. If not, you might need a newer version of hal. If you have org.freedesktop.hal, you probably don't need to, and don't ''want'' to, roll your own HAL.}}&lt;br /&gt;
&lt;br /&gt;
If your system requires you to build a newer version of HAL, there's a decent chance you'll need to build other stuff as well, some of which may not be straight forward. Since this should only be required for older distros, instructions are on [[Getting_Started/Build/HAL| a separate page]].&lt;br /&gt;
&lt;br /&gt;
== kdesupport ==&lt;br /&gt;
&lt;br /&gt;
{{warning|Don't forget to read the [[Getting_Started/Build/KDE4#Setting_up_the_environment|Setting Up The Environment]] section first.}}&lt;br /&gt;
&lt;br /&gt;
There are several libraries that KDE applications rely on in the kdesupport module. This includes Strigi and Soprano for file metadata and search, QImageBlitz for image manipulation needed in kdebase, eigen for visual effects in applications such as Kalzium, taglib for music players and qca for some cryptographic needs. &lt;br /&gt;
&lt;br /&gt;
Strigi itself has a few dependencies as well: you will need the libraries and headers for libz, libbz2, openssl (libcrypto or libssl), libclucene (&amp;gt;=0.9.16a but watch out: version 0.9.17 does '''not''' work), and either libxml2 or libexpat.&lt;br /&gt;
&lt;br /&gt;
Please remember that if you use openSUSE, you can install the needed packages from the KDE:KDE4 buildservice repository and do not have to bother with fiddling the details below. Skip to the kdelibs section. &lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/&lt;br /&gt;
 cd kdesupport&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1). We download the sources in kdesupport using subversion (line 2), go into the new {{path|~/kde/src/kdesupport}} directory (line 3), and commence the build (line 4). This will leave us in the kdesupport build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &lt;br /&gt;
   cmakekde: command not found&lt;br /&gt;
then you have to go manualy into the kdesupport directory in ~ and execute the command cmakekde. if this still doesnt work, then something is wrong with your bashrc.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: This project requires some variables to be set,&lt;br /&gt;
 and cmake can not find them.&lt;br /&gt;
 Please set the following variables:&lt;br /&gt;
 LIBXML2_INCLUDE_DIR (ADVANCED)&lt;br /&gt;
you should install the development package for libxml2.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: Could NOT find REDLAND&lt;br /&gt;
then you need librdf from the Redland.&lt;br /&gt;
If your distribution does not provide the librdf package, you can download the source there: [http://download.librdf.org/source/ http://download.librdf.org/source/] and build it.&lt;br /&gt;
(Gentoo users: The ebuild for librdf is named dev-libs/redland)&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 Fetching external item into 'kdesupport/admin'&lt;br /&gt;
 Error validating server certificate for 'https://...'&lt;br /&gt;
see [http://techbase.kde.org/Getting_Started/Sources/Using_Subversion_with_KDE Using Subversion with KDE]&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 FILE cannot create directory: /usr/lib[64]/qt4/plugins/crypto. Maybe need administrative privileges.&lt;br /&gt;
 &lt;br /&gt;
 make: *** [install] Error 255&lt;br /&gt;
take a second look in the .bashrc file described above, are paths correct?  Alternatively, you may see this error if you decided to use a distribution installed version of qt4 and skipped the Qt install above.  Either install qt-copy as describe above, or &amp;quot;sudo make install&amp;quot;. If you use &amp;quot;sudo make install&amp;quot;, make sure you that you change the ownership back to your user for some of the ~/kde subdirectories that were effected by using sudo (ie. &amp;quot;&amp;lt;tt&amp;gt;sudo chown -R kde-devel:kde-devel ~/kde&amp;lt;/tt&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you get a message related to &lt;br /&gt;
   target libQtTest.so not found&lt;br /&gt;
you may need to recompile qt-copy. This time you should take out&lt;br /&gt;
   -nomake demos -nomake examples&lt;br /&gt;
from the configure command, so that Qt generates library QtTest.&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
&lt;br /&gt;
We can now move on to building KDE's base libraries.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd   &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 mkdir KDE &amp;amp;&amp;amp; cd KDE&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs&lt;br /&gt;
 cd kdelibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1) then make and go into the KDE directory (line 2). We download the sources for kdelibs using subversion (line 3), go into the new {{path|~/kde/src/KDE/kdelibs}} directory (line 4), and commence the build (line 5). This will leave us in the &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
{{tip|There might be missing dependencies on your system! They are easily overlooked in the output of &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You might want to do a &amp;lt;tt&amp;gt;cmake $KDE_SRC/KDE/MODULE_NAME&amp;lt;/tt&amp;gt; prior to compiling any kde modules (like kdelibs, kdepimlibs etc.)}}&lt;br /&gt;
&lt;br /&gt;
=== Additional KDE-specific CMake modules ===&lt;br /&gt;
There are additional CMake modules in {{path|kdelibs/cmake/modules/}} that are necessary for building KDE4 applications. These will be installed for you when  kdelibs itself is installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have problems compiling kdelibs, first make sure the software in the [[Getting_Started/Build/KDE4#Required_Software|Required Software]] section above is installed and works. Other possible hints include:&lt;br /&gt;
* If the &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; command fails stating that CMake requires an out of source build directory, remove {{path|~/kde/src/KDE/kdelibs/CMakeCache.txt}}, and try again.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; still gives the same error then try this &lt;br /&gt;
 cd&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR \&lt;br /&gt;
 -DCMAKE_BUILD_TYPE=debugfull \&lt;br /&gt;
 -DKDE4_BUILD_TESTS=ON \&lt;br /&gt;
 ~/kde/src/KDE/kdelibs&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
* If you received an error stating &amp;quot;Please create a separate build directory and run 'cmake path_to_kdelibs [options]' there.&amp;quot;, then you need to change to your build directory before running cmakekde. (e.g &amp;lt;tt&amp;gt;cs KDE/kdelibs &amp;amp;&amp;amp; cb &amp;amp;&amp;amp; cmakekde&amp;lt;/tt&amp;gt;) If the message stays, run 'svn status' in the kdelibs directory and remove all files labeled with '?'.&lt;br /&gt;
* If Qt wasn't found or the wrong version of Qt was found, make sure that the qmake from the Qt you need is the first qmake in the path.&lt;br /&gt;
* If qmake wasn't found and you are using Debian packages, /usr/bin/qmake probably points to a wrong qmake version. To fix this run as root:&lt;br /&gt;
 update-alternatives --config qmake&lt;br /&gt;
* If the problems persist, try the CMake make-option &amp;lt;tt&amp;gt;--keep-going&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Here you need the libungif library, otherwise you will get an error message like &amp;quot;&amp;lt;tt&amp;gt;Could NOT find GIF&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
* Qt-4.3 upgrade: if you get a link error in kjsembed talking about QScriptEngine, edit CMakeCache.txt in kdelibs and remove the lines that talk about QT_QTUITOOLS_LIBRARY, then type make again (that static library has a new dependency, and the cmake code that adds it needs to run).&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;CMake Error: KDE Requires Qt to be built with SSL support&lt;br /&gt;
&amp;lt;/code&amp;gt;, install openssl-devel, remove CMakeCache.txt and re-compile QT.&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;kdelibs/kimgio/ico.cpp:188: undefined reference to `QImage::jumpTable()'&amp;lt;/code&amp;gt; it means you compiled QT without QT3 support(no, linking to a true QT3 install won't work)&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
After &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt;, but before ''kdebase'', you need to build and install ''kdepimlibs''.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We go into the KDE source directory (line 1), download the source code for kdepimlibs using subversion (line 2) and then go into the new {{path|~/kde/src/KDE/kdepimlibs}} directory (line 3). We then commence the build (line 4). This will leave us in the &amp;lt;tt&amp;gt;kdepimlibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have trouble compiling kdepimlibs:&lt;br /&gt;
* the cmakekde command may require a later version of the gpgme library.  This is available from the project's web site: http://www.gnupg.org/(en)/download/index.html - please note that the build of gpgme also requires libgpg-error, also available from the same location.  Both libraries are installed by the &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot; sequence, with the gpgme library configured with the additional &amp;quot;--with-gpg-error-prefix&amp;quot; parameter.  You may need to overwrite your existing &amp;quot;/usr/bin/gpgme-config&amp;quot; file with the newer version for the kdepimlibs to pick up the new install.&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
kdebase is divided into three parts:&lt;br /&gt;
* '''apps'''&lt;br /&gt;
:This contains applications like Dolphin or KWrite.&lt;br /&gt;
* '''runtime'''&lt;br /&gt;
:This contains things needed by every application at runtime, like icons. It is a required dependency for each KDE application, so you have to compile and install this.&lt;br /&gt;
* '''workspace'''&lt;br /&gt;
:This contains things specific to the KDE desktop, like Plasma or the window manager. Most stuff here depends on X11. You only need it if you want to build a full KDE desktop.&lt;br /&gt;
&lt;br /&gt;
You can build all of kdebase at once, which is described in the recipe below. If you only want to build kdebase-runtime, which is the only requirement, you can replace &amp;lt;code bash&amp;gt;cd kdebase&amp;lt;/code&amp;gt; with &amp;lt;code bash&amp;gt;cd kdebase/runtime&amp;lt;/code&amp;gt; in the recipe below.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase&lt;br /&gt;
 cd kdebase&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have troubles compiling kdebase:&lt;br /&gt;
* Make sure you have the &amp;lt;tt&amp;gt;libxss headers&amp;lt;/tt&amp;gt; installed. (Usually you got undefined references on xscreensaver objects if you do not have those headers)&lt;br /&gt;
* &amp;lt;tt&amp;gt;which meinproc&amp;lt;/tt&amp;gt; has to deliver {{path|/home/kde-devel/kde/bin/meinproc}}&lt;br /&gt;
* if cmakekde can not find the path of kdepimlibs, edit the file {{path|$KDE_BUILD/KDE/kdebase/CMakeCache.txt}} and manually set &amp;lt;tt&amp;gt;KDEPIMLIBS_INCLUDE_DIR:PATH=$KDE_BUILD/kdepimlibs&amp;lt;/tt&amp;gt;&lt;br /&gt;
* if you get an error saying &amp;quot;Please set the following variables: X11_XTest_LIB (ADVANCED)&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;Xtst&amp;lt;/tt&amp;gt;. On some systems, this is packaged separately from &amp;lt;tt&amp;gt;xext&amp;lt;/tt&amp;gt; and called &amp;lt;tt&amp;gt;x11proto-xext-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;libxtst-dev&amp;lt;/tt&amp;gt;. You may also need to remove the CMakeCache.txt file in the build dir after installing the package.&lt;br /&gt;
* the same for &amp;quot;X11_Xinerama_LIB (ADVANCED)&amp;quot; where you will need the devel package for &amp;lt;tt&amp;gt;xinerama&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* if you get an error complaining about a missing variable X11_Xrandr_LIB, you need the devel package for libxrandr (libxrandr-devel on ubuntu-systems)&lt;br /&gt;
* if you get the error &amp;quot;Please set the following variables: FONTCONFIG_INCLUDE_DIR, FONTCONFIG_LIBRARIES (ADVANCED)&amp;quot;, then you need to install  the libfontconfig headers&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: KMETADATA_LIBRARIES&amp;quot;, you need to install soprano from kdesupport and to rebuild kdelibs&lt;br /&gt;
* if you get the error &amp;quot;‘XserverRegion’ does not name a type&amp;quot; make sure you have libxcomposite headers installed (&amp;lt;tt&amp;gt;libxcomposite-dev&amp;lt;/tt&amp;gt; in ubuntu)&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: QT_QTOPENGL_LIBRARY (ADVANCED) &amp;quot;, try editing CMakeCache.txt and setting QT_QTOPENGL_LIBRARY:FILEPATH=/home/kde-devel/qt-copy/lib/libQtOpenGL.so&lt;br /&gt;
&lt;br /&gt;
* if you get messages as &amp;quot;KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.&amp;quot; then, either find the files containing the offending line and comment it out manually, or run the following script in ~/kde/src/KDE/kdebase: [http://www.plamadeala.com/files/macros_corrector.sh macros_corrector.sh]. It will just REMOVE the line that has &amp;quot;kde4_create_handbook&amp;quot; in it from all the found files.&lt;br /&gt;
*If you get an error (in ubuntu) concerning libxtst.so install the libxtst-dev package&lt;br /&gt;
* If you get the message &amp;quot;kdebase/workspace/kcontrol/kxkb/x11helper.cpp:131: error: ‘KGlobal’ has not been declared&amp;quot;, you might need to install libxklavier development packages.&lt;br /&gt;
&lt;br /&gt;
== Running KDE 4 programs ==&lt;br /&gt;
&lt;br /&gt;
You can now run KDE 4 programs (e.g. kwrite) by typing:&lt;br /&gt;
 ssh -X kde-devel@localhost&lt;br /&gt;
 kwrite &lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* If you get &lt;br /&gt;
 KUniqueApplication: Cannot find the D-Bus session server&lt;br /&gt;
check if you can access the display, e.g. type&lt;br /&gt;
 xclock&lt;br /&gt;
and see if a clock appears on the screen.&lt;br /&gt;
&lt;br /&gt;
* If you get something like&lt;br /&gt;
 Error: standard icon theme &amp;quot;oxygen&amp;quot; not found!&lt;br /&gt;
 &lt;br /&gt;
 ASSERT: &amp;quot;!isEmpty()&amp;quot; in file /home/kde-devel/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h, line 245&lt;br /&gt;
 Aborted (core dumped)&lt;br /&gt;
You need to install kdebase - see above. It is enough to install the &amp;quot;runtime&amp;quot; directory from kdebase.&lt;br /&gt;
&lt;br /&gt;
== Generating local API documentation ==&lt;br /&gt;
Although the API documentation for KDE is available online at [http://api.kde.org api.kde.org], it is sometimes useful to have it on your own disk, for example when you want to use [[Getting_Started/Set_up_KDE_4_for_development#KDevelop|KDevelop]] for browsing the documentation or when you are not able to be online all the time.&lt;br /&gt;
&lt;br /&gt;
Be aware that generating the API documentation can take several hours and takes almost half a gigabyte of diskspace.&lt;br /&gt;
The generation is handled by a script in {{path|kdelibs/doc/api}}, you need &amp;lt;tt&amp;gt;doxygen&amp;lt;/tt&amp;gt; to be able to run it. &lt;br /&gt;
&lt;br /&gt;
To build the API documentation for kdelibs, type the following:&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE/kdelibs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Repeat for other modules as desired.&amp;lt;br&amp;gt;&lt;br /&gt;
 cd &amp;lt;module home&amp;gt;&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Another, even easier method involves downloading this [[Doxyfile]] to your local system. Then simply change directory to where you want to create the documentation and run&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
% doxygen /path/to/Doxyfile&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Then review the file {{path|doxygen.log}} to see the doxygen errors and warnings. You'll find the actual documentation in the {{path|apidocs}} subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Staying up to date ==&lt;br /&gt;
&lt;br /&gt;
In order to keep the kde4 installation up to date, each of the modules installed should be updated periodically. As Monday is the day for big changes in kdelibs, Tuesday may be the best day to do this. For each module checked out, run &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs kdesupport # cs is not a typo&lt;br /&gt;
svn up&lt;br /&gt;
cb # cb is not a typo&lt;br /&gt;
make -j2 VERBOSE=1 &amp;amp;&amp;amp; make install&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a subset of a module ==&lt;br /&gt;
&lt;br /&gt;
Many modules in KDE contain a large number of programs which could take a long time to download and compile. In cases where you want to work only on a particular program or programs in a module, it is possible to download and compile particular folders. In some cases, certain folders are required for any build of the module. This is determined in the CMakeLists.txt file of the module. For example the [http://websvn.kde.org/trunk/KDE/kdegames/CMakeLists.txt?view=markup kdegames CMakeLists.txt file] lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
add_subdirectory(libkdegames)&lt;br /&gt;
add_subdirectory(libkmahjongg)&lt;br /&gt;
&lt;br /&gt;
macro_optional_add_subdirectory(doc)&lt;br /&gt;
macro_optional_add_subdirectory(lskat)&lt;br /&gt;
macro_optional_add_subdirectory(katomic)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, the libkdegames and libkmahjongg directories are required to build any of kdegames. The cmake directory will also usually be required. All the other directories (doc, katomic etc) are optional. They will be built if present on your machine. In this example, we build kmahjongg and kbattleship:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs KDE&lt;br /&gt;
svn co -N kdegames # The -N switch performs a non-recursive checkout&lt;br /&gt;
cd kdegames&lt;br /&gt;
svn up libkdegames # Get required directories&lt;br /&gt;
svn up libkmahjongg&lt;br /&gt;
svn up cmake&lt;br /&gt;
svn up kbattleship # Get optional directories&lt;br /&gt;
svn up kmahjongg&lt;br /&gt;
cmakekde &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
What can happen over time, after some &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; commands, is that some of the tools used in the KDE build chain change their output format. For example, &amp;lt;tt&amp;gt;kcfg&amp;lt;/tt&amp;gt; files are read by &amp;lt;tt&amp;gt;kconfig_compiler&amp;lt;/tt&amp;gt; to produce configuration dialogs. CMake cannot detect those changes, and the compilation might fail. A workaround is to always force a re-generation of all such files:&lt;br /&gt;
 find $KDE_SRC/KDE/kdebase -name &amp;quot;*.kcfg&amp;quot; | xargs touch&lt;br /&gt;
The same applies to &amp;lt;tt&amp;gt;ui&amp;lt;/tt&amp;gt; files as produced by Qt designer.&lt;br /&gt;
&lt;br /&gt;
=== Locked sessions ===&lt;br /&gt;
When installing KDE 4 as a user, one will not be able to unlock a locked session. To work around this issue you can either:&lt;br /&gt;
 su&lt;br /&gt;
 chown root.root $KDEDIR/bin/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/bin/kcheckpass&lt;br /&gt;
&lt;br /&gt;
== Success! ==&lt;br /&gt;
&lt;br /&gt;
You are now ready to start building other svn modules in the same fashion as you built kdebase, running and testing KDE4 or writing your own patches and applications.&lt;br /&gt;
&lt;br /&gt;
See the [[Getting Started/Set up KDE 4 for development|Set up KDE 4 for development]] tutorial for how to start KDE 4 applications and how to use KDevelop to work on them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Build KDE]]&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4/kdesvn-build</id>
		<title>Getting Started/Build/KDE4/kdesvn-build</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4/kdesvn-build"/>
				<updated>2007-11-07T18:07:37Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: Creating new page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There is a simple and automatic way for building KDE4 using the kdesvn-build script. Download the latest release of the kdesvn-build script from http://kdesvn-build.kde.org/. Your distribution might have a package with kdesvn-build script but most probably that will be dated. So download the latest release from the website. As mentioned in the [[..|Getting Started]] page, install all the required packages for your distribution. Create a new user kde-devel and switch to that user. Untar the kdesvn-build file to your home folder.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cp kdesvn-build/kdesvn-buildrc-sample ~/.kdesvn-buildrc&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Modify the .kdesvn-buildrc file for selecting which modules to compile and which to leave out.&lt;br /&gt;
Add kdesvn-build/ folder to your path by adding this line to your .bashrc&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
export PATH=~/kdesvn-build/:$PATH&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Now, all that remains to do is run the script!&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
kdesvn-build&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4</id>
		<title>Getting Started/Build/KDE4</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4"/>
				<updated>2007-11-07T18:01:10Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: /* Kubuntu and Debian */ Added libxine-dev to gutsy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/KDE4}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Getting Started|&lt;br /&gt;
&lt;br /&gt;
name=Building KDE4 From Source|&lt;br /&gt;
&lt;br /&gt;
pre=[[../../Sources/Anonymous_SVN|Anonymous SVN Quickstart Guide]]|&lt;br /&gt;
&lt;br /&gt;
next=[[../../Set_up_KDE_4_for_development|Set up KDE 4 for development]]|&lt;br /&gt;
&lt;br /&gt;
reading=[http://kdesvn-build.kde.org/ kdesvn-build: The KDE From Subversion Build Tool]&amp;lt;br&amp;gt;[[../../Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&amp;lt;br&amp;gt;[[Development/Tutorials/CMake |Introduction to CMake]]&amp;lt;br&amp;gt;[[../KDE4/FreeBSD|FreeBSD notes]]&amp;lt;br&amp;gt;[[../KDE4/Mac OS X|Instructions for Mac OS X]]&amp;lt;br&amp;gt;[[../KDE4/Windows|Instructions for MS Windows]]|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This tutorial shows one way to get KDE from trunk running on Linux/BSD systems. There are also tutorials for [[/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[/Mac OS X|Mac OS X]] and [http://solaris.kde.org/ Solaris]. Throughout the tutorial the bash shell is used.&lt;br /&gt;
&lt;br /&gt;
{{warning|Expect a higher risk of build failure '''on Mondays''' when most kdelibs changes are committed. [http://developer.kde.org/~dirk/dashboard/ Dashboard] reports unexpected breakages. You are encouraged to fix failing modules.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The following must be installed first before you can successfully complete this tutorial:&lt;br /&gt;
* gcc and g++, preferably version 4.2 or higher&lt;br /&gt;
* svn, the subversion revision control client&lt;br /&gt;
* pkg-config&lt;br /&gt;
* development libraries and headers for X11, OpenGL (mesa-common-dev and libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 and libxslt&lt;br /&gt;
* the &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, which is part of kdesdk. You can install it as part of kdesdk (kdesdk-scripts on Debian) or similar package, or just download it itself from [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* the [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], which is the freedesktop MIME standard KDE is using now&lt;br /&gt;
* [http://boost.org/ boost], needed by kdebase; after compiling and/or installing boost, in order to make cmake aware about its location (FindBoost),  add boost directory (the one containing include subdirectory) to CMAKE_INCLUDE_PATH or set an environment variable called BOOST_ROOT pointing to boost directory.&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
In Ark Linux, the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy devel-core libxml-devel libxslt-devel bzip2-devel \&lt;br /&gt;
clucene-core-devel librdf-devel shared-mime-info xorg-Mesa-libGL-devel \&lt;br /&gt;
subversion boost-devel doxygen giflib-devel dbus-devel openssl-devel \&lt;br /&gt;
alsa-lib-devel kdesdk-scripts qt4-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mission Control.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus and Qt - you can skip steps 5, 6 and 7.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Some of the required packages for building KDE4 on Fedora 7 or higher:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
yum install clucene-core-devel libxml-devel libxslt-devel \&lt;br /&gt;
dbus-devel boost-devel bzip2-devel openssl-devel alsa-lib-devel \&lt;br /&gt;
redland-devel rasqal-devel raptor-devel hspell-devel aspell-devel \&lt;br /&gt;
cups-devel xine-lib-devel avahi-devel gamin-devel OpenEXR-devel \&lt;br /&gt;
enchant-devel jasper-devel ilmbase-devel pcre-devel gpgme-devel \&lt;br /&gt;
libxklavier-devel glib-devel libusb-devel libsmbclient-devel \&lt;br /&gt;
libxcb-devel NetworkManager-devel lm_sensors-devel libraw1394-devel \&lt;br /&gt;
bluez-libs-devel &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - It may be simpler to spin RPMs. Note that you can edit the variables in /etc/rpm/macros.kde4 (which is provided by Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
The build stage then looks like:&lt;br /&gt;
&lt;br /&gt;
%build&lt;br /&gt;
&lt;br /&gt;
mkdir -p %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
pushd %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
%{cmake_kde4} ..&lt;br /&gt;
&lt;br /&gt;
popd&lt;br /&gt;
&lt;br /&gt;
make %{?_smp_mflags} -C %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
I have had better results with creating a kdesupport rpm which means that you should not install the soprano and strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu and Debian ===&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.04 (Feisty) and Debian (Testing/Unstable) the build dependencies you need are installed with:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential cdbs debhelper cmake \&lt;br /&gt;
libxml2-dev libxslt1-dev libbz2-dev libclucene-dev librdf-dev \&lt;br /&gt;
shared-mime-info libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \&lt;br /&gt;
libxext-dev libjpeg-dev libpng-dev subversion libsm-dev libxinerama-dev \&lt;br /&gt;
libxrender-dev libfontconfig-dev libboost-dev libxcursor-dev doxygen \&lt;br /&gt;
libungif4-dev libdbus-1-dev libssl-dev libgpgme11-dev \&lt;br /&gt;
libasound2-dev kdesdk-scripts libpth-dev libjasper-dev \&lt;br /&gt;
ssh libxine-dev libqimageblitz-dev libqimageblitz4 libglib2.0-dev \&lt;br /&gt;
libxkbfile-dev libenchant-dev libbluetooth-dev network-manager-dev \&lt;br /&gt;
libsmbclient-dev libxcb1-dev libcaptury-dev libxcomposite-dev \&lt;br /&gt;
libxdamage-dev libusb-dev libgpgme11-dev libldap2-dev &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.10 (Gutsy) and Debian unstable you have to add:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install dbus-x11  libqt4-dev libqca2-dev libeigen-dev \&lt;br /&gt;
libstreamanalyzer-dev libsoprano-dev libstrigiqtdbusclient-dev \ &lt;br /&gt;
libxklavier11-dev libxml2-utils libdbus-1-dev libxslt1-dev cmake libbz2-dev \&lt;br /&gt;
libungif4-dev libgpgme11-dev libboost-dev libxine-dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided in these packages. Skip down to the [[#kdelibs|kdelibs section]] and continue from there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a fully functional API documentation framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
In openSUSE 10.2 and newer, you can install packages using [http://en.opensuse.org/Zypper Zypper]:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
sudo zypper install &amp;lt;package-name&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In older releases of SUSE, you can use YaST:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
yast -i &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Required Packages'''&lt;br /&gt;
&lt;br /&gt;
The packages you will need to install are:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
xorg-x11-devel&lt;br /&gt;
libxml2-devel &lt;br /&gt;
kdesdk3 &lt;br /&gt;
clucene-core-devel &lt;br /&gt;
boost-devel&lt;br /&gt;
libjpeg-devel &lt;br /&gt;
liblrdf-devel &lt;br /&gt;
libpng-devel &lt;br /&gt;
libxslt-devel &lt;br /&gt;
libredland-devel&lt;br /&gt;
Mesa-devel &lt;br /&gt;
giflib-devel &lt;br /&gt;
subversion &lt;br /&gt;
gcc &lt;br /&gt;
gcc-c++&lt;br /&gt;
gmp-devel (needed to build kdesupport)&lt;br /&gt;
gpgme-devel (needed to build kdepimlibs)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Optional Packages'''&lt;br /&gt;
&lt;br /&gt;
You can skip the manual and painful installation kdesupport and its dependencies ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano and other Nepomuk dependencies) by adding the KDE:KDE4 repository from&lt;br /&gt;
the [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] to your installation sources. &lt;br /&gt;
&lt;br /&gt;
For openSUSE 10.2 and newer do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo zypper service-add http://software.opensuse.org/download/KDE:/KDE4/openSUSE_10.2 KDE4-102&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For older versions of SUSE Linux do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
installation_sources -a http://software.opensuse.org/download/KDE:/KDE4/[YOUR SUSE LINUX VERSION]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now install the following packages:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cmake&lt;br /&gt;
dbus-1-devel&lt;br /&gt;
libqt4-devel&lt;br /&gt;
libqca2-devel&lt;br /&gt;
libsoprano-devel&lt;br /&gt;
libqimageblitz-devel&lt;br /&gt;
strigi&lt;br /&gt;
strigi-ui&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot more packages that are needed to satisfy the config-check, such as libusb-devel, bison etc., so look out for the config notifications and install accordingly. Please remember to skip any instructions that refer to kdesupport below. Start to compile with kdelibs. &lt;br /&gt;
&lt;br /&gt;
And for fully functional apidox framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CMake binary packages for openSUSE are available from the KDE:KDE4 repository as well as from the [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Install by hand ====&lt;br /&gt;
&lt;br /&gt;
You can use stable ebuilds just remember to sync your portage before you begin.&lt;br /&gt;
&lt;br /&gt;
Remember: All commands are executed as root.&lt;br /&gt;
&lt;br /&gt;
Required:&lt;br /&gt;
&lt;br /&gt;
We need to allow the following keyword masked ebuilds.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-util/cmake' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
echo 'dev-cpp/clucene' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the berkdb USE flag for redland, otherwise nepomuk won't work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-libs/redland berkdb' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the packages you will need to emerge, I included the update option into the emerge command so you will not re-emerge anything that you might already have installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -avu 'sys-devel/gcc' \&lt;br /&gt;
  'dev-util/subversion' \&lt;br /&gt;
  'dev-util/pkgconfig'  \&lt;br /&gt;
  'x11-base/xorg-x11' \&lt;br /&gt;
  'virtual/glut' \&lt;br /&gt;
  'media-libs/mesa' \&lt;br /&gt;
  'media-libs/jpeg' \&lt;br /&gt;
  'media-libs/libpng' \&lt;br /&gt;
  'media-libs/giflib' \&lt;br /&gt;
  'dev-cpp/clucene' \&lt;br /&gt;
  'dev-util/cppunit' \&lt;br /&gt;
  'media-libs/liblrdf' \&lt;br /&gt;
  'dev-libs/libxml2' \&lt;br /&gt;
  'dev-libs/libxslt' \&lt;br /&gt;
  'x11-misc/shared-mime-info' \&lt;br /&gt;
  'dev-libs/boost' \&lt;br /&gt;
  'dev-util/cmake' \&lt;br /&gt;
  'dev-libs/redland' \&lt;br /&gt;
  'sys-apps/dbus' \&lt;br /&gt;
  'sys-apps/hal' \&lt;br /&gt;
  'x11-libs/qt'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You will also need to emerge either 'kde-base/kdesdk' or kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
If you emerged DBUS, CMAKE, QT or HAL you may skip those sections respectively.&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
==== Install via portage ====&lt;br /&gt;
&lt;br /&gt;
Also you can install the KDE 4 packages directly via &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -a &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the things you need, [http://gentoo-wiki.com/TIP_Overlays#Layman install layman] and then pull in the &amp;quot;kde&amp;quot; overlay (which contains experimental KDE ebuilds): &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
layman -a kde&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
After this you need to adjust some USE-flags for KDE 4 and tell portage to use the testing KDE 4 ebuilds instead of the stable KDE 3 ones. &lt;br /&gt;
&lt;br /&gt;
That way portage will do the dependency tracking for you. &lt;br /&gt;
&lt;br /&gt;
Detailed instructions on building KDE 4 in Gentoo via portage can be found in the [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. They are discussed in the thread [http://forums.gentoo.org/viewtopic-t-530111-postdays-0-postorder-asc-start-0.html KDE 4 monolithic ebuilds].&lt;br /&gt;
&lt;br /&gt;
=== Mandriva ===&lt;br /&gt;
In Mandriva the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
urpmi gcc-c++ cmake libxml2-devel libbzip2_1-devel \&lt;br /&gt;
libclucene0-devel liblrdf2-devel libmesagl1-devel \&lt;br /&gt;
subversion doxygen libdbus-1_3-devel libopenssl0.9.8-devel \&lt;br /&gt;
libalsa2-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're running 64-bit environment you should replace all packages starting with &amp;quot;lib...&amp;quot; to &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus - you can skip steps 5 and 6.&lt;br /&gt;
&lt;br /&gt;
== Create a user account for KDE4 development ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Some people like to have a separate user account for KDE 4 (for instance an old bug deleted files by mistake), and the instructions below were written with that approach.&lt;br /&gt;
&lt;br /&gt;
However it is much more efficient to do everything with a single user account, see [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&lt;br /&gt;
for more details. &lt;br /&gt;
&lt;br /&gt;
You can still follow the instructions below, but don't put the environment variables in your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, put them in a separate file that you source to switch to the KDE 4 environment.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Command Line ===&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
useradd -m kde-devel&lt;br /&gt;
passwd kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Using KControl ===&lt;br /&gt;
&lt;br /&gt;
Instead of using the commands above, you can also use the User module in the KDE Control Center if you already have KDE3 installed.&lt;br /&gt;
&lt;br /&gt;
=== Setting up the environment ===&lt;br /&gt;
&lt;br /&gt;
Copy the {{path|~/.bashrc}} from your normal user account to the new kde-devel account. Next, copy and paste the contents of the [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|example .bashrc]] into {{path|~kde-devel/.bashrc}}. Be sure to comment out the line &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; if you do not have the &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt; command available. You will probably also want to modify the path to make sure it doesn't include your kde3 paths. Also if you want to use KDevelop to develop KDE 4 applications you may pass the ''-GKDevelop3'' flag to the ''cmake'' command (to make CMake generate KDevelop project files, it will help to avoid rebuilding in the future, see [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|this]]).  &lt;br /&gt;
To make it run, you have to open a new bash or to execute &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will provide access to commands such as &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; that are used in this tutorial as well as ensure that the proper paths are in place for Qt, KDE and CMake binaries.&lt;br /&gt;
&lt;br /&gt;
For more information, please read the [[Getting Started/Increased Productivity in KDE4 with Scripts]] tutorial.&lt;br /&gt;
&lt;br /&gt;
=== Switching to the New User ===&lt;br /&gt;
Switch to the user kde-devel: (don't forget the dash)&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
ssh -X kde-devel@localhost&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If the ssh command fails, check out the [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] section of the [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== The development user's shell ==&lt;br /&gt;
&lt;br /&gt;
On some systems a new user is configured by default to use {{path|/bin/sh}}. If this is not the case on your system, you can skip this section. Using {{path|/bin/sh}} can be very inconvenient to work with and you may want to change it to {{path|/bin/bash}} or another shell.&lt;br /&gt;
On Ark Linux and Fedora, you can skip this step - {{path|/bin/sh}} is {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Option 1: As the kde-devel user ===&lt;br /&gt;
&lt;br /&gt;
If you don't have root privileges and your system supports the changing of your own shell with the &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt; application, then you could try to change your shell to {{path|/bin/bash}} by using:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
chsh -s /bin/bash kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: As the root user ===&lt;br /&gt;
&lt;br /&gt;
If your system comes with the &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; application you can run the following command as root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Another option is to use the &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; application as root to safely edit your {{path|/etc/passwd}}. Locate 'kde-devel' in the the file. Change '{{path|/bin/sh}}' at the end of the line to read '{{path|/bin/bash}}', save your changes and exit.&lt;br /&gt;
&lt;br /&gt;
The new shell will be started automatically when you log in as the kde-devel user again.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
QtDBus and KDE are known to work with D-Bus versions 0.62, as well as 0.92 and upwards. Versions 0.60 and 0.61 may work too but are not tested. Versions 0.90 and 0.91 are known not to work. We recommend using post-1.0 release versions (at least 0.94), so consider upgrading if you haven't done so.&lt;br /&gt;
&lt;br /&gt;
You may skip this section if you have a recent D-Bus version or if you don't want to upgrade. You probably want to skip building the bindings until/unless you know you will be building HAL (see below).&lt;br /&gt;
&lt;br /&gt;
Before running these steps in the recipe, make sure your X11 headers and libraries are available. The configure script run on line 5 of the following instructions should output:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Make sure you did set up your environment correctly as described [[Getting_Started/Build/KDE4#Setting_up_the_environment|above]]. This is necessary for the &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; functions to work.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]] &lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz&lt;br /&gt;
 tar -xvzf dbus-1.0.2.tar.gz&lt;br /&gt;
 cd dbus-1.0.2/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR --localstatedir=/var&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo dbus-uuidgen --ensure&lt;br /&gt;
&lt;br /&gt;
 cs # see above&lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.74.tar.gz&lt;br /&gt;
 tar -xvzf dbus-glib-0.74.tar.gz&lt;br /&gt;
 cd dbus-glib-0.74/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 cb&lt;br /&gt;
 sudo chown -R kde-devel:kde-devel *&lt;br /&gt;
&lt;br /&gt;
=== What's Happening === &lt;br /&gt;
After changing into the source directory (line 1), D-Bus source code is downloaded from freedesktop.org (line 2) and unpacked (line 3). After going into the newly created D-Bus directory (line 4), the build is set up using the supplied {{path|configure}} script (line 5). After building (line 6) and installing (line 7) D-Bus, we use the &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; tool to install a machine identification file that allows the bus to start automatically when the desktop session starts (line 8).&lt;br /&gt;
&lt;br /&gt;
Note that you need write access to {{path|/var}} for the last two steps. If your system does not have the sudo command, you can use the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; command instead, e.g. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The steps for building the glib bindings are similar to the above.&lt;br /&gt;
&lt;br /&gt;
When these two packages are done building, we must fix the file ownership because 'sudo make install' has created root owned files and directories in ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Skip this if you have [http://cmake.org/ CMake] &amp;gt;=2.4.5 installed. &lt;br /&gt;
You should be able to directly use the binary packages available on the [http://www.cmake.org/HTML/Download.html CMake site]. There are also distribution specific packages available.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click Here to learn more]] &lt;br /&gt;
 wget http://www.cmake.org/files/v2.4/cmake-2.4.6.tar.gz&lt;br /&gt;
 tar -zxf cmake-2.4.6.tar.gz&lt;br /&gt;
 mkdir cmake-build&lt;br /&gt;
 cd cmake-build &lt;br /&gt;
 ../cmake-2.4.6/bootstrap&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
First, we go back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's source directory (line 1), get the CMake sources (line 2) and unpack them (line 3). We create a directory to build CMake in (line 4) and go into it (line 5). We then run the CMake bootstrap script to set up the CMake build (line 6), then make (line 7) and install it (line 8) using the root user.&lt;br /&gt;
&lt;br /&gt;
If your system does not have the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; command, you can instead do &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Qt ==&lt;br /&gt;
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. You should use the copy in the KDE Subversion servers. (note: some distros, like Debian or openSUSE, tend to supply Qt with patches from KDE svn applied, so you may want to cheat and use precompiled Qt from your distro, because they will work just as well). KDE tries to guarantee that the source is compileable with a plain, unpatched Qt 4.3.0, but you might get additional bugfixes by using qt-copy (however, usually your distribution takes care of backporting necessary bugfixes so overall you're most likely better off with sticking to the distro provided one if it is recent enough). Refer to the distribution specific sections above for more information. &lt;br /&gt;
&lt;br /&gt;
As for now Qt3 compatibility layer in Qt 4 is mandatory, so please &amp;lt;b&amp;gt;avoid&amp;lt;/b&amp;gt; using &amp;quot;-no-qt3support&amp;quot; option when building Qt4 from sources.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd # Note: qt-copy lives in $HOME/qt-copy. See $QTDIR in [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|&amp;lt;font color=red&amp;gt;.bashrc&amp;lt;/font&amp;gt;]] &lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/qt-copy&lt;br /&gt;
 cd qt-copy&lt;br /&gt;
 ./apply_patches&lt;br /&gt;
 ./configure -qt-gif -no-exceptions -debug -fast \&lt;br /&gt;
  -prefix $QTDIR -nomake examples -nomake demos&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
 # if we don't install, we'll just clear obj files to&lt;br /&gt;
 # save disk space&lt;br /&gt;
 if [ $QTDIR = `pwd` ]; then \&lt;br /&gt;
 find . -name '*.o' -delete ; \&lt;br /&gt;
 else make install; fi;&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We switch back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's home directory (line 1) and download the source code using subversion (svn) from KDE's repository (line 2). After changing into the resulting {{path|qt-copy}} directory (line 3), we run a script that manages the patches that come with &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (line 4). &lt;br /&gt;
&lt;br /&gt;
Once the patches have been applied, we then set up the build using the &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script (line 5-6). The various command line options used are explained in the {{path|qt-copy/README.qt-copy}} file. Finally, we build the minimal requirements for KDE (line 7) and install (line 10) Qt. If install dir is the same as the current dir (line 8), then we just free some space (line 9) instead. If you want all the example and demo applications, you can either build them individually or simply do a &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; from the {{path|qt-copy}} directory. &lt;br /&gt;
&lt;br /&gt;
Note that the installation does not require root as it installs Qt locally into {{path|$QTDIR}}. Anyway, installation is only needed if {{path|$QTDIR}} differs from {{path|$HOME/qt-copy}}, which is not the case if you have exactly followed the instructions.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &amp;quot;error: X11/Xlib.h: No such file or directory&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;xorg&amp;lt;/tt&amp;gt; (the actual name may vary between operating systems, for example it is &amp;lt;tt&amp;gt;xorg-dev&amp;lt;/tt&amp;gt; on Ubuntu based systems such as Kubuntu). &lt;br /&gt;
&lt;br /&gt;
If you get an error in the configure step about missing defines, check the value of &amp;lt;tt&amp;gt;$QMAKESPEC&amp;lt;/tt&amp;gt;.  Some distributions set this to point directly to the system-installed Qt.  If &amp;lt;tt&amp;gt;unset QMAKESPEC&amp;lt;/tt&amp;gt; solves the problem, you probably want to add it to the &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
If you get an error &amp;quot;.pch/debug-shared/QtCore&amp;quot;, this is because Qt-4.3 enables precompiled headers if your gcc supports it, but for some reason it doesn't work for you. If you use distcc, configure qt with -no-pch. If you use icecream, update to the latest icecream from svn trunk.&lt;br /&gt;
&lt;br /&gt;
Try running any Qt program, like {{program|assistant}}. '''Note:''' You may need to run &amp;lt;tt&amp;gt;xhost +local:kde-devel&amp;lt;/tt&amp;gt; as your regular kde3 user to run this application.  If it crashes in QSpanData::adjustSpanMethods, then your problem is the oxygen style. Try removing {{path|lib/kde4/plugins/styles/kstyle-oxygen.so}} and {{path|lib/kde4/plugins/styles/oxygen.so}} if they exist in the KDE install prefix.&lt;br /&gt;
&lt;br /&gt;
== HAL ==&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use qdbusviewer to see if you have org.freedesktop.hal. If not, you might need a newer version of hal. If you have org.freedesktop.hal, you probably don't need to, and don't ''want'' to, roll your own HAL.}}&lt;br /&gt;
&lt;br /&gt;
If your system requires you to build a newer version of HAL, there's a decent chance you'll need to build other stuff as well, some of which may not be straight forward. Since this should only be required for older distros, instructions are on [[Getting_Started/Build/HAL| a separate page]].&lt;br /&gt;
&lt;br /&gt;
== kdesupport ==&lt;br /&gt;
&lt;br /&gt;
{{warning|Don't forget to read the [[Getting_Started/Build/KDE4#Setting_up_the_environment|Setting Up The Environment]] section first.}}&lt;br /&gt;
&lt;br /&gt;
There are several libraries that KDE applications rely on in the kdesupport module. This includes Strigi and Soprano for file metadata and search, QImageBlitz for image manipulation needed in kdebase, eigen for visual effects in applications such as Kalzium, taglib for music players and qca for some cryptographic needs. &lt;br /&gt;
&lt;br /&gt;
Strigi itself has a few dependencies as well: you will need the libraries and headers for libz, libbz2, openssl (libcrypto or libssl), libclucene (&amp;gt;=0.9.16a but watch out: version 0.9.17 does '''not''' work), and either libxml2 or libexpat.&lt;br /&gt;
&lt;br /&gt;
Please remember that if you use openSUSE, you can install the needed packages from the KDE:KDE4 buildservice repository and do not have to bother with fiddling the details below. Skip to the kdelibs section. &lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/&lt;br /&gt;
 cd kdesupport&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1). We download the sources in kdesupport using subversion (line 2), go into the new {{path|~/kde/src/kdesupport}} directory (line 3), and commence the build (line 4). This will leave us in the kdesupport build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &lt;br /&gt;
   cmakekde: command not found&lt;br /&gt;
then you have to go manualy into the kdesupport directory in ~ and execute the command cmakekde. if this still doesnt work, then something is wrong with your bashrc.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: This project requires some variables to be set,&lt;br /&gt;
 and cmake can not find them.&lt;br /&gt;
 Please set the following variables:&lt;br /&gt;
 LIBXML2_INCLUDE_DIR (ADVANCED)&lt;br /&gt;
you should install the development package for libxml2.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: Could NOT find REDLAND&lt;br /&gt;
then you need librdf from the Redland.&lt;br /&gt;
If your distribution does not provide the librdf package, you can download the source there: [http://download.librdf.org/source/ http://download.librdf.org/source/] and build it.&lt;br /&gt;
(Gentoo users: The ebuild for librdf is named dev-libs/redland)&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 Fetching external item into 'kdesupport/admin'&lt;br /&gt;
 Error validating server certificate for 'https://...'&lt;br /&gt;
see [http://techbase.kde.org/Getting_Started/Sources/Using_Subversion_with_KDE Using Subversion with KDE]&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 FILE cannot create directory: /usr/lib[64]/qt4/plugins/crypto. Maybe need administrative privileges.&lt;br /&gt;
 &lt;br /&gt;
 make: *** [install] Error 255&lt;br /&gt;
take a second look in the .bashrc file described above, are paths correct?  Alternatively, you may see this error if you decided to use a distribution installed version of qt4 and skipped the Qt install above.  Either install qt-copy as describe above, or &amp;quot;sudo make install&amp;quot;. If you use &amp;quot;sudo make install&amp;quot;, make sure you that you change the ownership back to your user for some of the ~/kde subdirectories that were effected by using sudo (ie. &amp;quot;&amp;lt;tt&amp;gt;sudo chown -R kde-devel:kde-devel ~/kde&amp;lt;/tt&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you get a message related to &lt;br /&gt;
   target libQtTest.so not found&lt;br /&gt;
you may need to recompile qt-copy. This time you should take out&lt;br /&gt;
   -nomake demos -nomake examples&lt;br /&gt;
from the configure command, so that Qt generates library QtTest.&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
&lt;br /&gt;
We can now move on to building KDE's base libraries.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd   &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 mkdir KDE &amp;amp;&amp;amp; cd KDE&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs&lt;br /&gt;
 cd kdelibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1) then make and go into the KDE directory (line 2). We download the sources for kdelibs using subversion (line 3), go into the new {{path|~/kde/src/KDE/kdelibs}} directory (line 4), and commence the build (line 5). This will leave us in the &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
{{tip|There might be missing dependencies on your system! They are easily overlooked in the output of &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You might want to do a &amp;lt;tt&amp;gt;cmake $KDE_SRC/KDE/MODULE_NAME&amp;lt;/tt&amp;gt; prior to compiling any kde modules (like kdelibs, kdepimlibs etc.)}}&lt;br /&gt;
&lt;br /&gt;
=== Additional KDE-specific CMake modules ===&lt;br /&gt;
There are additional CMake modules in {{path|kdelibs/cmake/modules/}} that are necessary for building KDE4 applications. These will be installed for you when  kdelibs itself is installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have problems compiling kdelibs, first make sure the software in the [[Getting_Started/Build/KDE4#Required_Software|Required Software]] section above is installed and works. Other possible hints include:&lt;br /&gt;
* If the &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; command fails stating that CMake requires an out of source build directory, remove {{path|~/kde/src/KDE/kdelibs/CMakeCache.txt}}, and try again.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; still gives the same error then try this &lt;br /&gt;
 cd&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR \&lt;br /&gt;
 -DCMAKE_BUILD_TYPE=debugfull \&lt;br /&gt;
 -DKDE4_BUILD_TESTS=ON \&lt;br /&gt;
 ~/kde/src/KDE/kdelibs&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
* If you received an error stating &amp;quot;Please create a separate build directory and run 'cmake path_to_kdelibs [options]' there.&amp;quot;, then you need to change to your build directory before running cmakekde. (e.g &amp;lt;tt&amp;gt;cs KDE/kdelibs &amp;amp;&amp;amp; cb &amp;amp;&amp;amp; cmakekde&amp;lt;/tt&amp;gt;) If the message stays, run 'svn status' in the kdelibs directory and remove all files labeled with '?'.&lt;br /&gt;
* If Qt wasn't found or the wrong version of Qt was found, make sure that the qmake from the Qt you need is the first qmake in the path.&lt;br /&gt;
* If qmake wasn't found and you are using Debian packages, /usr/bin/qmake probably points to a wrong qmake version. To fix this run as root:&lt;br /&gt;
 update-alternatives --config qmake&lt;br /&gt;
* If the problems persist, try the CMake make-option &amp;lt;tt&amp;gt;--keep-going&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Here you need the libungif library, otherwise you will get an error message like &amp;quot;&amp;lt;tt&amp;gt;Could NOT find GIF&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
* Qt-4.3 upgrade: if you get a link error in kjsembed talking about QScriptEngine, edit CMakeCache.txt in kdelibs and remove the lines that talk about QT_QTUITOOLS_LIBRARY, then type make again (that static library has a new dependency, and the cmake code that adds it needs to run).&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;CMake Error: KDE Requires Qt to be built with SSL support&lt;br /&gt;
&amp;lt;/code&amp;gt;, install openssl-devel, remove CMakeCache.txt and re-compile QT.&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;kdelibs/kimgio/ico.cpp:188: undefined reference to `QImage::jumpTable()'&amp;lt;/code&amp;gt; it means you compiled QT without QT3 support(no, linking to a true QT3 install won't work)&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
After &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt;, but before ''kdebase'', you need to build and install ''kdepimlibs''.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We go into the KDE source directory (line 1), download the source code for kdepimlibs using subversion (line 2) and then go into the new {{path|~/kde/src/KDE/kdepimlibs}} directory (line 3). We then commence the build (line 4). This will leave us in the &amp;lt;tt&amp;gt;kdepimlibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have trouble compiling kdepimlibs:&lt;br /&gt;
* the cmakekde command may require a later version of the gpgme library.  This is available from the project's web site: http://www.gnupg.org/(en)/download/index.html - please note that the build of gpgme also requires libgpg-error, also available from the same location.  Both libraries are installed by the &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot; sequence, with the gpgme library configured with the additional &amp;quot;--with-gpg-error-prefix&amp;quot; parameter.  You may need to overwrite your existing &amp;quot;/usr/bin/gpgme-config&amp;quot; file with the newer version for the kdepimlibs to pick up the new install.&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
kdebase is divided into three parts:&lt;br /&gt;
* '''apps'''&lt;br /&gt;
:This contains applications like Dolphin or KWrite.&lt;br /&gt;
* '''runtime'''&lt;br /&gt;
:This contains things needed by every application at runtime, like icons. It is a required dependency for each KDE application, so you have to compile and install this.&lt;br /&gt;
* '''workspace'''&lt;br /&gt;
:This contains things specific to the KDE desktop, like Plasma or the window manager. Most stuff here depends on X11. You only need it if you want to build a full KDE desktop.&lt;br /&gt;
&lt;br /&gt;
You can build all of kdebase at once, which is described in the recipe below. If you only want to build kdebase-runtime, which is the only requirement, you can replace &amp;lt;code bash&amp;gt;cd kdebase&amp;lt;/code&amp;gt; with &amp;lt;code bash&amp;gt;cd kdebase/runtime&amp;lt;/code&amp;gt; in the recipe below.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase&lt;br /&gt;
 cd kdebase&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have troubles compiling kdebase:&lt;br /&gt;
* Make sure you have the &amp;lt;tt&amp;gt;libxss headers&amp;lt;/tt&amp;gt; installed. (Usually you got undefined references on xscreensaver objects if you do not have those headers)&lt;br /&gt;
* &amp;lt;tt&amp;gt;which meinproc&amp;lt;/tt&amp;gt; has to deliver {{path|/home/kde-devel/kde/bin/meinproc}}&lt;br /&gt;
* if cmakekde can not find the path of kdepimlibs, edit the file {{path|$KDE_BUILD/KDE/kdebase/CMakeCache.txt}} and manually set &amp;lt;tt&amp;gt;KDEPIMLIBS_INCLUDE_DIR:PATH=$KDE_BUILD/kdepimlibs&amp;lt;/tt&amp;gt;&lt;br /&gt;
* if you get an error saying &amp;quot;Please set the following variables: X11_XTest_LIB (ADVANCED)&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;Xtst&amp;lt;/tt&amp;gt;. On some systems, this is packaged separately from &amp;lt;tt&amp;gt;xext&amp;lt;/tt&amp;gt; and called &amp;lt;tt&amp;gt;x11proto-xext-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;libxtst-dev&amp;lt;/tt&amp;gt;. You may also need to remove the CMakeCache.txt file in the build dir after installing the package.&lt;br /&gt;
* the same for &amp;quot;X11_Xinerama_LIB (ADVANCED)&amp;quot; where you will need the devel package for &amp;lt;tt&amp;gt;xinerama&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* if you get an error complaining about a missing variable X11_Xrandr_LIB, you need the devel package for libxrandr (libxrandr-devel on ubuntu-systems)&lt;br /&gt;
* if you get the error &amp;quot;Please set the following variables: FONTCONFIG_INCLUDE_DIR, FONTCONFIG_LIBRARIES (ADVANCED)&amp;quot;, then you need to install  the libfontconfig headers&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: KMETADATA_LIBRARIES&amp;quot;, you need to install soprano from kdesupport and to rebuild kdelibs&lt;br /&gt;
* if you get the error &amp;quot;‘XserverRegion’ does not name a type&amp;quot; make sure you have libxcomposite headers installed (&amp;lt;tt&amp;gt;libxcomposite-dev&amp;lt;/tt&amp;gt; in ubuntu)&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: QT_QTOPENGL_LIBRARY (ADVANCED) &amp;quot;, try editing CMakeCache.txt and setting QT_QTOPENGL_LIBRARY:FILEPATH=/home/kde-devel/qt-copy/lib/libQtOpenGL.so&lt;br /&gt;
&lt;br /&gt;
* if you get messages as &amp;quot;KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.&amp;quot; then, either find the files containing the offending line and comment it out manually, or run the following script in ~/kde/src/KDE/kdebase: [http://www.plamadeala.com/files/macros_corrector.sh macros_corrector.sh]. It will just REMOVE the line that has &amp;quot;kde4_create_handbook&amp;quot; in it from all the found files.&lt;br /&gt;
*If you get an error (in ubuntu) concerning libxtst.so install the libxtst-dev package&lt;br /&gt;
* If you get the message &amp;quot;kdebase/workspace/kcontrol/kxkb/x11helper.cpp:131: error: ‘KGlobal’ has not been declared&amp;quot;, you might need to install libxklavier development packages.&lt;br /&gt;
&lt;br /&gt;
== Running KDE 4 programs ==&lt;br /&gt;
&lt;br /&gt;
You can now run KDE 4 programs (e.g. kwrite) by typing:&lt;br /&gt;
 ssh -X kde-devel@localhost&lt;br /&gt;
 kwrite &lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* If you get &lt;br /&gt;
 KUniqueApplication: Cannot find the D-Bus session server&lt;br /&gt;
check if you can access the display, e.g. type&lt;br /&gt;
 xclock&lt;br /&gt;
and see if a clock appears on the screen.&lt;br /&gt;
&lt;br /&gt;
* If you get something like&lt;br /&gt;
 Error: standard icon theme &amp;quot;oxygen&amp;quot; not found!&lt;br /&gt;
 &lt;br /&gt;
 ASSERT: &amp;quot;!isEmpty()&amp;quot; in file /home/kde-devel/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h, line 245&lt;br /&gt;
 Aborted (core dumped)&lt;br /&gt;
You need to install kdebase - see above. It is enough to install the &amp;quot;runtime&amp;quot; directory from kdebase.&lt;br /&gt;
&lt;br /&gt;
== Generating local API documentation ==&lt;br /&gt;
Although the API documentation for KDE is available online at [http://api.kde.org api.kde.org], it is sometimes useful to have it on your own disk, for example when you want to use [[Getting_Started/Set_up_KDE_4_for_development#KDevelop|KDevelop]] for browsing the documentation or when you are not able to be online all the time.&lt;br /&gt;
&lt;br /&gt;
Be aware that generating the API documentation can take several hours and takes almost half a gigabyte of diskspace.&lt;br /&gt;
The generation is handled by a script in {{path|kdelibs/doc/api}}, you need &amp;lt;tt&amp;gt;doxygen&amp;lt;/tt&amp;gt; to be able to run it. &lt;br /&gt;
&lt;br /&gt;
To build the API documentation for kdelibs, type the following:&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE/kdelibs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Repeat for other modules as desired.&amp;lt;br&amp;gt;&lt;br /&gt;
 cd &amp;lt;module home&amp;gt;&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Another, even easier method involves downloading this [[Doxyfile]] to your local system. Then simply change directory to where you want to create the documentation and run&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
% doxygen /path/to/Doxyfile&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Then review the file {{path|doxygen.log}} to see the doxygen errors and warnings. You'll find the actual documentation in the {{path|apidocs}} subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Staying up to date ==&lt;br /&gt;
&lt;br /&gt;
In order to keep the kde4 installation up to date, each of the modules installed should be updated periodically. As Monday is the day for big changes in kdelibs, Tuesday may be the best day to do this. For each module checked out, run &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs kdesupport # cs is not a typo&lt;br /&gt;
svn up&lt;br /&gt;
cb # cb is not a typo&lt;br /&gt;
make -j2 VERBOSE=1 &amp;amp;&amp;amp; make install&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a subset of a module ==&lt;br /&gt;
&lt;br /&gt;
Many modules in KDE contain a large number of programs which could take a long time to download and compile. In cases where you want to work only on a particular program or programs in a module, it is possible to download and compile particular folders. In some cases, certain folders are required for any build of the module. This is determined in the CMakeLists.txt file of the module. For example the [http://websvn.kde.org/trunk/KDE/kdegames/CMakeLists.txt?view=markup kdegames CMakeLists.txt file] lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
add_subdirectory(libkdegames)&lt;br /&gt;
add_subdirectory(libkmahjongg)&lt;br /&gt;
&lt;br /&gt;
macro_optional_add_subdirectory(doc)&lt;br /&gt;
macro_optional_add_subdirectory(lskat)&lt;br /&gt;
macro_optional_add_subdirectory(katomic)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, the libkdegames and libkmahjongg directories are required to build any of kdegames. The cmake directory will also usually be required. All the other directories (doc, katomic etc) are optional. They will be built if present on your machine. In this example, we build kmahjongg and kbattleship:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs KDE&lt;br /&gt;
svn co -N kdegames # The -N switch performs a non-recursive checkout&lt;br /&gt;
cd kdegames&lt;br /&gt;
svn up libkdegames # Get required directories&lt;br /&gt;
svn up libkmahjongg&lt;br /&gt;
svn up cmake&lt;br /&gt;
svn up kbattleship # Get optional directories&lt;br /&gt;
svn up kmahjongg&lt;br /&gt;
cmakekde &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
What can happen over time, after some &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; commands, is that some of the tools used in the KDE build chain change their output format. For example, &amp;lt;tt&amp;gt;kcfg&amp;lt;/tt&amp;gt; files are read by &amp;lt;tt&amp;gt;kconfig_compiler&amp;lt;/tt&amp;gt; to produce configuration dialogs. CMake cannot detect those changes, and the compilation might fail. A workaround is to always force a re-generation of all such files:&lt;br /&gt;
 find $KDE_SRC/KDE/kdebase -name &amp;quot;*.kcfg&amp;quot; | xargs touch&lt;br /&gt;
The same applies to &amp;lt;tt&amp;gt;ui&amp;lt;/tt&amp;gt; files as produced by Qt designer.&lt;br /&gt;
&lt;br /&gt;
=== Locked sessions ===&lt;br /&gt;
When installing KDE 4 as a user, one will not be able to unlock a locked session. To work around this issue you can either:&lt;br /&gt;
 su&lt;br /&gt;
 chown root.root $KDEDIR/bin/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/bin/kcheckpass&lt;br /&gt;
&lt;br /&gt;
== Success! ==&lt;br /&gt;
&lt;br /&gt;
You are now ready to start building other svn modules in the same fashion as you built kdebase, running and testing KDE4 or writing your own patches and applications.&lt;br /&gt;
&lt;br /&gt;
See the [[Getting Started/Set up KDE 4 for development|Set up KDE 4 for development]] tutorial for how to start KDE 4 applications and how to use KDevelop to work on them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Build KDE]]&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4</id>
		<title>Getting Started/Build/KDE4</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4"/>
				<updated>2007-11-07T17:42:18Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: /* Kubuntu and Debian */  Added libgpgme11-dev and libboost-dev to gutsy packages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/KDE4}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Getting Started|&lt;br /&gt;
&lt;br /&gt;
name=Building KDE4 From Source|&lt;br /&gt;
&lt;br /&gt;
pre=[[../../Sources/Anonymous_SVN|Anonymous SVN Quickstart Guide]]|&lt;br /&gt;
&lt;br /&gt;
next=[[../../Set_up_KDE_4_for_development|Set up KDE 4 for development]]|&lt;br /&gt;
&lt;br /&gt;
reading=[http://kdesvn-build.kde.org/ kdesvn-build: The KDE From Subversion Build Tool]&amp;lt;br&amp;gt;[[../../Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&amp;lt;br&amp;gt;[[Development/Tutorials/CMake |Introduction to CMake]]&amp;lt;br&amp;gt;[[../KDE4/FreeBSD|FreeBSD notes]]&amp;lt;br&amp;gt;[[../KDE4/Mac OS X|Instructions for Mac OS X]]&amp;lt;br&amp;gt;[[../KDE4/Windows|Instructions for MS Windows]]|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This tutorial shows one way to get KDE from trunk running on Linux/BSD systems. There are also tutorials for [[/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[/Mac OS X|Mac OS X]] and [http://solaris.kde.org/ Solaris]. Throughout the tutorial the bash shell is used.&lt;br /&gt;
&lt;br /&gt;
{{warning|Expect a higher risk of build failure '''on Mondays''' when most kdelibs changes are committed. [http://developer.kde.org/~dirk/dashboard/ Dashboard] reports unexpected breakages. You are encouraged to fix failing modules.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The following must be installed first before you can successfully complete this tutorial:&lt;br /&gt;
* gcc and g++, preferably version 4.2 or higher&lt;br /&gt;
* svn, the subversion revision control client&lt;br /&gt;
* pkg-config&lt;br /&gt;
* development libraries and headers for X11, OpenGL (mesa-common-dev and libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 and libxslt&lt;br /&gt;
* the &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, which is part of kdesdk. You can install it as part of kdesdk (kdesdk-scripts on Debian) or similar package, or just download it itself from [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* the [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], which is the freedesktop MIME standard KDE is using now&lt;br /&gt;
* [http://boost.org/ boost], needed by kdebase; after compiling and/or installing boost, in order to make cmake aware about its location (FindBoost),  add boost directory (the one containing include subdirectory) to CMAKE_INCLUDE_PATH or set an environment variable called BOOST_ROOT pointing to boost directory.&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
In Ark Linux, the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy devel-core libxml-devel libxslt-devel bzip2-devel \&lt;br /&gt;
clucene-core-devel librdf-devel shared-mime-info xorg-Mesa-libGL-devel \&lt;br /&gt;
subversion boost-devel doxygen giflib-devel dbus-devel openssl-devel \&lt;br /&gt;
alsa-lib-devel kdesdk-scripts qt4-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mission Control.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus and Qt - you can skip steps 5, 6 and 7.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Some of the required packages for building KDE4 on Fedora 7 or higher:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
yum install clucene-core-devel libxml-devel libxslt-devel \&lt;br /&gt;
dbus-devel boost-devel bzip2-devel openssl-devel alsa-lib-devel \&lt;br /&gt;
redland-devel rasqal-devel raptor-devel hspell-devel aspell-devel \&lt;br /&gt;
cups-devel xine-lib-devel avahi-devel gamin-devel OpenEXR-devel \&lt;br /&gt;
enchant-devel jasper-devel ilmbase-devel pcre-devel gpgme-devel \&lt;br /&gt;
libxklavier-devel glib-devel libusb-devel libsmbclient-devel \&lt;br /&gt;
libxcb-devel NetworkManager-devel lm_sensors-devel libraw1394-devel \&lt;br /&gt;
bluez-libs-devel &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - It may be simpler to spin RPMs. Note that you can edit the variables in /etc/rpm/macros.kde4 (which is provided by Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
The build stage then looks like:&lt;br /&gt;
&lt;br /&gt;
%build&lt;br /&gt;
&lt;br /&gt;
mkdir -p %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
pushd %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
%{cmake_kde4} ..&lt;br /&gt;
&lt;br /&gt;
popd&lt;br /&gt;
&lt;br /&gt;
make %{?_smp_mflags} -C %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
I have had better results with creating a kdesupport rpm which means that you should not install the soprano and strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu and Debian ===&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.04 (Feisty) and Debian (Testing/Unstable) the build dependencies you need are installed with:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential cdbs debhelper cmake \&lt;br /&gt;
libxml2-dev libxslt1-dev libbz2-dev libclucene-dev librdf-dev \&lt;br /&gt;
shared-mime-info libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \&lt;br /&gt;
libxext-dev libjpeg-dev libpng-dev subversion libsm-dev libxinerama-dev \&lt;br /&gt;
libxrender-dev libfontconfig-dev libboost-dev libxcursor-dev doxygen \&lt;br /&gt;
libungif4-dev libdbus-1-dev libssl-dev libgpgme11-dev \&lt;br /&gt;
libasound2-dev kdesdk-scripts libpth-dev libjasper-dev \&lt;br /&gt;
ssh libxine-dev libqimageblitz-dev libqimageblitz4 libglib2.0-dev \&lt;br /&gt;
libxkbfile-dev libenchant-dev libbluetooth-dev network-manager-dev \&lt;br /&gt;
libsmbclient-dev libxcb1-dev libcaptury-dev libxcomposite-dev \&lt;br /&gt;
libxdamage-dev libusb-dev libgpgme11-dev libldap2-dev &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.10 (Gutsy) and Debian unstable you have to add:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install dbus-x11  libqt4-dev libqca2-dev libeigen-dev \&lt;br /&gt;
libstreamanalyzer-dev libsoprano-dev libstrigiqtdbusclient-dev \ &lt;br /&gt;
libxklavier11-dev libxml2-utils libdbus-1-dev libxslt1-dev cmake libbz2-dev \&lt;br /&gt;
libungif4-dev libgpgme11-dev libboost-dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided in these packages. Skip down to the [[#kdelibs|kdelibs section]] and continue from there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a fully functional API documentation framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
In openSUSE 10.2 and newer, you can install packages using [http://en.opensuse.org/Zypper Zypper]:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
sudo zypper install &amp;lt;package-name&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In older releases of SUSE, you can use YaST:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
yast -i &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Required Packages'''&lt;br /&gt;
&lt;br /&gt;
The packages you will need to install are:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
xorg-x11-devel&lt;br /&gt;
libxml2-devel &lt;br /&gt;
kdesdk3 &lt;br /&gt;
clucene-core-devel &lt;br /&gt;
boost-devel&lt;br /&gt;
libjpeg-devel &lt;br /&gt;
liblrdf-devel &lt;br /&gt;
libpng-devel &lt;br /&gt;
libxslt-devel &lt;br /&gt;
libredland-devel&lt;br /&gt;
Mesa-devel &lt;br /&gt;
giflib-devel &lt;br /&gt;
subversion &lt;br /&gt;
gcc &lt;br /&gt;
gcc-c++&lt;br /&gt;
gmp-devel (needed to build kdesupport)&lt;br /&gt;
gpgme-devel (needed to build kdepimlibs)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Optional Packages'''&lt;br /&gt;
&lt;br /&gt;
You can skip the manual and painful installation kdesupport and its dependencies ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano and other Nepomuk dependencies) by adding the KDE:KDE4 repository from&lt;br /&gt;
the [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] to your installation sources. &lt;br /&gt;
&lt;br /&gt;
For openSUSE 10.2 and newer do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo zypper service-add http://software.opensuse.org/download/KDE:/KDE4/openSUSE_10.2 KDE4-102&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For older versions of SUSE Linux do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
installation_sources -a http://software.opensuse.org/download/KDE:/KDE4/[YOUR SUSE LINUX VERSION]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now install the following packages:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cmake&lt;br /&gt;
dbus-1-devel&lt;br /&gt;
libqt4-devel&lt;br /&gt;
libqca2-devel&lt;br /&gt;
libsoprano-devel&lt;br /&gt;
libqimageblitz-devel&lt;br /&gt;
strigi&lt;br /&gt;
strigi-ui&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot more packages that are needed to satisfy the config-check, such as libusb-devel, bison etc., so look out for the config notifications and install accordingly. Please remember to skip any instructions that refer to kdesupport below. Start to compile with kdelibs. &lt;br /&gt;
&lt;br /&gt;
And for fully functional apidox framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CMake binary packages for openSUSE are available from the KDE:KDE4 repository as well as from the [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Install by hand ====&lt;br /&gt;
&lt;br /&gt;
You can use stable ebuilds just remember to sync your portage before you begin.&lt;br /&gt;
&lt;br /&gt;
Remember: All commands are executed as root.&lt;br /&gt;
&lt;br /&gt;
Required:&lt;br /&gt;
&lt;br /&gt;
We need to allow the following keyword masked ebuilds.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-util/cmake' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
echo 'dev-cpp/clucene' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the berkdb USE flag for redland, otherwise nepomuk won't work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-libs/redland berkdb' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the packages you will need to emerge, I included the update option into the emerge command so you will not re-emerge anything that you might already have installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -avu 'sys-devel/gcc' \&lt;br /&gt;
  'dev-util/subversion' \&lt;br /&gt;
  'dev-util/pkgconfig'  \&lt;br /&gt;
  'x11-base/xorg-x11' \&lt;br /&gt;
  'virtual/glut' \&lt;br /&gt;
  'media-libs/mesa' \&lt;br /&gt;
  'media-libs/jpeg' \&lt;br /&gt;
  'media-libs/libpng' \&lt;br /&gt;
  'media-libs/giflib' \&lt;br /&gt;
  'dev-cpp/clucene' \&lt;br /&gt;
  'dev-util/cppunit' \&lt;br /&gt;
  'media-libs/liblrdf' \&lt;br /&gt;
  'dev-libs/libxml2' \&lt;br /&gt;
  'dev-libs/libxslt' \&lt;br /&gt;
  'x11-misc/shared-mime-info' \&lt;br /&gt;
  'dev-libs/boost' \&lt;br /&gt;
  'dev-util/cmake' \&lt;br /&gt;
  'dev-libs/redland' \&lt;br /&gt;
  'sys-apps/dbus' \&lt;br /&gt;
  'sys-apps/hal' \&lt;br /&gt;
  'x11-libs/qt'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You will also need to emerge either 'kde-base/kdesdk' or kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
If you emerged DBUS, CMAKE, QT or HAL you may skip those sections respectively.&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
==== Install via portage ====&lt;br /&gt;
&lt;br /&gt;
Also you can install the KDE 4 packages directly via &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -a &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the things you need, [http://gentoo-wiki.com/TIP_Overlays#Layman install layman] and then pull in the &amp;quot;kde&amp;quot; overlay (which contains experimental KDE ebuilds): &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
layman -a kde&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
After this you need to adjust some USE-flags for KDE 4 and tell portage to use the testing KDE 4 ebuilds instead of the stable KDE 3 ones. &lt;br /&gt;
&lt;br /&gt;
That way portage will do the dependency tracking for you. &lt;br /&gt;
&lt;br /&gt;
Detailed instructions on building KDE 4 in Gentoo via portage can be found in the [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. They are discussed in the thread [http://forums.gentoo.org/viewtopic-t-530111-postdays-0-postorder-asc-start-0.html KDE 4 monolithic ebuilds].&lt;br /&gt;
&lt;br /&gt;
=== Mandriva ===&lt;br /&gt;
In Mandriva the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
urpmi gcc-c++ cmake libxml2-devel libbzip2_1-devel \&lt;br /&gt;
libclucene0-devel liblrdf2-devel libmesagl1-devel \&lt;br /&gt;
subversion doxygen libdbus-1_3-devel libopenssl0.9.8-devel \&lt;br /&gt;
libalsa2-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're running 64-bit environment you should replace all packages starting with &amp;quot;lib...&amp;quot; to &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus - you can skip steps 5 and 6.&lt;br /&gt;
&lt;br /&gt;
== Create a user account for KDE4 development ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Some people like to have a separate user account for KDE 4 (for instance an old bug deleted files by mistake), and the instructions below were written with that approach.&lt;br /&gt;
&lt;br /&gt;
However it is much more efficient to do everything with a single user account, see [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&lt;br /&gt;
for more details. &lt;br /&gt;
&lt;br /&gt;
You can still follow the instructions below, but don't put the environment variables in your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, put them in a separate file that you source to switch to the KDE 4 environment.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Command Line ===&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
useradd -m kde-devel&lt;br /&gt;
passwd kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Using KControl ===&lt;br /&gt;
&lt;br /&gt;
Instead of using the commands above, you can also use the User module in the KDE Control Center if you already have KDE3 installed.&lt;br /&gt;
&lt;br /&gt;
=== Setting up the environment ===&lt;br /&gt;
&lt;br /&gt;
Copy the {{path|~/.bashrc}} from your normal user account to the new kde-devel account. Next, copy and paste the contents of the [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|example .bashrc]] into {{path|~kde-devel/.bashrc}}. Be sure to comment out the line &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; if you do not have the &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt; command available. You will probably also want to modify the path to make sure it doesn't include your kde3 paths. Also if you want to use KDevelop to develop KDE 4 applications you may pass the ''-GKDevelop3'' flag to the ''cmake'' command (to make CMake generate KDevelop project files, it will help to avoid rebuilding in the future, see [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|this]]).  &lt;br /&gt;
To make it run, you have to open a new bash or to execute &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will provide access to commands such as &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; that are used in this tutorial as well as ensure that the proper paths are in place for Qt, KDE and CMake binaries.&lt;br /&gt;
&lt;br /&gt;
For more information, please read the [[Getting Started/Increased Productivity in KDE4 with Scripts]] tutorial.&lt;br /&gt;
&lt;br /&gt;
=== Switching to the New User ===&lt;br /&gt;
Switch to the user kde-devel: (don't forget the dash)&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
ssh -X kde-devel@localhost&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If the ssh command fails, check out the [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] section of the [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== The development user's shell ==&lt;br /&gt;
&lt;br /&gt;
On some systems a new user is configured by default to use {{path|/bin/sh}}. If this is not the case on your system, you can skip this section. Using {{path|/bin/sh}} can be very inconvenient to work with and you may want to change it to {{path|/bin/bash}} or another shell.&lt;br /&gt;
On Ark Linux and Fedora, you can skip this step - {{path|/bin/sh}} is {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Option 1: As the kde-devel user ===&lt;br /&gt;
&lt;br /&gt;
If you don't have root privileges and your system supports the changing of your own shell with the &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt; application, then you could try to change your shell to {{path|/bin/bash}} by using:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
chsh -s /bin/bash kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: As the root user ===&lt;br /&gt;
&lt;br /&gt;
If your system comes with the &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; application you can run the following command as root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Another option is to use the &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; application as root to safely edit your {{path|/etc/passwd}}. Locate 'kde-devel' in the the file. Change '{{path|/bin/sh}}' at the end of the line to read '{{path|/bin/bash}}', save your changes and exit.&lt;br /&gt;
&lt;br /&gt;
The new shell will be started automatically when you log in as the kde-devel user again.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
QtDBus and KDE are known to work with D-Bus versions 0.62, as well as 0.92 and upwards. Versions 0.60 and 0.61 may work too but are not tested. Versions 0.90 and 0.91 are known not to work. We recommend using post-1.0 release versions (at least 0.94), so consider upgrading if you haven't done so.&lt;br /&gt;
&lt;br /&gt;
You may skip this section if you have a recent D-Bus version or if you don't want to upgrade. You probably want to skip building the bindings until/unless you know you will be building HAL (see below).&lt;br /&gt;
&lt;br /&gt;
Before running these steps in the recipe, make sure your X11 headers and libraries are available. The configure script run on line 5 of the following instructions should output:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Make sure you did set up your environment correctly as described [[Getting_Started/Build/KDE4#Setting_up_the_environment|above]]. This is necessary for the &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; functions to work.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]] &lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz&lt;br /&gt;
 tar -xvzf dbus-1.0.2.tar.gz&lt;br /&gt;
 cd dbus-1.0.2/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR --localstatedir=/var&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo dbus-uuidgen --ensure&lt;br /&gt;
&lt;br /&gt;
 cs # see above&lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.74.tar.gz&lt;br /&gt;
 tar -xvzf dbus-glib-0.74.tar.gz&lt;br /&gt;
 cd dbus-glib-0.74/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 cb&lt;br /&gt;
 sudo chown -R kde-devel:kde-devel *&lt;br /&gt;
&lt;br /&gt;
=== What's Happening === &lt;br /&gt;
After changing into the source directory (line 1), D-Bus source code is downloaded from freedesktop.org (line 2) and unpacked (line 3). After going into the newly created D-Bus directory (line 4), the build is set up using the supplied {{path|configure}} script (line 5). After building (line 6) and installing (line 7) D-Bus, we use the &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; tool to install a machine identification file that allows the bus to start automatically when the desktop session starts (line 8).&lt;br /&gt;
&lt;br /&gt;
Note that you need write access to {{path|/var}} for the last two steps. If your system does not have the sudo command, you can use the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; command instead, e.g. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The steps for building the glib bindings are similar to the above.&lt;br /&gt;
&lt;br /&gt;
When these two packages are done building, we must fix the file ownership because 'sudo make install' has created root owned files and directories in ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Skip this if you have [http://cmake.org/ CMake] &amp;gt;=2.4.5 installed. &lt;br /&gt;
You should be able to directly use the binary packages available on the [http://www.cmake.org/HTML/Download.html CMake site]. There are also distribution specific packages available.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click Here to learn more]] &lt;br /&gt;
 wget http://www.cmake.org/files/v2.4/cmake-2.4.6.tar.gz&lt;br /&gt;
 tar -zxf cmake-2.4.6.tar.gz&lt;br /&gt;
 mkdir cmake-build&lt;br /&gt;
 cd cmake-build &lt;br /&gt;
 ../cmake-2.4.6/bootstrap&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
First, we go back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's source directory (line 1), get the CMake sources (line 2) and unpack them (line 3). We create a directory to build CMake in (line 4) and go into it (line 5). We then run the CMake bootstrap script to set up the CMake build (line 6), then make (line 7) and install it (line 8) using the root user.&lt;br /&gt;
&lt;br /&gt;
If your system does not have the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; command, you can instead do &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Qt ==&lt;br /&gt;
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. You should use the copy in the KDE Subversion servers. (note: some distros, like Debian or openSUSE, tend to supply Qt with patches from KDE svn applied, so you may want to cheat and use precompiled Qt from your distro, because they will work just as well). KDE tries to guarantee that the source is compileable with a plain, unpatched Qt 4.3.0, but you might get additional bugfixes by using qt-copy (however, usually your distribution takes care of backporting necessary bugfixes so overall you're most likely better off with sticking to the distro provided one if it is recent enough). Refer to the distribution specific sections above for more information. &lt;br /&gt;
&lt;br /&gt;
As for now Qt3 compatibility layer in Qt 4 is mandatory, so please &amp;lt;b&amp;gt;avoid&amp;lt;/b&amp;gt; using &amp;quot;-no-qt3support&amp;quot; option when building Qt4 from sources.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd # Note: qt-copy lives in $HOME/qt-copy. See $QTDIR in [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|&amp;lt;font color=red&amp;gt;.bashrc&amp;lt;/font&amp;gt;]] &lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/qt-copy&lt;br /&gt;
 cd qt-copy&lt;br /&gt;
 ./apply_patches&lt;br /&gt;
 ./configure -qt-gif -no-exceptions -debug -fast \&lt;br /&gt;
  -prefix $QTDIR -nomake examples -nomake demos&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
 # if we don't install, we'll just clear obj files to&lt;br /&gt;
 # save disk space&lt;br /&gt;
 if [ $QTDIR = `pwd` ]; then \&lt;br /&gt;
 find . -name '*.o' -delete ; \&lt;br /&gt;
 else make install; fi;&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We switch back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's home directory (line 1) and download the source code using subversion (svn) from KDE's repository (line 2). After changing into the resulting {{path|qt-copy}} directory (line 3), we run a script that manages the patches that come with &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (line 4). &lt;br /&gt;
&lt;br /&gt;
Once the patches have been applied, we then set up the build using the &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script (line 5-6). The various command line options used are explained in the {{path|qt-copy/README.qt-copy}} file. Finally, we build the minimal requirements for KDE (line 7) and install (line 10) Qt. If install dir is the same as the current dir (line 8), then we just free some space (line 9) instead. If you want all the example and demo applications, you can either build them individually or simply do a &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; from the {{path|qt-copy}} directory. &lt;br /&gt;
&lt;br /&gt;
Note that the installation does not require root as it installs Qt locally into {{path|$QTDIR}}. Anyway, installation is only needed if {{path|$QTDIR}} differs from {{path|$HOME/qt-copy}}, which is not the case if you have exactly followed the instructions.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &amp;quot;error: X11/Xlib.h: No such file or directory&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;xorg&amp;lt;/tt&amp;gt; (the actual name may vary between operating systems, for example it is &amp;lt;tt&amp;gt;xorg-dev&amp;lt;/tt&amp;gt; on Ubuntu based systems such as Kubuntu). &lt;br /&gt;
&lt;br /&gt;
If you get an error in the configure step about missing defines, check the value of &amp;lt;tt&amp;gt;$QMAKESPEC&amp;lt;/tt&amp;gt;.  Some distributions set this to point directly to the system-installed Qt.  If &amp;lt;tt&amp;gt;unset QMAKESPEC&amp;lt;/tt&amp;gt; solves the problem, you probably want to add it to the &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
If you get an error &amp;quot;.pch/debug-shared/QtCore&amp;quot;, this is because Qt-4.3 enables precompiled headers if your gcc supports it, but for some reason it doesn't work for you. If you use distcc, configure qt with -no-pch. If you use icecream, update to the latest icecream from svn trunk.&lt;br /&gt;
&lt;br /&gt;
Try running any Qt program, like {{program|assistant}}. '''Note:''' You may need to run &amp;lt;tt&amp;gt;xhost +local:kde-devel&amp;lt;/tt&amp;gt; as your regular kde3 user to run this application.  If it crashes in QSpanData::adjustSpanMethods, then your problem is the oxygen style. Try removing {{path|lib/kde4/plugins/styles/kstyle-oxygen.so}} and {{path|lib/kde4/plugins/styles/oxygen.so}} if they exist in the KDE install prefix.&lt;br /&gt;
&lt;br /&gt;
== HAL ==&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use qdbusviewer to see if you have org.freedesktop.hal. If not, you might need a newer version of hal. If you have org.freedesktop.hal, you probably don't need to, and don't ''want'' to, roll your own HAL.}}&lt;br /&gt;
&lt;br /&gt;
If your system requires you to build a newer version of HAL, there's a decent chance you'll need to build other stuff as well, some of which may not be straight forward. Since this should only be required for older distros, instructions are on [[Getting_Started/Build/HAL| a separate page]].&lt;br /&gt;
&lt;br /&gt;
== kdesupport ==&lt;br /&gt;
&lt;br /&gt;
{{warning|Don't forget to read the [[Getting_Started/Build/KDE4#Setting_up_the_environment|Setting Up The Environment]] section first.}}&lt;br /&gt;
&lt;br /&gt;
There are several libraries that KDE applications rely on in the kdesupport module. This includes Strigi and Soprano for file metadata and search, QImageBlitz for image manipulation needed in kdebase, eigen for visual effects in applications such as Kalzium, taglib for music players and qca for some cryptographic needs. &lt;br /&gt;
&lt;br /&gt;
Strigi itself has a few dependencies as well: you will need the libraries and headers for libz, libbz2, openssl (libcrypto or libssl), libclucene (&amp;gt;=0.9.16a but watch out: version 0.9.17 does '''not''' work), and either libxml2 or libexpat.&lt;br /&gt;
&lt;br /&gt;
Please remember that if you use openSUSE, you can install the needed packages from the KDE:KDE4 buildservice repository and do not have to bother with fiddling the details below. Skip to the kdelibs section. &lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/&lt;br /&gt;
 cd kdesupport&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1). We download the sources in kdesupport using subversion (line 2), go into the new {{path|~/kde/src/kdesupport}} directory (line 3), and commence the build (line 4). This will leave us in the kdesupport build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &lt;br /&gt;
   cmakekde: command not found&lt;br /&gt;
then you have to go manualy into the kdesupport directory in ~ and execute the command cmakekde. if this still doesnt work, then something is wrong with your bashrc.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: This project requires some variables to be set,&lt;br /&gt;
 and cmake can not find them.&lt;br /&gt;
 Please set the following variables:&lt;br /&gt;
 LIBXML2_INCLUDE_DIR (ADVANCED)&lt;br /&gt;
you should install the development package for libxml2.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: Could NOT find REDLAND&lt;br /&gt;
then you need librdf from the Redland.&lt;br /&gt;
If your distribution does not provide the librdf package, you can download the source there: [http://download.librdf.org/source/ http://download.librdf.org/source/] and build it.&lt;br /&gt;
(Gentoo users: The ebuild for librdf is named dev-libs/redland)&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 Fetching external item into 'kdesupport/admin'&lt;br /&gt;
 Error validating server certificate for 'https://...'&lt;br /&gt;
see [http://techbase.kde.org/Getting_Started/Sources/Using_Subversion_with_KDE Using Subversion with KDE]&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 FILE cannot create directory: /usr/lib[64]/qt4/plugins/crypto. Maybe need administrative privileges.&lt;br /&gt;
 &lt;br /&gt;
 make: *** [install] Error 255&lt;br /&gt;
take a second look in the .bashrc file described above, are paths correct?  Alternatively, you may see this error if you decided to use a distribution installed version of qt4 and skipped the Qt install above.  Either install qt-copy as describe above, or &amp;quot;sudo make install&amp;quot;. If you use &amp;quot;sudo make install&amp;quot;, make sure you that you change the ownership back to your user for some of the ~/kde subdirectories that were effected by using sudo (ie. &amp;quot;&amp;lt;tt&amp;gt;sudo chown -R kde-devel:kde-devel ~/kde&amp;lt;/tt&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you get a message related to &lt;br /&gt;
   target libQtTest.so not found&lt;br /&gt;
you may need to recompile qt-copy. This time you should take out&lt;br /&gt;
   -nomake demos -nomake examples&lt;br /&gt;
from the configure command, so that Qt generates library QtTest.&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
&lt;br /&gt;
We can now move on to building KDE's base libraries.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd   &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 mkdir KDE &amp;amp;&amp;amp; cd KDE&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs&lt;br /&gt;
 cd kdelibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1) then make and go into the KDE directory (line 2). We download the sources for kdelibs using subversion (line 3), go into the new {{path|~/kde/src/KDE/kdelibs}} directory (line 4), and commence the build (line 5). This will leave us in the &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
{{tip|There might be missing dependencies on your system! They are easily overlooked in the output of &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You might want to do a &amp;lt;tt&amp;gt;cmake $KDE_SRC/KDE/MODULE_NAME&amp;lt;/tt&amp;gt; prior to compiling any kde modules (like kdelibs, kdepimlibs etc.)}}&lt;br /&gt;
&lt;br /&gt;
=== Additional KDE-specific CMake modules ===&lt;br /&gt;
There are additional CMake modules in {{path|kdelibs/cmake/modules/}} that are necessary for building KDE4 applications. These will be installed for you when  kdelibs itself is installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have problems compiling kdelibs, first make sure the software in the [[Getting_Started/Build/KDE4#Required_Software|Required Software]] section above is installed and works. Other possible hints include:&lt;br /&gt;
* If the &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; command fails stating that CMake requires an out of source build directory, remove {{path|~/kde/src/KDE/kdelibs/CMakeCache.txt}}, and try again.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; still gives the same error then try this &lt;br /&gt;
 cd&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR \&lt;br /&gt;
 -DCMAKE_BUILD_TYPE=debugfull \&lt;br /&gt;
 -DKDE4_BUILD_TESTS=ON \&lt;br /&gt;
 ~/kde/src/KDE/kdelibs&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
* If you received an error stating &amp;quot;Please create a separate build directory and run 'cmake path_to_kdelibs [options]' there.&amp;quot;, then you need to change to your build directory before running cmakekde. (e.g &amp;lt;tt&amp;gt;cs KDE/kdelibs &amp;amp;&amp;amp; cb &amp;amp;&amp;amp; cmakekde&amp;lt;/tt&amp;gt;) If the message stays, run 'svn status' in the kdelibs directory and remove all files labeled with '?'.&lt;br /&gt;
* If Qt wasn't found or the wrong version of Qt was found, make sure that the qmake from the Qt you need is the first qmake in the path.&lt;br /&gt;
* If qmake wasn't found and you are using Debian packages, /usr/bin/qmake probably points to a wrong qmake version. To fix this run as root:&lt;br /&gt;
 update-alternatives --config qmake&lt;br /&gt;
* If the problems persist, try the CMake make-option &amp;lt;tt&amp;gt;--keep-going&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Here you need the libungif library, otherwise you will get an error message like &amp;quot;&amp;lt;tt&amp;gt;Could NOT find GIF&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
* Qt-4.3 upgrade: if you get a link error in kjsembed talking about QScriptEngine, edit CMakeCache.txt in kdelibs and remove the lines that talk about QT_QTUITOOLS_LIBRARY, then type make again (that static library has a new dependency, and the cmake code that adds it needs to run).&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;CMake Error: KDE Requires Qt to be built with SSL support&lt;br /&gt;
&amp;lt;/code&amp;gt;, install openssl-devel, remove CMakeCache.txt and re-compile QT.&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;kdelibs/kimgio/ico.cpp:188: undefined reference to `QImage::jumpTable()'&amp;lt;/code&amp;gt; it means you compiled QT without QT3 support(no, linking to a true QT3 install won't work)&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
After &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt;, but before ''kdebase'', you need to build and install ''kdepimlibs''.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We go into the KDE source directory (line 1), download the source code for kdepimlibs using subversion (line 2) and then go into the new {{path|~/kde/src/KDE/kdepimlibs}} directory (line 3). We then commence the build (line 4). This will leave us in the &amp;lt;tt&amp;gt;kdepimlibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have trouble compiling kdepimlibs:&lt;br /&gt;
* the cmakekde command may require a later version of the gpgme library.  This is available from the project's web site: http://www.gnupg.org/(en)/download/index.html - please note that the build of gpgme also requires libgpg-error, also available from the same location.  Both libraries are installed by the &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot; sequence, with the gpgme library configured with the additional &amp;quot;--with-gpg-error-prefix&amp;quot; parameter.  You may need to overwrite your existing &amp;quot;/usr/bin/gpgme-config&amp;quot; file with the newer version for the kdepimlibs to pick up the new install.&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
kdebase is divided into three parts:&lt;br /&gt;
* '''apps'''&lt;br /&gt;
:This contains applications like Dolphin or KWrite.&lt;br /&gt;
* '''runtime'''&lt;br /&gt;
:This contains things needed by every application at runtime, like icons. It is a required dependency for each KDE application, so you have to compile and install this.&lt;br /&gt;
* '''workspace'''&lt;br /&gt;
:This contains things specific to the KDE desktop, like Plasma or the window manager. Most stuff here depends on X11. You only need it if you want to build a full KDE desktop.&lt;br /&gt;
&lt;br /&gt;
You can build all of kdebase at once, which is described in the recipe below. If you only want to build kdebase-runtime, which is the only requirement, you can replace &amp;lt;code bash&amp;gt;cd kdebase&amp;lt;/code&amp;gt; with &amp;lt;code bash&amp;gt;cd kdebase/runtime&amp;lt;/code&amp;gt; in the recipe below.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase&lt;br /&gt;
 cd kdebase&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have troubles compiling kdebase:&lt;br /&gt;
* Make sure you have the &amp;lt;tt&amp;gt;libxss headers&amp;lt;/tt&amp;gt; installed. (Usually you got undefined references on xscreensaver objects if you do not have those headers)&lt;br /&gt;
* &amp;lt;tt&amp;gt;which meinproc&amp;lt;/tt&amp;gt; has to deliver {{path|/home/kde-devel/kde/bin/meinproc}}&lt;br /&gt;
* if cmakekde can not find the path of kdepimlibs, edit the file {{path|$KDE_BUILD/KDE/kdebase/CMakeCache.txt}} and manually set &amp;lt;tt&amp;gt;KDEPIMLIBS_INCLUDE_DIR:PATH=$KDE_BUILD/kdepimlibs&amp;lt;/tt&amp;gt;&lt;br /&gt;
* if you get an error saying &amp;quot;Please set the following variables: X11_XTest_LIB (ADVANCED)&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;Xtst&amp;lt;/tt&amp;gt;. On some systems, this is packaged separately from &amp;lt;tt&amp;gt;xext&amp;lt;/tt&amp;gt; and called &amp;lt;tt&amp;gt;x11proto-xext-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;libxtst-dev&amp;lt;/tt&amp;gt;. You may also need to remove the CMakeCache.txt file in the build dir after installing the package.&lt;br /&gt;
* the same for &amp;quot;X11_Xinerama_LIB (ADVANCED)&amp;quot; where you will need the devel package for &amp;lt;tt&amp;gt;xinerama&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* if you get an error complaining about a missing variable X11_Xrandr_LIB, you need the devel package for libxrandr (libxrandr-devel on ubuntu-systems)&lt;br /&gt;
* if you get the error &amp;quot;Please set the following variables: FONTCONFIG_INCLUDE_DIR, FONTCONFIG_LIBRARIES (ADVANCED)&amp;quot;, then you need to install  the libfontconfig headers&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: KMETADATA_LIBRARIES&amp;quot;, you need to install soprano from kdesupport and to rebuild kdelibs&lt;br /&gt;
* if you get the error &amp;quot;‘XserverRegion’ does not name a type&amp;quot; make sure you have libxcomposite headers installed (&amp;lt;tt&amp;gt;libxcomposite-dev&amp;lt;/tt&amp;gt; in ubuntu)&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: QT_QTOPENGL_LIBRARY (ADVANCED) &amp;quot;, try editing CMakeCache.txt and setting QT_QTOPENGL_LIBRARY:FILEPATH=/home/kde-devel/qt-copy/lib/libQtOpenGL.so&lt;br /&gt;
&lt;br /&gt;
* if you get messages as &amp;quot;KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.&amp;quot; then, either find the files containing the offending line and comment it out manually, or run the following script in ~/kde/src/KDE/kdebase: [http://www.plamadeala.com/files/macros_corrector.sh macros_corrector.sh]. It will just REMOVE the line that has &amp;quot;kde4_create_handbook&amp;quot; in it from all the found files.&lt;br /&gt;
*If you get an error (in ubuntu) concerning libxtst.so install the libxtst-dev package&lt;br /&gt;
* If you get the message &amp;quot;kdebase/workspace/kcontrol/kxkb/x11helper.cpp:131: error: ‘KGlobal’ has not been declared&amp;quot;, you might need to install libxklavier development packages.&lt;br /&gt;
&lt;br /&gt;
== Running KDE 4 programs ==&lt;br /&gt;
&lt;br /&gt;
You can now run KDE 4 programs (e.g. kwrite) by typing:&lt;br /&gt;
 ssh -X kde-devel@localhost&lt;br /&gt;
 kwrite &lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* If you get &lt;br /&gt;
 KUniqueApplication: Cannot find the D-Bus session server&lt;br /&gt;
check if you can access the display, e.g. type&lt;br /&gt;
 xclock&lt;br /&gt;
and see if a clock appears on the screen.&lt;br /&gt;
&lt;br /&gt;
* If you get something like&lt;br /&gt;
 Error: standard icon theme &amp;quot;oxygen&amp;quot; not found!&lt;br /&gt;
 &lt;br /&gt;
 ASSERT: &amp;quot;!isEmpty()&amp;quot; in file /home/kde-devel/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h, line 245&lt;br /&gt;
 Aborted (core dumped)&lt;br /&gt;
You need to install kdebase - see above. It is enough to install the &amp;quot;runtime&amp;quot; directory from kdebase.&lt;br /&gt;
&lt;br /&gt;
== Generating local API documentation ==&lt;br /&gt;
Although the API documentation for KDE is available online at [http://api.kde.org api.kde.org], it is sometimes useful to have it on your own disk, for example when you want to use [[Getting_Started/Set_up_KDE_4_for_development#KDevelop|KDevelop]] for browsing the documentation or when you are not able to be online all the time.&lt;br /&gt;
&lt;br /&gt;
Be aware that generating the API documentation can take several hours and takes almost half a gigabyte of diskspace.&lt;br /&gt;
The generation is handled by a script in {{path|kdelibs/doc/api}}, you need &amp;lt;tt&amp;gt;doxygen&amp;lt;/tt&amp;gt; to be able to run it. &lt;br /&gt;
&lt;br /&gt;
To build the API documentation for kdelibs, type the following:&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE/kdelibs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Repeat for other modules as desired.&amp;lt;br&amp;gt;&lt;br /&gt;
 cd &amp;lt;module home&amp;gt;&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Another, even easier method involves downloading this [[Doxyfile]] to your local system. Then simply change directory to where you want to create the documentation and run&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
% doxygen /path/to/Doxyfile&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Then review the file {{path|doxygen.log}} to see the doxygen errors and warnings. You'll find the actual documentation in the {{path|apidocs}} subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Staying up to date ==&lt;br /&gt;
&lt;br /&gt;
In order to keep the kde4 installation up to date, each of the modules installed should be updated periodically. As Monday is the day for big changes in kdelibs, Tuesday may be the best day to do this. For each module checked out, run &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs kdesupport # cs is not a typo&lt;br /&gt;
svn up&lt;br /&gt;
cb # cb is not a typo&lt;br /&gt;
make -j2 VERBOSE=1 &amp;amp;&amp;amp; make install&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a subset of a module ==&lt;br /&gt;
&lt;br /&gt;
Many modules in KDE contain a large number of programs which could take a long time to download and compile. In cases where you want to work only on a particular program or programs in a module, it is possible to download and compile particular folders. In some cases, certain folders are required for any build of the module. This is determined in the CMakeLists.txt file of the module. For example the [http://websvn.kde.org/trunk/KDE/kdegames/CMakeLists.txt?view=markup kdegames CMakeLists.txt file] lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
add_subdirectory(libkdegames)&lt;br /&gt;
add_subdirectory(libkmahjongg)&lt;br /&gt;
&lt;br /&gt;
macro_optional_add_subdirectory(doc)&lt;br /&gt;
macro_optional_add_subdirectory(lskat)&lt;br /&gt;
macro_optional_add_subdirectory(katomic)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, the libkdegames and libkmahjongg directories are required to build any of kdegames. The cmake directory will also usually be required. All the other directories (doc, katomic etc) are optional. They will be built if present on your machine. In this example, we build kmahjongg and kbattleship:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs KDE&lt;br /&gt;
svn co -N kdegames # The -N switch performs a non-recursive checkout&lt;br /&gt;
cd kdegames&lt;br /&gt;
svn up libkdegames # Get required directories&lt;br /&gt;
svn up libkmahjongg&lt;br /&gt;
svn up cmake&lt;br /&gt;
svn up kbattleship # Get optional directories&lt;br /&gt;
svn up kmahjongg&lt;br /&gt;
cmakekde &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
What can happen over time, after some &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; commands, is that some of the tools used in the KDE build chain change their output format. For example, &amp;lt;tt&amp;gt;kcfg&amp;lt;/tt&amp;gt; files are read by &amp;lt;tt&amp;gt;kconfig_compiler&amp;lt;/tt&amp;gt; to produce configuration dialogs. CMake cannot detect those changes, and the compilation might fail. A workaround is to always force a re-generation of all such files:&lt;br /&gt;
 find $KDE_SRC/KDE/kdebase -name &amp;quot;*.kcfg&amp;quot; | xargs touch&lt;br /&gt;
The same applies to &amp;lt;tt&amp;gt;ui&amp;lt;/tt&amp;gt; files as produced by Qt designer.&lt;br /&gt;
&lt;br /&gt;
=== Locked sessions ===&lt;br /&gt;
When installing KDE 4 as a user, one will not be able to unlock a locked session. To work around this issue you can either:&lt;br /&gt;
 su&lt;br /&gt;
 chown root.root $KDEDIR/bin/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/bin/kcheckpass&lt;br /&gt;
&lt;br /&gt;
== Success! ==&lt;br /&gt;
&lt;br /&gt;
You are now ready to start building other svn modules in the same fashion as you built kdebase, running and testing KDE4 or writing your own patches and applications.&lt;br /&gt;
&lt;br /&gt;
See the [[Getting Started/Set up KDE 4 for development|Set up KDE 4 for development]] tutorial for how to start KDE 4 applications and how to use KDevelop to work on them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Build KDE]]&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4</id>
		<title>Getting Started/Build/KDE4</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4"/>
				<updated>2007-11-07T17:16:30Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: /* Kubuntu and Debian */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/KDE4}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Getting Started|&lt;br /&gt;
&lt;br /&gt;
name=Building KDE4 From Source|&lt;br /&gt;
&lt;br /&gt;
pre=[[../../Sources/Anonymous_SVN|Anonymous SVN Quickstart Guide]]|&lt;br /&gt;
&lt;br /&gt;
next=[[../../Set_up_KDE_4_for_development|Set up KDE 4 for development]]|&lt;br /&gt;
&lt;br /&gt;
reading=[http://kdesvn-build.kde.org/ kdesvn-build: The KDE From Subversion Build Tool]&amp;lt;br&amp;gt;[[../../Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&amp;lt;br&amp;gt;[[Development/Tutorials/CMake |Introduction to CMake]]&amp;lt;br&amp;gt;[[../KDE4/FreeBSD|FreeBSD notes]]&amp;lt;br&amp;gt;[[../KDE4/Mac OS X|Instructions for Mac OS X]]&amp;lt;br&amp;gt;[[../KDE4/Windows|Instructions for MS Windows]]|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This tutorial shows one way to get KDE from trunk running on Linux/BSD systems. There are also tutorials for [[/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[/Mac OS X|Mac OS X]] and [http://solaris.kde.org/ Solaris]. Throughout the tutorial the bash shell is used.&lt;br /&gt;
&lt;br /&gt;
{{warning|Expect a higher risk of build failure '''on Mondays''' when most kdelibs changes are committed. [http://developer.kde.org/~dirk/dashboard/ Dashboard] reports unexpected breakages. You are encouraged to fix failing modules.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The following must be installed first before you can successfully complete this tutorial:&lt;br /&gt;
* gcc and g++, preferably version 4.2 or higher&lt;br /&gt;
* svn, the subversion revision control client&lt;br /&gt;
* pkg-config&lt;br /&gt;
* development libraries and headers for X11, OpenGL (mesa-common-dev and libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 and libxslt&lt;br /&gt;
* the &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, which is part of kdesdk. You can install it as part of kdesdk (kdesdk-scripts on Debian) or similar package, or just download it itself from [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* the [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], which is the freedesktop MIME standard KDE is using now&lt;br /&gt;
* [http://boost.org/ boost], needed by kdebase; after compiling and/or installing boost, in order to make cmake aware about its location (FindBoost),  add boost directory (the one containing include subdirectory) to CMAKE_INCLUDE_PATH or set an environment variable called BOOST_ROOT pointing to boost directory.&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
In Ark Linux, the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy devel-core libxml-devel libxslt-devel bzip2-devel \&lt;br /&gt;
clucene-core-devel librdf-devel shared-mime-info xorg-Mesa-libGL-devel \&lt;br /&gt;
subversion boost-devel doxygen giflib-devel dbus-devel openssl-devel \&lt;br /&gt;
alsa-lib-devel kdesdk-scripts qt4-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mission Control.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus and Qt - you can skip steps 5, 6 and 7.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Some of the required packages for building KDE4 on Fedora 7 or higher:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
yum install clucene-core-devel libxml-devel libxslt-devel \&lt;br /&gt;
dbus-devel boost-devel bzip2-devel openssl-devel alsa-lib-devel \&lt;br /&gt;
redland-devel rasqal-devel raptor-devel hspell-devel aspell-devel \&lt;br /&gt;
cups-devel xine-lib-devel avahi-devel gamin-devel OpenEXR-devel \&lt;br /&gt;
enchant-devel jasper-devel ilmbase-devel pcre-devel gpgme-devel \&lt;br /&gt;
libxklavier-devel glib-devel libusb-devel libsmbclient-devel \&lt;br /&gt;
libxcb-devel NetworkManager-devel lm_sensors-devel libraw1394-devel \&lt;br /&gt;
bluez-libs-devel &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - It may be simpler to spin RPMs. Note that you can edit the variables in /etc/rpm/macros.kde4 (which is provided by Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
The build stage then looks like:&lt;br /&gt;
&lt;br /&gt;
%build&lt;br /&gt;
&lt;br /&gt;
mkdir -p %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
pushd %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
%{cmake_kde4} ..&lt;br /&gt;
&lt;br /&gt;
popd&lt;br /&gt;
&lt;br /&gt;
make %{?_smp_mflags} -C %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
I have had better results with creating a kdesupport rpm which means that you should not install the soprano and strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu and Debian ===&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.04 (Feisty) and Debian (Testing/Unstable) the build dependencies you need are installed with:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential cdbs debhelper cmake \&lt;br /&gt;
libxml2-dev libxslt1-dev libbz2-dev libclucene-dev librdf-dev \&lt;br /&gt;
shared-mime-info libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \&lt;br /&gt;
libxext-dev libjpeg-dev libpng-dev subversion libsm-dev libxinerama-dev \&lt;br /&gt;
libxrender-dev libfontconfig-dev libboost-dev libxcursor-dev doxygen \&lt;br /&gt;
libungif4-dev libdbus-1-dev libgpgme11-dev libssl-dev libgpgme11-dev \&lt;br /&gt;
libasound2-dev kdesdk-scripts libpth-dev libjasper-dev \&lt;br /&gt;
ssh libxine-dev libqimageblitz-dev libqimageblitz4 libglib2.0-dev \&lt;br /&gt;
libxkbfile-dev libenchant-dev libbluetooth-dev network-manager-dev \&lt;br /&gt;
libsmbclient-dev libxcb1-dev libcaptury-dev libxcomposite-dev \&lt;br /&gt;
libxdamage-dev libusb-dev libgpgme11-dev libldap2-dev &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.10 (Gutsy) and Debian unstable you have to add:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install dbus-x11  libqt4-dev libqca2-dev libeigen-dev \&lt;br /&gt;
libstreamanalyzer-dev libsoprano-dev libstrigiqtdbusclient-dev \ &lt;br /&gt;
libxklavier11-dev libxml2-utils libdbus-1-dev libxslt1-dev cmake libbz2-dev \&lt;br /&gt;
libungif4-dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided in these packages. Skip down to the [[#kdelibs|kdelibs section]] and continue from there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a fully functional API documentation framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
In openSUSE 10.2 and newer, you can install packages using [http://en.opensuse.org/Zypper Zypper]:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
sudo zypper install &amp;lt;package-name&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In older releases of SUSE, you can use YaST:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
yast -i &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Required Packages'''&lt;br /&gt;
&lt;br /&gt;
The packages you will need to install are:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
xorg-x11-devel&lt;br /&gt;
libxml2-devel &lt;br /&gt;
kdesdk3 &lt;br /&gt;
clucene-core-devel &lt;br /&gt;
boost-devel&lt;br /&gt;
libjpeg-devel &lt;br /&gt;
liblrdf-devel &lt;br /&gt;
libpng-devel &lt;br /&gt;
libxslt-devel &lt;br /&gt;
libredland-devel&lt;br /&gt;
Mesa-devel &lt;br /&gt;
giflib-devel &lt;br /&gt;
subversion &lt;br /&gt;
gcc &lt;br /&gt;
gcc-c++&lt;br /&gt;
gmp-devel (needed to build kdesupport)&lt;br /&gt;
gpgme-devel (needed to build kdepimlibs)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Optional Packages'''&lt;br /&gt;
&lt;br /&gt;
You can skip the manual and painful installation kdesupport and its dependencies ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano and other Nepomuk dependencies) by adding the KDE:KDE4 repository from&lt;br /&gt;
the [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] to your installation sources. &lt;br /&gt;
&lt;br /&gt;
For openSUSE 10.2 and newer do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo zypper service-add http://software.opensuse.org/download/KDE:/KDE4/openSUSE_10.2 KDE4-102&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For older versions of SUSE Linux do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
installation_sources -a http://software.opensuse.org/download/KDE:/KDE4/[YOUR SUSE LINUX VERSION]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now install the following packages:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cmake&lt;br /&gt;
dbus-1-devel&lt;br /&gt;
libqt4-devel&lt;br /&gt;
libqca2-devel&lt;br /&gt;
libsoprano-devel&lt;br /&gt;
libqimageblitz-devel&lt;br /&gt;
strigi&lt;br /&gt;
strigi-ui&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot more packages that are needed to satisfy the config-check, such as libusb-devel, bison etc., so look out for the config notifications and install accordingly. Please remember to skip any instructions that refer to kdesupport below. Start to compile with kdelibs. &lt;br /&gt;
&lt;br /&gt;
And for fully functional apidox framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CMake binary packages for openSUSE are available from the KDE:KDE4 repository as well as from the [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Install by hand ====&lt;br /&gt;
&lt;br /&gt;
You can use stable ebuilds just remember to sync your portage before you begin.&lt;br /&gt;
&lt;br /&gt;
Remember: All commands are executed as root.&lt;br /&gt;
&lt;br /&gt;
Required:&lt;br /&gt;
&lt;br /&gt;
We need to allow the following keyword masked ebuilds.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-util/cmake' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
echo 'dev-cpp/clucene' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the berkdb USE flag for redland, otherwise nepomuk won't work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-libs/redland berkdb' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the packages you will need to emerge, I included the update option into the emerge command so you will not re-emerge anything that you might already have installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -avu 'sys-devel/gcc' \&lt;br /&gt;
  'dev-util/subversion' \&lt;br /&gt;
  'dev-util/pkgconfig'  \&lt;br /&gt;
  'x11-base/xorg-x11' \&lt;br /&gt;
  'virtual/glut' \&lt;br /&gt;
  'media-libs/mesa' \&lt;br /&gt;
  'media-libs/jpeg' \&lt;br /&gt;
  'media-libs/libpng' \&lt;br /&gt;
  'media-libs/giflib' \&lt;br /&gt;
  'dev-cpp/clucene' \&lt;br /&gt;
  'dev-util/cppunit' \&lt;br /&gt;
  'media-libs/liblrdf' \&lt;br /&gt;
  'dev-libs/libxml2' \&lt;br /&gt;
  'dev-libs/libxslt' \&lt;br /&gt;
  'x11-misc/shared-mime-info' \&lt;br /&gt;
  'dev-libs/boost' \&lt;br /&gt;
  'dev-util/cmake' \&lt;br /&gt;
  'dev-libs/redland' \&lt;br /&gt;
  'sys-apps/dbus' \&lt;br /&gt;
  'sys-apps/hal' \&lt;br /&gt;
  'x11-libs/qt'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You will also need to emerge either 'kde-base/kdesdk' or kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
If you emerged DBUS, CMAKE, QT or HAL you may skip those sections respectively.&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
==== Install via portage ====&lt;br /&gt;
&lt;br /&gt;
Also you can install the KDE 4 packages directly via &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -a &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the things you need, [http://gentoo-wiki.com/TIP_Overlays#Layman install layman] and then pull in the &amp;quot;kde&amp;quot; overlay (which contains experimental KDE ebuilds): &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
layman -a kde&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
After this you need to adjust some USE-flags for KDE 4 and tell portage to use the testing KDE 4 ebuilds instead of the stable KDE 3 ones. &lt;br /&gt;
&lt;br /&gt;
That way portage will do the dependency tracking for you. &lt;br /&gt;
&lt;br /&gt;
Detailed instructions on building KDE 4 in Gentoo via portage can be found in the [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. They are discussed in the thread [http://forums.gentoo.org/viewtopic-t-530111-postdays-0-postorder-asc-start-0.html KDE 4 monolithic ebuilds].&lt;br /&gt;
&lt;br /&gt;
=== Mandriva ===&lt;br /&gt;
In Mandriva the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
urpmi gcc-c++ cmake libxml2-devel libbzip2_1-devel \&lt;br /&gt;
libclucene0-devel liblrdf2-devel libmesagl1-devel \&lt;br /&gt;
subversion doxygen libdbus-1_3-devel libopenssl0.9.8-devel \&lt;br /&gt;
libalsa2-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're running 64-bit environment you should replace all packages starting with &amp;quot;lib...&amp;quot; to &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus - you can skip steps 5 and 6.&lt;br /&gt;
&lt;br /&gt;
== Create a user account for KDE4 development ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Some people like to have a separate user account for KDE 4 (for instance an old bug deleted files by mistake), and the instructions below were written with that approach.&lt;br /&gt;
&lt;br /&gt;
However it is much more efficient to do everything with a single user account, see [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&lt;br /&gt;
for more details. &lt;br /&gt;
&lt;br /&gt;
You can still follow the instructions below, but don't put the environment variables in your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, put them in a separate file that you source to switch to the KDE 4 environment.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Command Line ===&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
useradd -m kde-devel&lt;br /&gt;
passwd kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Using KControl ===&lt;br /&gt;
&lt;br /&gt;
Instead of using the commands above, you can also use the User module in the KDE Control Center if you already have KDE3 installed.&lt;br /&gt;
&lt;br /&gt;
=== Setting up the environment ===&lt;br /&gt;
&lt;br /&gt;
Copy the {{path|~/.bashrc}} from your normal user account to the new kde-devel account. Next, copy and paste the contents of the [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|example .bashrc]] into {{path|~kde-devel/.bashrc}}. Be sure to comment out the line &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; if you do not have the &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt; command available. You will probably also want to modify the path to make sure it doesn't include your kde3 paths. Also if you want to use KDevelop to develop KDE 4 applications you may pass the ''-GKDevelop3'' flag to the ''cmake'' command (to make CMake generate KDevelop project files, it will help to avoid rebuilding in the future, see [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|this]]).  &lt;br /&gt;
To make it run, you have to open a new bash or to execute &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will provide access to commands such as &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; that are used in this tutorial as well as ensure that the proper paths are in place for Qt, KDE and CMake binaries.&lt;br /&gt;
&lt;br /&gt;
For more information, please read the [[Getting Started/Increased Productivity in KDE4 with Scripts]] tutorial.&lt;br /&gt;
&lt;br /&gt;
=== Switching to the New User ===&lt;br /&gt;
Switch to the user kde-devel: (don't forget the dash)&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
ssh -X kde-devel@localhost&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If the ssh command fails, check out the [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] section of the [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== The development user's shell ==&lt;br /&gt;
&lt;br /&gt;
On some systems a new user is configured by default to use {{path|/bin/sh}}. If this is not the case on your system, you can skip this section. Using {{path|/bin/sh}} can be very inconvenient to work with and you may want to change it to {{path|/bin/bash}} or another shell.&lt;br /&gt;
On Ark Linux and Fedora, you can skip this step - {{path|/bin/sh}} is {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Option 1: As the kde-devel user ===&lt;br /&gt;
&lt;br /&gt;
If you don't have root privileges and your system supports the changing of your own shell with the &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt; application, then you could try to change your shell to {{path|/bin/bash}} by using:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
chsh -s /bin/bash kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: As the root user ===&lt;br /&gt;
&lt;br /&gt;
If your system comes with the &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; application you can run the following command as root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Another option is to use the &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; application as root to safely edit your {{path|/etc/passwd}}. Locate 'kde-devel' in the the file. Change '{{path|/bin/sh}}' at the end of the line to read '{{path|/bin/bash}}', save your changes and exit.&lt;br /&gt;
&lt;br /&gt;
The new shell will be started automatically when you log in as the kde-devel user again.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
QtDBus and KDE are known to work with D-Bus versions 0.62, as well as 0.92 and upwards. Versions 0.60 and 0.61 may work too but are not tested. Versions 0.90 and 0.91 are known not to work. We recommend using post-1.0 release versions (at least 0.94), so consider upgrading if you haven't done so.&lt;br /&gt;
&lt;br /&gt;
You may skip this section if you have a recent D-Bus version or if you don't want to upgrade. You probably want to skip building the bindings until/unless you know you will be building HAL (see below).&lt;br /&gt;
&lt;br /&gt;
Before running these steps in the recipe, make sure your X11 headers and libraries are available. The configure script run on line 5 of the following instructions should output:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Make sure you did set up your environment correctly as described [[Getting_Started/Build/KDE4#Setting_up_the_environment|above]]. This is necessary for the &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; functions to work.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]] &lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz&lt;br /&gt;
 tar -xvzf dbus-1.0.2.tar.gz&lt;br /&gt;
 cd dbus-1.0.2/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR --localstatedir=/var&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo dbus-uuidgen --ensure&lt;br /&gt;
&lt;br /&gt;
 cs # see above&lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.74.tar.gz&lt;br /&gt;
 tar -xvzf dbus-glib-0.74.tar.gz&lt;br /&gt;
 cd dbus-glib-0.74/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 cb&lt;br /&gt;
 sudo chown -R kde-devel:kde-devel *&lt;br /&gt;
&lt;br /&gt;
=== What's Happening === &lt;br /&gt;
After changing into the source directory (line 1), D-Bus source code is downloaded from freedesktop.org (line 2) and unpacked (line 3). After going into the newly created D-Bus directory (line 4), the build is set up using the supplied {{path|configure}} script (line 5). After building (line 6) and installing (line 7) D-Bus, we use the &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; tool to install a machine identification file that allows the bus to start automatically when the desktop session starts (line 8).&lt;br /&gt;
&lt;br /&gt;
Note that you need write access to {{path|/var}} for the last two steps. If your system does not have the sudo command, you can use the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; command instead, e.g. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The steps for building the glib bindings are similar to the above.&lt;br /&gt;
&lt;br /&gt;
When these two packages are done building, we must fix the file ownership because 'sudo make install' has created root owned files and directories in ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Skip this if you have [http://cmake.org/ CMake] &amp;gt;=2.4.5 installed. &lt;br /&gt;
You should be able to directly use the binary packages available on the [http://www.cmake.org/HTML/Download.html CMake site]. There are also distribution specific packages available.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click Here to learn more]] &lt;br /&gt;
 wget http://www.cmake.org/files/v2.4/cmake-2.4.6.tar.gz&lt;br /&gt;
 tar -zxf cmake-2.4.6.tar.gz&lt;br /&gt;
 mkdir cmake-build&lt;br /&gt;
 cd cmake-build &lt;br /&gt;
 ../cmake-2.4.6/bootstrap&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
First, we go back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's source directory (line 1), get the CMake sources (line 2) and unpack them (line 3). We create a directory to build CMake in (line 4) and go into it (line 5). We then run the CMake bootstrap script to set up the CMake build (line 6), then make (line 7) and install it (line 8) using the root user.&lt;br /&gt;
&lt;br /&gt;
If your system does not have the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; command, you can instead do &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Qt ==&lt;br /&gt;
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. You should use the copy in the KDE Subversion servers. (note: some distros, like Debian or openSUSE, tend to supply Qt with patches from KDE svn applied, so you may want to cheat and use precompiled Qt from your distro, because they will work just as well). KDE tries to guarantee that the source is compileable with a plain, unpatched Qt 4.3.0, but you might get additional bugfixes by using qt-copy (however, usually your distribution takes care of backporting necessary bugfixes so overall you're most likely better off with sticking to the distro provided one if it is recent enough). Refer to the distribution specific sections above for more information. &lt;br /&gt;
&lt;br /&gt;
As for now Qt3 compatibility layer in Qt 4 is mandatory, so please &amp;lt;b&amp;gt;avoid&amp;lt;/b&amp;gt; using &amp;quot;-no-qt3support&amp;quot; option when building Qt4 from sources.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd # Note: qt-copy lives in $HOME/qt-copy. See $QTDIR in [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|&amp;lt;font color=red&amp;gt;.bashrc&amp;lt;/font&amp;gt;]] &lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/qt-copy&lt;br /&gt;
 cd qt-copy&lt;br /&gt;
 ./apply_patches&lt;br /&gt;
 ./configure -qt-gif -no-exceptions -debug -fast \&lt;br /&gt;
  -prefix $QTDIR -nomake examples -nomake demos&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
 # if we don't install, we'll just clear obj files to&lt;br /&gt;
 # save disk space&lt;br /&gt;
 if [ $QTDIR = `pwd` ]; then \&lt;br /&gt;
 find . -name '*.o' -delete ; \&lt;br /&gt;
 else make install; fi;&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We switch back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's home directory (line 1) and download the source code using subversion (svn) from KDE's repository (line 2). After changing into the resulting {{path|qt-copy}} directory (line 3), we run a script that manages the patches that come with &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (line 4). &lt;br /&gt;
&lt;br /&gt;
Once the patches have been applied, we then set up the build using the &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script (line 5-6). The various command line options used are explained in the {{path|qt-copy/README.qt-copy}} file. Finally, we build the minimal requirements for KDE (line 7) and install (line 10) Qt. If install dir is the same as the current dir (line 8), then we just free some space (line 9) instead. If you want all the example and demo applications, you can either build them individually or simply do a &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; from the {{path|qt-copy}} directory. &lt;br /&gt;
&lt;br /&gt;
Note that the installation does not require root as it installs Qt locally into {{path|$QTDIR}}. Anyway, installation is only needed if {{path|$QTDIR}} differs from {{path|$HOME/qt-copy}}, which is not the case if you have exactly followed the instructions.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &amp;quot;error: X11/Xlib.h: No such file or directory&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;xorg&amp;lt;/tt&amp;gt; (the actual name may vary between operating systems, for example it is &amp;lt;tt&amp;gt;xorg-dev&amp;lt;/tt&amp;gt; on Ubuntu based systems such as Kubuntu). &lt;br /&gt;
&lt;br /&gt;
If you get an error in the configure step about missing defines, check the value of &amp;lt;tt&amp;gt;$QMAKESPEC&amp;lt;/tt&amp;gt;.  Some distributions set this to point directly to the system-installed Qt.  If &amp;lt;tt&amp;gt;unset QMAKESPEC&amp;lt;/tt&amp;gt; solves the problem, you probably want to add it to the &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
If you get an error &amp;quot;.pch/debug-shared/QtCore&amp;quot;, this is because Qt-4.3 enables precompiled headers if your gcc supports it, but for some reason it doesn't work for you. If you use distcc, configure qt with -no-pch. If you use icecream, update to the latest icecream from svn trunk.&lt;br /&gt;
&lt;br /&gt;
Try running any Qt program, like {{program|assistant}}. '''Note:''' You may need to run &amp;lt;tt&amp;gt;xhost +local:kde-devel&amp;lt;/tt&amp;gt; as your regular kde3 user to run this application.  If it crashes in QSpanData::adjustSpanMethods, then your problem is the oxygen style. Try removing {{path|lib/kde4/plugins/styles/kstyle-oxygen.so}} and {{path|lib/kde4/plugins/styles/oxygen.so}} if they exist in the KDE install prefix.&lt;br /&gt;
&lt;br /&gt;
== HAL ==&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use qdbusviewer to see if you have org.freedesktop.hal. If not, you might need a newer version of hal. If you have org.freedesktop.hal, you probably don't need to, and don't ''want'' to, roll your own HAL.}}&lt;br /&gt;
&lt;br /&gt;
If your system requires you to build a newer version of HAL, there's a decent chance you'll need to build other stuff as well, some of which may not be straight forward. Since this should only be required for older distros, instructions are on [[Getting_Started/Build/HAL| a separate page]].&lt;br /&gt;
&lt;br /&gt;
== kdesupport ==&lt;br /&gt;
&lt;br /&gt;
{{warning|Don't forget to read the [[Getting_Started/Build/KDE4#Setting_up_the_environment|Setting Up The Environment]] section first.}}&lt;br /&gt;
&lt;br /&gt;
There are several libraries that KDE applications rely on in the kdesupport module. This includes Strigi and Soprano for file metadata and search, QImageBlitz for image manipulation needed in kdebase, eigen for visual effects in applications such as Kalzium, taglib for music players and qca for some cryptographic needs. &lt;br /&gt;
&lt;br /&gt;
Strigi itself has a few dependencies as well: you will need the libraries and headers for libz, libbz2, openssl (libcrypto or libssl), libclucene (&amp;gt;=0.9.16a but watch out: version 0.9.17 does '''not''' work), and either libxml2 or libexpat.&lt;br /&gt;
&lt;br /&gt;
Please remember that if you use openSUSE, you can install the needed packages from the KDE:KDE4 buildservice repository and do not have to bother with fiddling the details below. Skip to the kdelibs section. &lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/&lt;br /&gt;
 cd kdesupport&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1). We download the sources in kdesupport using subversion (line 2), go into the new {{path|~/kde/src/kdesupport}} directory (line 3), and commence the build (line 4). This will leave us in the kdesupport build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &lt;br /&gt;
   cmakekde: command not found&lt;br /&gt;
then you have to go manualy into the kdesupport directory in ~ and execute the command cmakekde. if this still doesnt work, then something is wrong with your bashrc.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: This project requires some variables to be set,&lt;br /&gt;
 and cmake can not find them.&lt;br /&gt;
 Please set the following variables:&lt;br /&gt;
 LIBXML2_INCLUDE_DIR (ADVANCED)&lt;br /&gt;
you should install the development package for libxml2.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: Could NOT find REDLAND&lt;br /&gt;
then you need librdf from the Redland.&lt;br /&gt;
If your distribution does not provide the librdf package, you can download the source there: [http://download.librdf.org/source/ http://download.librdf.org/source/] and build it.&lt;br /&gt;
(Gentoo users: The ebuild for librdf is named dev-libs/redland)&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 Fetching external item into 'kdesupport/admin'&lt;br /&gt;
 Error validating server certificate for 'https://...'&lt;br /&gt;
see [http://techbase.kde.org/Getting_Started/Sources/Using_Subversion_with_KDE Using Subversion with KDE]&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 FILE cannot create directory: /usr/lib[64]/qt4/plugins/crypto. Maybe need administrative privileges.&lt;br /&gt;
 &lt;br /&gt;
 make: *** [install] Error 255&lt;br /&gt;
take a second look in the .bashrc file described above, are paths correct?  Alternatively, you may see this error if you decided to use a distribution installed version of qt4 and skipped the Qt install above.  Either install qt-copy as describe above, or &amp;quot;sudo make install&amp;quot;. If you use &amp;quot;sudo make install&amp;quot;, make sure you that you change the ownership back to your user for some of the ~/kde subdirectories that were effected by using sudo (ie. &amp;quot;&amp;lt;tt&amp;gt;sudo chown -R kde-devel:kde-devel ~/kde&amp;lt;/tt&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you get a message related to &lt;br /&gt;
   target libQtTest.so not found&lt;br /&gt;
you may need to recompile qt-copy. This time you should take out&lt;br /&gt;
   -nomake demos -nomake examples&lt;br /&gt;
from the configure command, so that Qt generates library QtTest.&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
&lt;br /&gt;
We can now move on to building KDE's base libraries.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd   &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 mkdir KDE &amp;amp;&amp;amp; cd KDE&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs&lt;br /&gt;
 cd kdelibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1) then make and go into the KDE directory (line 2). We download the sources for kdelibs using subversion (line 3), go into the new {{path|~/kde/src/KDE/kdelibs}} directory (line 4), and commence the build (line 5). This will leave us in the &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
{{tip|There might be missing dependencies on your system! They are easily overlooked in the output of &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You might want to do a &amp;lt;tt&amp;gt;cmake $KDE_SRC/KDE/MODULE_NAME&amp;lt;/tt&amp;gt; prior to compiling any kde modules (like kdelibs, kdepimlibs etc.)}}&lt;br /&gt;
&lt;br /&gt;
=== Additional KDE-specific CMake modules ===&lt;br /&gt;
There are additional CMake modules in {{path|kdelibs/cmake/modules/}} that are necessary for building KDE4 applications. These will be installed for you when  kdelibs itself is installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have problems compiling kdelibs, first make sure the software in the [[Getting_Started/Build/KDE4#Required_Software|Required Software]] section above is installed and works. Other possible hints include:&lt;br /&gt;
* If the &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; command fails stating that CMake requires an out of source build directory, remove {{path|~/kde/src/KDE/kdelibs/CMakeCache.txt}}, and try again.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; still gives the same error then try this &lt;br /&gt;
 cd&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR \&lt;br /&gt;
 -DCMAKE_BUILD_TYPE=debugfull \&lt;br /&gt;
 -DKDE4_BUILD_TESTS=ON \&lt;br /&gt;
 ~/kde/src/KDE/kdelibs&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
* If you received an error stating &amp;quot;Please create a separate build directory and run 'cmake path_to_kdelibs [options]' there.&amp;quot;, then you need to change to your build directory before running cmakekde. (e.g &amp;lt;tt&amp;gt;cs KDE/kdelibs &amp;amp;&amp;amp; cb &amp;amp;&amp;amp; cmakekde&amp;lt;/tt&amp;gt;) If the message stays, run 'svn status' in the kdelibs directory and remove all files labeled with '?'.&lt;br /&gt;
* If Qt wasn't found or the wrong version of Qt was found, make sure that the qmake from the Qt you need is the first qmake in the path.&lt;br /&gt;
* If qmake wasn't found and you are using Debian packages, /usr/bin/qmake probably points to a wrong qmake version. To fix this run as root:&lt;br /&gt;
 update-alternatives --config qmake&lt;br /&gt;
* If the problems persist, try the CMake make-option &amp;lt;tt&amp;gt;--keep-going&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Here you need the libungif library, otherwise you will get an error message like &amp;quot;&amp;lt;tt&amp;gt;Could NOT find GIF&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
* Qt-4.3 upgrade: if you get a link error in kjsembed talking about QScriptEngine, edit CMakeCache.txt in kdelibs and remove the lines that talk about QT_QTUITOOLS_LIBRARY, then type make again (that static library has a new dependency, and the cmake code that adds it needs to run).&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;CMake Error: KDE Requires Qt to be built with SSL support&lt;br /&gt;
&amp;lt;/code&amp;gt;, install openssl-devel, remove CMakeCache.txt and re-compile QT.&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;kdelibs/kimgio/ico.cpp:188: undefined reference to `QImage::jumpTable()'&amp;lt;/code&amp;gt; it means you compiled QT without QT3 support(no, linking to a true QT3 install won't work)&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
After &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt;, but before ''kdebase'', you need to build and install ''kdepimlibs''.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We go into the KDE source directory (line 1), download the source code for kdepimlibs using subversion (line 2) and then go into the new {{path|~/kde/src/KDE/kdepimlibs}} directory (line 3). We then commence the build (line 4). This will leave us in the &amp;lt;tt&amp;gt;kdepimlibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have trouble compiling kdepimlibs:&lt;br /&gt;
* the cmakekde command may require a later version of the gpgme library.  This is available from the project's web site: http://www.gnupg.org/(en)/download/index.html - please note that the build of gpgme also requires libgpg-error, also available from the same location.  Both libraries are installed by the &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot; sequence, with the gpgme library configured with the additional &amp;quot;--with-gpg-error-prefix&amp;quot; parameter.  You may need to overwrite your existing &amp;quot;/usr/bin/gpgme-config&amp;quot; file with the newer version for the kdepimlibs to pick up the new install.&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
kdebase is divided into three parts:&lt;br /&gt;
* '''apps'''&lt;br /&gt;
:This contains applications like Dolphin or KWrite.&lt;br /&gt;
* '''runtime'''&lt;br /&gt;
:This contains things needed by every application at runtime, like icons. It is a required dependency for each KDE application, so you have to compile and install this.&lt;br /&gt;
* '''workspace'''&lt;br /&gt;
:This contains things specific to the KDE desktop, like Plasma or the window manager. Most stuff here depends on X11. You only need it if you want to build a full KDE desktop.&lt;br /&gt;
&lt;br /&gt;
You can build all of kdebase at once, which is described in the recipe below. If you only want to build kdebase-runtime, which is the only requirement, you can replace &amp;lt;code bash&amp;gt;cd kdebase&amp;lt;/code&amp;gt; with &amp;lt;code bash&amp;gt;cd kdebase/runtime&amp;lt;/code&amp;gt; in the recipe below.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase&lt;br /&gt;
 cd kdebase&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have troubles compiling kdebase:&lt;br /&gt;
* Make sure you have the &amp;lt;tt&amp;gt;libxss headers&amp;lt;/tt&amp;gt; installed. (Usually you got undefined references on xscreensaver objects if you do not have those headers)&lt;br /&gt;
* &amp;lt;tt&amp;gt;which meinproc&amp;lt;/tt&amp;gt; has to deliver {{path|/home/kde-devel/kde/bin/meinproc}}&lt;br /&gt;
* if cmakekde can not find the path of kdepimlibs, edit the file {{path|$KDE_BUILD/KDE/kdebase/CMakeCache.txt}} and manually set &amp;lt;tt&amp;gt;KDEPIMLIBS_INCLUDE_DIR:PATH=$KDE_BUILD/kdepimlibs&amp;lt;/tt&amp;gt;&lt;br /&gt;
* if you get an error saying &amp;quot;Please set the following variables: X11_XTest_LIB (ADVANCED)&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;Xtst&amp;lt;/tt&amp;gt;. On some systems, this is packaged separately from &amp;lt;tt&amp;gt;xext&amp;lt;/tt&amp;gt; and called &amp;lt;tt&amp;gt;x11proto-xext-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;libxtst-dev&amp;lt;/tt&amp;gt;. You may also need to remove the CMakeCache.txt file in the build dir after installing the package.&lt;br /&gt;
* the same for &amp;quot;X11_Xinerama_LIB (ADVANCED)&amp;quot; where you will need the devel package for &amp;lt;tt&amp;gt;xinerama&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* if you get an error complaining about a missing variable X11_Xrandr_LIB, you need the devel package for libxrandr (libxrandr-devel on ubuntu-systems)&lt;br /&gt;
* if you get the error &amp;quot;Please set the following variables: FONTCONFIG_INCLUDE_DIR, FONTCONFIG_LIBRARIES (ADVANCED)&amp;quot;, then you need to install  the libfontconfig headers&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: KMETADATA_LIBRARIES&amp;quot;, you need to install soprano from kdesupport and to rebuild kdelibs&lt;br /&gt;
* if you get the error &amp;quot;‘XserverRegion’ does not name a type&amp;quot; make sure you have libxcomposite headers installed (&amp;lt;tt&amp;gt;libxcomposite-dev&amp;lt;/tt&amp;gt; in ubuntu)&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: QT_QTOPENGL_LIBRARY (ADVANCED) &amp;quot;, try editing CMakeCache.txt and setting QT_QTOPENGL_LIBRARY:FILEPATH=/home/kde-devel/qt-copy/lib/libQtOpenGL.so&lt;br /&gt;
&lt;br /&gt;
* if you get messages as &amp;quot;KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.&amp;quot; then, either find the files containing the offending line and comment it out manually, or run the following script in ~/kde/src/KDE/kdebase: [http://www.plamadeala.com/files/macros_corrector.sh macros_corrector.sh]. It will just REMOVE the line that has &amp;quot;kde4_create_handbook&amp;quot; in it from all the found files.&lt;br /&gt;
*If you get an error (in ubuntu) concerning libxtst.so install the libxtst-dev package&lt;br /&gt;
* If you get the message &amp;quot;kdebase/workspace/kcontrol/kxkb/x11helper.cpp:131: error: ‘KGlobal’ has not been declared&amp;quot;, you might need to install libxklavier development packages.&lt;br /&gt;
&lt;br /&gt;
== Running KDE 4 programs ==&lt;br /&gt;
&lt;br /&gt;
You can now run KDE 4 programs (e.g. kwrite) by typing:&lt;br /&gt;
 ssh -X kde-devel@localhost&lt;br /&gt;
 kwrite &lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* If you get &lt;br /&gt;
 KUniqueApplication: Cannot find the D-Bus session server&lt;br /&gt;
check if you can access the display, e.g. type&lt;br /&gt;
 xclock&lt;br /&gt;
and see if a clock appears on the screen.&lt;br /&gt;
&lt;br /&gt;
* If you get something like&lt;br /&gt;
 Error: standard icon theme &amp;quot;oxygen&amp;quot; not found!&lt;br /&gt;
 &lt;br /&gt;
 ASSERT: &amp;quot;!isEmpty()&amp;quot; in file /home/kde-devel/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h, line 245&lt;br /&gt;
 Aborted (core dumped)&lt;br /&gt;
You need to install kdebase - see above. It is enough to install the &amp;quot;runtime&amp;quot; directory from kdebase.&lt;br /&gt;
&lt;br /&gt;
== Generating local API documentation ==&lt;br /&gt;
Although the API documentation for KDE is available online at [http://api.kde.org api.kde.org], it is sometimes useful to have it on your own disk, for example when you want to use [[Getting_Started/Set_up_KDE_4_for_development#KDevelop|KDevelop]] for browsing the documentation or when you are not able to be online all the time.&lt;br /&gt;
&lt;br /&gt;
Be aware that generating the API documentation can take several hours and takes almost half a gigabyte of diskspace.&lt;br /&gt;
The generation is handled by a script in {{path|kdelibs/doc/api}}, you need &amp;lt;tt&amp;gt;doxygen&amp;lt;/tt&amp;gt; to be able to run it. &lt;br /&gt;
&lt;br /&gt;
To build the API documentation for kdelibs, type the following:&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE/kdelibs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Repeat for other modules as desired.&amp;lt;br&amp;gt;&lt;br /&gt;
 cd &amp;lt;module home&amp;gt;&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Another, even easier method involves downloading this [[Doxyfile]] to your local system. Then simply change directory to where you want to create the documentation and run&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
% doxygen /path/to/Doxyfile&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Then review the file {{path|doxygen.log}} to see the doxygen errors and warnings. You'll find the actual documentation in the {{path|apidocs}} subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Staying up to date ==&lt;br /&gt;
&lt;br /&gt;
In order to keep the kde4 installation up to date, each of the modules installed should be updated periodically. As Monday is the day for big changes in kdelibs, Tuesday may be the best day to do this. For each module checked out, run &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs kdesupport # cs is not a typo&lt;br /&gt;
svn up&lt;br /&gt;
cb # cb is not a typo&lt;br /&gt;
make -j2 VERBOSE=1 &amp;amp;&amp;amp; make install&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a subset of a module ==&lt;br /&gt;
&lt;br /&gt;
Many modules in KDE contain a large number of programs which could take a long time to download and compile. In cases where you want to work only on a particular program or programs in a module, it is possible to download and compile particular folders. In some cases, certain folders are required for any build of the module. This is determined in the CMakeLists.txt file of the module. For example the [http://websvn.kde.org/trunk/KDE/kdegames/CMakeLists.txt?view=markup kdegames CMakeLists.txt file] lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
add_subdirectory(libkdegames)&lt;br /&gt;
add_subdirectory(libkmahjongg)&lt;br /&gt;
&lt;br /&gt;
macro_optional_add_subdirectory(doc)&lt;br /&gt;
macro_optional_add_subdirectory(lskat)&lt;br /&gt;
macro_optional_add_subdirectory(katomic)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, the libkdegames and libkmahjongg directories are required to build any of kdegames. The cmake directory will also usually be required. All the other directories (doc, katomic etc) are optional. They will be built if present on your machine. In this example, we build kmahjongg and kbattleship:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs KDE&lt;br /&gt;
svn co -N kdegames # The -N switch performs a non-recursive checkout&lt;br /&gt;
cd kdegames&lt;br /&gt;
svn up libkdegames # Get required directories&lt;br /&gt;
svn up libkmahjongg&lt;br /&gt;
svn up cmake&lt;br /&gt;
svn up kbattleship # Get optional directories&lt;br /&gt;
svn up kmahjongg&lt;br /&gt;
cmakekde &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
What can happen over time, after some &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; commands, is that some of the tools used in the KDE build chain change their output format. For example, &amp;lt;tt&amp;gt;kcfg&amp;lt;/tt&amp;gt; files are read by &amp;lt;tt&amp;gt;kconfig_compiler&amp;lt;/tt&amp;gt; to produce configuration dialogs. CMake cannot detect those changes, and the compilation might fail. A workaround is to always force a re-generation of all such files:&lt;br /&gt;
 find $KDE_SRC/KDE/kdebase -name &amp;quot;*.kcfg&amp;quot; | xargs touch&lt;br /&gt;
The same applies to &amp;lt;tt&amp;gt;ui&amp;lt;/tt&amp;gt; files as produced by Qt designer.&lt;br /&gt;
&lt;br /&gt;
=== Locked sessions ===&lt;br /&gt;
When installing KDE 4 as a user, one will not be able to unlock a locked session. To work around this issue you can either:&lt;br /&gt;
 su&lt;br /&gt;
 chown root.root $KDEDIR/bin/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/bin/kcheckpass&lt;br /&gt;
&lt;br /&gt;
== Success! ==&lt;br /&gt;
&lt;br /&gt;
You are now ready to start building other svn modules in the same fashion as you built kdebase, running and testing KDE4 or writing your own patches and applications.&lt;br /&gt;
&lt;br /&gt;
See the [[Getting Started/Set up KDE 4 for development|Set up KDE 4 for development]] tutorial for how to start KDE 4 applications and how to use KDevelop to work on them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Build KDE]]&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4</id>
		<title>Getting Started/Build/KDE4</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4"/>
				<updated>2007-11-07T17:12:18Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: /* Kubuntu and Debian */ Added libxslt1-dev, cmake and libbz2-dev to gutsy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Getting_Started/Build/KDE4}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
&lt;br /&gt;
series=Getting Started|&lt;br /&gt;
&lt;br /&gt;
name=Building KDE4 From Source|&lt;br /&gt;
&lt;br /&gt;
pre=[[../../Sources/Anonymous_SVN|Anonymous SVN Quickstart Guide]]|&lt;br /&gt;
&lt;br /&gt;
next=[[../../Set_up_KDE_4_for_development|Set up KDE 4 for development]]|&lt;br /&gt;
&lt;br /&gt;
reading=[http://kdesvn-build.kde.org/ kdesvn-build: The KDE From Subversion Build Tool]&amp;lt;br&amp;gt;[[../../Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&amp;lt;br&amp;gt;[[Development/Tutorials/CMake |Introduction to CMake]]&amp;lt;br&amp;gt;[[../KDE4/FreeBSD|FreeBSD notes]]&amp;lt;br&amp;gt;[[../KDE4/Mac OS X|Instructions for Mac OS X]]&amp;lt;br&amp;gt;[[../KDE4/Windows|Instructions for MS Windows]]|&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This tutorial shows one way to get KDE from trunk running on Linux/BSD systems. There are also tutorials for [[/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[/Mac OS X|Mac OS X]] and [http://solaris.kde.org/ Solaris]. Throughout the tutorial the bash shell is used.&lt;br /&gt;
&lt;br /&gt;
{{warning|Expect a higher risk of build failure '''on Mondays''' when most kdelibs changes are committed. [http://developer.kde.org/~dirk/dashboard/ Dashboard] reports unexpected breakages. You are encouraged to fix failing modules.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Required Software ==&lt;br /&gt;
&lt;br /&gt;
The following must be installed first before you can successfully complete this tutorial:&lt;br /&gt;
* gcc and g++, preferably version 4.2 or higher&lt;br /&gt;
* svn, the subversion revision control client&lt;br /&gt;
* pkg-config&lt;br /&gt;
* development libraries and headers for X11, OpenGL (mesa-common-dev and libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 and libxslt&lt;br /&gt;
* the &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, which is part of kdesdk. You can install it as part of kdesdk (kdesdk-scripts on Debian) or similar package, or just download it itself from [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* the [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], which is the freedesktop MIME standard KDE is using now&lt;br /&gt;
* [http://boost.org/ boost], needed by kdebase; after compiling and/or installing boost, in order to make cmake aware about its location (FindBoost),  add boost directory (the one containing include subdirectory) to CMAKE_INCLUDE_PATH or set an environment variable called BOOST_ROOT pointing to boost directory.&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
In Ark Linux, the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy devel-core libxml-devel libxslt-devel bzip2-devel \&lt;br /&gt;
clucene-core-devel librdf-devel shared-mime-info xorg-Mesa-libGL-devel \&lt;br /&gt;
subversion boost-devel doxygen giflib-devel dbus-devel openssl-devel \&lt;br /&gt;
alsa-lib-devel kdesdk-scripts qt4-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mission Control.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus and Qt - you can skip steps 5, 6 and 7.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Some of the required packages for building KDE4 on Fedora 7 or higher:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
yum install clucene-core-devel libxml-devel libxslt-devel \&lt;br /&gt;
dbus-devel boost-devel bzip2-devel openssl-devel alsa-lib-devel \&lt;br /&gt;
redland-devel rasqal-devel raptor-devel hspell-devel aspell-devel \&lt;br /&gt;
cups-devel xine-lib-devel avahi-devel gamin-devel OpenEXR-devel \&lt;br /&gt;
enchant-devel jasper-devel ilmbase-devel pcre-devel gpgme-devel \&lt;br /&gt;
libxklavier-devel glib-devel libusb-devel libsmbclient-devel \&lt;br /&gt;
libxcb-devel NetworkManager-devel lm_sensors-devel libraw1394-devel \&lt;br /&gt;
bluez-libs-devel &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - It may be simpler to spin RPMs. Note that you can edit the variables in /etc/rpm/macros.kde4 (which is provided by Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
The build stage then looks like:&lt;br /&gt;
&lt;br /&gt;
%build&lt;br /&gt;
&lt;br /&gt;
mkdir -p %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
pushd %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
%{cmake_kde4} ..&lt;br /&gt;
&lt;br /&gt;
popd&lt;br /&gt;
&lt;br /&gt;
make %{?_smp_mflags} -C %{_target_platform}&lt;br /&gt;
&lt;br /&gt;
I have had better results with creating a kdesupport rpm which means that you should not install the soprano and strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu and Debian ===&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.04 (Feisty) and Debian (Testing/Unstable) the build dependencies you need are installed with:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install build-essential cdbs debhelper cmake \&lt;br /&gt;
libxml2-dev libxslt1-dev libbz2-dev libclucene-dev librdf-dev \&lt;br /&gt;
shared-mime-info libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \&lt;br /&gt;
libxext-dev libjpeg-dev libpng-dev subversion libsm-dev libxinerama-dev \&lt;br /&gt;
libxrender-dev libfontconfig-dev libboost-dev libxcursor-dev doxygen \&lt;br /&gt;
libungif4-dev libdbus-1-dev libgpgme11-dev libssl-dev libgpgme11-dev \&lt;br /&gt;
libasound2-dev kdesdk-scripts libpth-dev libjasper-dev \&lt;br /&gt;
ssh libxine-dev libqimageblitz-dev libqimageblitz4 libglib2.0-dev \&lt;br /&gt;
libxkbfile-dev libenchant-dev libbluetooth-dev network-manager-dev \&lt;br /&gt;
libsmbclient-dev libxcb1-dev libcaptury-dev libxcomposite-dev \&lt;br /&gt;
libxdamage-dev libusb-dev libgpgme11-dev libldap2-dev &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Kubuntu 7.10 (Gutsy) and Debian unstable you have to add:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install dbus-x11 libqt4-dev libqca2-dev libeigen-dev \&lt;br /&gt;
libstreamanalyzer-dev libsoprano-dev libstrigiqtdbusclient-dev \ &lt;br /&gt;
libxklavier11-dev libxml2-utils libdbus-1-dev libxslt1-dev cmake libbz2-dev&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided in these packages. Skip down to the [[#kdelibs|kdelibs section]] and continue from there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For a fully functional API documentation framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo aptitude install graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
In openSUSE 10.2 and newer, you can install packages using [http://en.opensuse.org/Zypper Zypper]:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
sudo zypper install &amp;lt;package-name&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In older releases of SUSE, you can use YaST:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
yast -i &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Required Packages'''&lt;br /&gt;
&lt;br /&gt;
The packages you will need to install are:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
xorg-x11-devel&lt;br /&gt;
libxml2-devel &lt;br /&gt;
kdesdk3 &lt;br /&gt;
clucene-core-devel &lt;br /&gt;
boost-devel&lt;br /&gt;
libjpeg-devel &lt;br /&gt;
liblrdf-devel &lt;br /&gt;
libpng-devel &lt;br /&gt;
libxslt-devel &lt;br /&gt;
libredland-devel&lt;br /&gt;
Mesa-devel &lt;br /&gt;
giflib-devel &lt;br /&gt;
subversion &lt;br /&gt;
gcc &lt;br /&gt;
gcc-c++&lt;br /&gt;
gmp-devel (needed to build kdesupport)&lt;br /&gt;
gpgme-devel (needed to build kdepimlibs)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Optional Packages'''&lt;br /&gt;
&lt;br /&gt;
You can skip the manual and painful installation kdesupport and its dependencies ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano and other Nepomuk dependencies) by adding the KDE:KDE4 repository from&lt;br /&gt;
the [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] to your installation sources. &lt;br /&gt;
&lt;br /&gt;
For openSUSE 10.2 and newer do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo zypper service-add http://software.opensuse.org/download/KDE:/KDE4/openSUSE_10.2 KDE4-102&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For older versions of SUSE Linux do:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
installation_sources -a http://software.opensuse.org/download/KDE:/KDE4/[YOUR SUSE LINUX VERSION]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now install the following packages:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
cmake&lt;br /&gt;
dbus-1-devel&lt;br /&gt;
libqt4-devel&lt;br /&gt;
libqca2-devel&lt;br /&gt;
libsoprano-devel&lt;br /&gt;
libqimageblitz-devel&lt;br /&gt;
strigi&lt;br /&gt;
strigi-ui&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot more packages that are needed to satisfy the config-check, such as libusb-devel, bison etc., so look out for the config notifications and install accordingly. Please remember to skip any instructions that refer to kdesupport below. Start to compile with kdelibs. &lt;br /&gt;
&lt;br /&gt;
And for fully functional apidox framework you also need:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
graphviz&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CMake binary packages for openSUSE are available from the KDE:KDE4 repository as well as from the [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Install by hand ====&lt;br /&gt;
&lt;br /&gt;
You can use stable ebuilds just remember to sync your portage before you begin.&lt;br /&gt;
&lt;br /&gt;
Remember: All commands are executed as root.&lt;br /&gt;
&lt;br /&gt;
Required:&lt;br /&gt;
&lt;br /&gt;
We need to allow the following keyword masked ebuilds.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-util/cmake' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
echo 'dev-cpp/clucene' &amp;gt;&amp;gt; /etc/portage/package.keywords&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you have set the berkdb USE flag for redland, otherwise nepomuk won't work.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
echo 'dev-libs/redland berkdb' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These are the packages you will need to emerge, I included the update option into the emerge command so you will not re-emerge anything that you might already have installed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -avu 'sys-devel/gcc' \&lt;br /&gt;
  'dev-util/subversion' \&lt;br /&gt;
  'dev-util/pkgconfig'  \&lt;br /&gt;
  'x11-base/xorg-x11' \&lt;br /&gt;
  'virtual/glut' \&lt;br /&gt;
  'media-libs/mesa' \&lt;br /&gt;
  'media-libs/jpeg' \&lt;br /&gt;
  'media-libs/libpng' \&lt;br /&gt;
  'media-libs/giflib' \&lt;br /&gt;
  'dev-cpp/clucene' \&lt;br /&gt;
  'dev-util/cppunit' \&lt;br /&gt;
  'media-libs/liblrdf' \&lt;br /&gt;
  'dev-libs/libxml2' \&lt;br /&gt;
  'dev-libs/libxslt' \&lt;br /&gt;
  'x11-misc/shared-mime-info' \&lt;br /&gt;
  'dev-libs/boost' \&lt;br /&gt;
  'dev-util/cmake' \&lt;br /&gt;
  'dev-libs/redland' \&lt;br /&gt;
  'sys-apps/dbus' \&lt;br /&gt;
  'sys-apps/hal' \&lt;br /&gt;
  'x11-libs/qt'&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You will also need to emerge either 'kde-base/kdesdk' or kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
If you emerged DBUS, CMAKE, QT or HAL you may skip those sections respectively.&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;br /&gt;
==== Install via portage ====&lt;br /&gt;
&lt;br /&gt;
Also you can install the KDE 4 packages directly via &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
emerge -a &amp;lt;packagename&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get the things you need, [http://gentoo-wiki.com/TIP_Overlays#Layman install layman] and then pull in the &amp;quot;kde&amp;quot; overlay (which contains experimental KDE ebuilds): &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
layman -a kde&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
After this you need to adjust some USE-flags for KDE 4 and tell portage to use the testing KDE 4 ebuilds instead of the stable KDE 3 ones. &lt;br /&gt;
&lt;br /&gt;
That way portage will do the dependency tracking for you. &lt;br /&gt;
&lt;br /&gt;
Detailed instructions on building KDE 4 in Gentoo via portage can be found in the [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. They are discussed in the thread [http://forums.gentoo.org/viewtopic-t-530111-postdays-0-postorder-asc-start-0.html KDE 4 monolithic ebuilds].&lt;br /&gt;
&lt;br /&gt;
=== Mandriva ===&lt;br /&gt;
In Mandriva the build dependencies you need are installed with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
urpmi gcc-c++ cmake libxml2-devel libbzip2_1-devel \&lt;br /&gt;
libclucene0-devel liblrdf2-devel libmesagl1-devel \&lt;br /&gt;
subversion doxygen libdbus-1_3-devel libopenssl0.9.8-devel \&lt;br /&gt;
libalsa2-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you're running 64-bit environment you should replace all packages starting with &amp;quot;lib...&amp;quot; to &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical interface, select the packages listed above in the &amp;quot;Install Software&amp;quot; tool in Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
This includes installation of CMake, DBus - you can skip steps 5 and 6.&lt;br /&gt;
&lt;br /&gt;
== Create a user account for KDE4 development ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Some people like to have a separate user account for KDE 4 (for instance an old bug deleted files by mistake), and the instructions below were written with that approach.&lt;br /&gt;
&lt;br /&gt;
However it is much more efficient to do everything with a single user account, see [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Increased Productivity in KDE4 with Scripts]]&lt;br /&gt;
for more details. &lt;br /&gt;
&lt;br /&gt;
You can still follow the instructions below, but don't put the environment variables in your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, put them in a separate file that you source to switch to the KDE 4 environment.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Option 1: Command Line ===&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
useradd -m kde-devel&lt;br /&gt;
passwd kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: Using KControl ===&lt;br /&gt;
&lt;br /&gt;
Instead of using the commands above, you can also use the User module in the KDE Control Center if you already have KDE3 installed.&lt;br /&gt;
&lt;br /&gt;
=== Setting up the environment ===&lt;br /&gt;
&lt;br /&gt;
Copy the {{path|~/.bashrc}} from your normal user account to the new kde-devel account. Next, copy and paste the contents of the [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|example .bashrc]] into {{path|~kde-devel/.bashrc}}. Be sure to comment out the line &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; if you do not have the &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt; command available. You will probably also want to modify the path to make sure it doesn't include your kde3 paths. Also if you want to use KDevelop to develop KDE 4 applications you may pass the ''-GKDevelop3'' flag to the ''cmake'' command (to make CMake generate KDevelop project files, it will help to avoid rebuilding in the future, see [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|this]]).  &lt;br /&gt;
To make it run, you have to open a new bash or to execute &lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will provide access to commands such as &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; that are used in this tutorial as well as ensure that the proper paths are in place for Qt, KDE and CMake binaries.&lt;br /&gt;
&lt;br /&gt;
For more information, please read the [[Getting Started/Increased Productivity in KDE4 with Scripts]] tutorial.&lt;br /&gt;
&lt;br /&gt;
=== Switching to the New User ===&lt;br /&gt;
Switch to the user kde-devel: (don't forget the dash)&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
ssh -X kde-devel@localhost&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If the ssh command fails, check out the [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] section of the [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== The development user's shell ==&lt;br /&gt;
&lt;br /&gt;
On some systems a new user is configured by default to use {{path|/bin/sh}}. If this is not the case on your system, you can skip this section. Using {{path|/bin/sh}} can be very inconvenient to work with and you may want to change it to {{path|/bin/bash}} or another shell.&lt;br /&gt;
On Ark Linux and Fedora, you can skip this step - {{path|/bin/sh}} is {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Option 1: As the kde-devel user ===&lt;br /&gt;
&lt;br /&gt;
If you don't have root privileges and your system supports the changing of your own shell with the &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt; application, then you could try to change your shell to {{path|/bin/bash}} by using:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
chsh -s /bin/bash kde-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Option 2: As the root user ===&lt;br /&gt;
&lt;br /&gt;
If your system comes with the &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; application you can run the following command as root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Another option is to use the &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; application as root to safely edit your {{path|/etc/passwd}}. Locate 'kde-devel' in the the file. Change '{{path|/bin/sh}}' at the end of the line to read '{{path|/bin/bash}}', save your changes and exit.&lt;br /&gt;
&lt;br /&gt;
The new shell will be started automatically when you log in as the kde-devel user again.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
QtDBus and KDE are known to work with D-Bus versions 0.62, as well as 0.92 and upwards. Versions 0.60 and 0.61 may work too but are not tested. Versions 0.90 and 0.91 are known not to work. We recommend using post-1.0 release versions (at least 0.94), so consider upgrading if you haven't done so.&lt;br /&gt;
&lt;br /&gt;
You may skip this section if you have a recent D-Bus version or if you don't want to upgrade. You probably want to skip building the bindings until/unless you know you will be building HAL (see below).&lt;br /&gt;
&lt;br /&gt;
Before running these steps in the recipe, make sure your X11 headers and libraries are available. The configure script run on line 5 of the following instructions should output:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Make sure you did set up your environment correctly as described [[Getting_Started/Build/KDE4#Setting_up_the_environment|above]]. This is necessary for the &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; functions to work.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]] &lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus/dbus-1.0.2.tar.gz&lt;br /&gt;
 tar -xvzf dbus-1.0.2.tar.gz&lt;br /&gt;
 cd dbus-1.0.2/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR --localstatedir=/var&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo dbus-uuidgen --ensure&lt;br /&gt;
&lt;br /&gt;
 cs # see above&lt;br /&gt;
 wget http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.74.tar.gz&lt;br /&gt;
 tar -xvzf dbus-glib-0.74.tar.gz&lt;br /&gt;
 cd dbus-glib-0.74/&lt;br /&gt;
 ./configure --prefix=$DBUSDIR&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 cb&lt;br /&gt;
 sudo chown -R kde-devel:kde-devel *&lt;br /&gt;
&lt;br /&gt;
=== What's Happening === &lt;br /&gt;
After changing into the source directory (line 1), D-Bus source code is downloaded from freedesktop.org (line 2) and unpacked (line 3). After going into the newly created D-Bus directory (line 4), the build is set up using the supplied {{path|configure}} script (line 5). After building (line 6) and installing (line 7) D-Bus, we use the &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; tool to install a machine identification file that allows the bus to start automatically when the desktop session starts (line 8).&lt;br /&gt;
&lt;br /&gt;
Note that you need write access to {{path|/var}} for the last two steps. If your system does not have the sudo command, you can use the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; command instead, e.g. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The steps for building the glib bindings are similar to the above.&lt;br /&gt;
&lt;br /&gt;
When these two packages are done building, we must fix the file ownership because 'sudo make install' has created root owned files and directories in ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Skip this if you have [http://cmake.org/ CMake] &amp;gt;=2.4.5 installed. &lt;br /&gt;
You should be able to directly use the binary packages available on the [http://www.cmake.org/HTML/Download.html CMake site]. There are also distribution specific packages available.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click Here to learn more]] &lt;br /&gt;
 wget http://www.cmake.org/files/v2.4/cmake-2.4.6.tar.gz&lt;br /&gt;
 tar -zxf cmake-2.4.6.tar.gz&lt;br /&gt;
 mkdir cmake-build&lt;br /&gt;
 cd cmake-build &lt;br /&gt;
 ../cmake-2.4.6/bootstrap&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
First, we go back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's source directory (line 1), get the CMake sources (line 2) and unpack them (line 3). We create a directory to build CMake in (line 4) and go into it (line 5). We then run the CMake bootstrap script to set up the CMake build (line 6), then make (line 7) and install it (line 8) using the root user.&lt;br /&gt;
&lt;br /&gt;
If your system does not have the &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; command, you can instead do &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Qt ==&lt;br /&gt;
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. You should use the copy in the KDE Subversion servers. (note: some distros, like Debian or openSUSE, tend to supply Qt with patches from KDE svn applied, so you may want to cheat and use precompiled Qt from your distro, because they will work just as well). KDE tries to guarantee that the source is compileable with a plain, unpatched Qt 4.3.0, but you might get additional bugfixes by using qt-copy (however, usually your distribution takes care of backporting necessary bugfixes so overall you're most likely better off with sticking to the distro provided one if it is recent enough). Refer to the distribution specific sections above for more information. &lt;br /&gt;
&lt;br /&gt;
As for now Qt3 compatibility layer in Qt 4 is mandatory, so please &amp;lt;b&amp;gt;avoid&amp;lt;/b&amp;gt; using &amp;quot;-no-qt3support&amp;quot; option when building Qt4 from sources.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd # Note: qt-copy lives in $HOME/qt-copy. See $QTDIR in [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|&amp;lt;font color=red&amp;gt;.bashrc&amp;lt;/font&amp;gt;]] &lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/qt-copy&lt;br /&gt;
 cd qt-copy&lt;br /&gt;
 ./apply_patches&lt;br /&gt;
 ./configure -qt-gif -no-exceptions -debug -fast \&lt;br /&gt;
  -prefix $QTDIR -nomake examples -nomake demos&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
 # if we don't install, we'll just clear obj files to&lt;br /&gt;
 # save disk space&lt;br /&gt;
 if [ $QTDIR = `pwd` ]; then \&lt;br /&gt;
 find . -name '*.o' -delete ; \&lt;br /&gt;
 else make install; fi;&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We switch back to the &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; user's home directory (line 1) and download the source code using subversion (svn) from KDE's repository (line 2). After changing into the resulting {{path|qt-copy}} directory (line 3), we run a script that manages the patches that come with &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (line 4). &lt;br /&gt;
&lt;br /&gt;
Once the patches have been applied, we then set up the build using the &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script (line 5-6). The various command line options used are explained in the {{path|qt-copy/README.qt-copy}} file. Finally, we build the minimal requirements for KDE (line 7) and install (line 10) Qt. If install dir is the same as the current dir (line 8), then we just free some space (line 9) instead. If you want all the example and demo applications, you can either build them individually or simply do a &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; from the {{path|qt-copy}} directory. &lt;br /&gt;
&lt;br /&gt;
Note that the installation does not require root as it installs Qt locally into {{path|$QTDIR}}. Anyway, installation is only needed if {{path|$QTDIR}} differs from {{path|$HOME/qt-copy}}, which is not the case if you have exactly followed the instructions.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &amp;quot;error: X11/Xlib.h: No such file or directory&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;xorg&amp;lt;/tt&amp;gt; (the actual name may vary between operating systems, for example it is &amp;lt;tt&amp;gt;xorg-dev&amp;lt;/tt&amp;gt; on Ubuntu based systems such as Kubuntu). &lt;br /&gt;
&lt;br /&gt;
If you get an error in the configure step about missing defines, check the value of &amp;lt;tt&amp;gt;$QMAKESPEC&amp;lt;/tt&amp;gt;.  Some distributions set this to point directly to the system-installed Qt.  If &amp;lt;tt&amp;gt;unset QMAKESPEC&amp;lt;/tt&amp;gt; solves the problem, you probably want to add it to the &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
If you get an error &amp;quot;.pch/debug-shared/QtCore&amp;quot;, this is because Qt-4.3 enables precompiled headers if your gcc supports it, but for some reason it doesn't work for you. If you use distcc, configure qt with -no-pch. If you use icecream, update to the latest icecream from svn trunk.&lt;br /&gt;
&lt;br /&gt;
Try running any Qt program, like {{program|assistant}}. '''Note:''' You may need to run &amp;lt;tt&amp;gt;xhost +local:kde-devel&amp;lt;/tt&amp;gt; as your regular kde3 user to run this application.  If it crashes in QSpanData::adjustSpanMethods, then your problem is the oxygen style. Try removing {{path|lib/kde4/plugins/styles/kstyle-oxygen.so}} and {{path|lib/kde4/plugins/styles/oxygen.so}} if they exist in the KDE install prefix.&lt;br /&gt;
&lt;br /&gt;
== HAL ==&lt;br /&gt;
&lt;br /&gt;
{{tip|You can use qdbusviewer to see if you have org.freedesktop.hal. If not, you might need a newer version of hal. If you have org.freedesktop.hal, you probably don't need to, and don't ''want'' to, roll your own HAL.}}&lt;br /&gt;
&lt;br /&gt;
If your system requires you to build a newer version of HAL, there's a decent chance you'll need to build other stuff as well, some of which may not be straight forward. Since this should only be required for older distros, instructions are on [[Getting_Started/Build/HAL| a separate page]].&lt;br /&gt;
&lt;br /&gt;
== kdesupport ==&lt;br /&gt;
&lt;br /&gt;
{{warning|Don't forget to read the [[Getting_Started/Build/KDE4#Setting_up_the_environment|Setting Up The Environment]] section first.}}&lt;br /&gt;
&lt;br /&gt;
There are several libraries that KDE applications rely on in the kdesupport module. This includes Strigi and Soprano for file metadata and search, QImageBlitz for image manipulation needed in kdebase, eigen for visual effects in applications such as Kalzium, taglib for music players and qca for some cryptographic needs. &lt;br /&gt;
&lt;br /&gt;
Strigi itself has a few dependencies as well: you will need the libraries and headers for libz, libbz2, openssl (libcrypto or libssl), libclucene (&amp;gt;=0.9.16a but watch out: version 0.9.17 does '''not''' work), and either libxml2 or libexpat.&lt;br /&gt;
&lt;br /&gt;
Please remember that if you use openSUSE, you can install the needed packages from the KDE:KDE4 buildservice repository and do not have to bother with fiddling the details below. Skip to the kdelibs section. &lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/&lt;br /&gt;
 cd kdesupport&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1). We download the sources in kdesupport using subversion (line 2), go into the new {{path|~/kde/src/kdesupport}} directory (line 3), and commence the build (line 4). This will leave us in the kdesupport build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you get &lt;br /&gt;
   cmakekde: command not found&lt;br /&gt;
then you have to go manualy into the kdesupport directory in ~ and execute the command cmakekde. if this still doesnt work, then something is wrong with your bashrc.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: This project requires some variables to be set,&lt;br /&gt;
 and cmake can not find them.&lt;br /&gt;
 Please set the following variables:&lt;br /&gt;
 LIBXML2_INCLUDE_DIR (ADVANCED)&lt;br /&gt;
you should install the development package for libxml2.&lt;br /&gt;
&lt;br /&gt;
If you get &lt;br /&gt;
 CMake Error: Could NOT find REDLAND&lt;br /&gt;
then you need librdf from the Redland.&lt;br /&gt;
If your distribution does not provide the librdf package, you can download the source there: [http://download.librdf.org/source/ http://download.librdf.org/source/] and build it.&lt;br /&gt;
(Gentoo users: The ebuild for librdf is named dev-libs/redland)&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 Fetching external item into 'kdesupport/admin'&lt;br /&gt;
 Error validating server certificate for 'https://...'&lt;br /&gt;
see [http://techbase.kde.org/Getting_Started/Sources/Using_Subversion_with_KDE Using Subversion with KDE]&lt;br /&gt;
&lt;br /&gt;
If you get&lt;br /&gt;
 FILE cannot create directory: /usr/lib[64]/qt4/plugins/crypto. Maybe need administrative privileges.&lt;br /&gt;
 &lt;br /&gt;
 make: *** [install] Error 255&lt;br /&gt;
take a second look in the .bashrc file described above, are paths correct?  Alternatively, you may see this error if you decided to use a distribution installed version of qt4 and skipped the Qt install above.  Either install qt-copy as describe above, or &amp;quot;sudo make install&amp;quot;. If you use &amp;quot;sudo make install&amp;quot;, make sure you that you change the ownership back to your user for some of the ~/kde subdirectories that were effected by using sudo (ie. &amp;quot;&amp;lt;tt&amp;gt;sudo chown -R kde-devel:kde-devel ~/kde&amp;lt;/tt&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
If you get a message related to &lt;br /&gt;
   target libQtTest.so not found&lt;br /&gt;
you may need to recompile qt-copy. This time you should take out&lt;br /&gt;
   -nomake demos -nomake examples&lt;br /&gt;
from the configure command, so that Qt generates library QtTest.&lt;br /&gt;
&lt;br /&gt;
== kdelibs ==&lt;br /&gt;
&lt;br /&gt;
We can now move on to building KDE's base libraries.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
 cd   &lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 mkdir KDE &amp;amp;&amp;amp; cd KDE&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs&lt;br /&gt;
 cd kdelibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We change to the base source directory (line 1) then make and go into the KDE directory (line 2). We download the sources for kdelibs using subversion (line 3), go into the new {{path|~/kde/src/KDE/kdelibs}} directory (line 4), and commence the build (line 5). This will leave us in the &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
{{tip|There might be missing dependencies on your system! They are easily overlooked in the output of &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt;.&lt;br /&gt;
You might want to do a &amp;lt;tt&amp;gt;cmake $KDE_SRC/KDE/MODULE_NAME&amp;lt;/tt&amp;gt; prior to compiling any kde modules (like kdelibs, kdepimlibs etc.)}}&lt;br /&gt;
&lt;br /&gt;
=== Additional KDE-specific CMake modules ===&lt;br /&gt;
There are additional CMake modules in {{path|kdelibs/cmake/modules/}} that are necessary for building KDE4 applications. These will be installed for you when  kdelibs itself is installed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have problems compiling kdelibs, first make sure the software in the [[Getting_Started/Build/KDE4#Required_Software|Required Software]] section above is installed and works. Other possible hints include:&lt;br /&gt;
* If the &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; command fails stating that CMake requires an out of source build directory, remove {{path|~/kde/src/KDE/kdelibs/CMakeCache.txt}}, and try again.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; still gives the same error then try this &lt;br /&gt;
 cd&lt;br /&gt;
 cmake -DCMAKE_INSTALL_PREFIX=$KDEDIR \&lt;br /&gt;
 -DCMAKE_BUILD_TYPE=debugfull \&lt;br /&gt;
 -DKDE4_BUILD_TESTS=ON \&lt;br /&gt;
 ~/kde/src/KDE/kdelibs&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
* If you received an error stating &amp;quot;Please create a separate build directory and run 'cmake path_to_kdelibs [options]' there.&amp;quot;, then you need to change to your build directory before running cmakekde. (e.g &amp;lt;tt&amp;gt;cs KDE/kdelibs &amp;amp;&amp;amp; cb &amp;amp;&amp;amp; cmakekde&amp;lt;/tt&amp;gt;) If the message stays, run 'svn status' in the kdelibs directory and remove all files labeled with '?'.&lt;br /&gt;
* If Qt wasn't found or the wrong version of Qt was found, make sure that the qmake from the Qt you need is the first qmake in the path.&lt;br /&gt;
* If qmake wasn't found and you are using Debian packages, /usr/bin/qmake probably points to a wrong qmake version. To fix this run as root:&lt;br /&gt;
 update-alternatives --config qmake&lt;br /&gt;
* If the problems persist, try the CMake make-option &amp;lt;tt&amp;gt;--keep-going&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Here you need the libungif library, otherwise you will get an error message like &amp;quot;&amp;lt;tt&amp;gt;Could NOT find GIF&amp;lt;/tt&amp;gt;&amp;quot;.&lt;br /&gt;
* Qt-4.3 upgrade: if you get a link error in kjsembed talking about QScriptEngine, edit CMakeCache.txt in kdelibs and remove the lines that talk about QT_QTUITOOLS_LIBRARY, then type make again (that static library has a new dependency, and the cmake code that adds it needs to run).&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;CMake Error: KDE Requires Qt to be built with SSL support&lt;br /&gt;
&amp;lt;/code&amp;gt;, install openssl-devel, remove CMakeCache.txt and re-compile QT.&lt;br /&gt;
* if you get &amp;lt;code&amp;gt;kdelibs/kimgio/ico.cpp:188: undefined reference to `QImage::jumpTable()'&amp;lt;/code&amp;gt; it means you compiled QT without QT3 support(no, linking to a true QT3 install won't work)&lt;br /&gt;
&lt;br /&gt;
== kdepimlibs ==&lt;br /&gt;
After &amp;lt;tt&amp;gt;kdelibs&amp;lt;/tt&amp;gt;, but before ''kdebase'', you need to build and install ''kdepimlibs''.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs&lt;br /&gt;
 cd kdepimlibs&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== What's Happening ===&lt;br /&gt;
We go into the KDE source directory (line 1), download the source code for kdepimlibs using subversion (line 2) and then go into the new {{path|~/kde/src/KDE/kdepimlibs}} directory (line 3). We then commence the build (line 4). This will leave us in the &amp;lt;tt&amp;gt;kdepimlibs&amp;lt;/tt&amp;gt; build directory after the build is completed.&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have trouble compiling kdepimlibs:&lt;br /&gt;
* the cmakekde command may require a later version of the gpgme library.  This is available from the project's web site: http://www.gnupg.org/(en)/download/index.html - please note that the build of gpgme also requires libgpg-error, also available from the same location.  Both libraries are installed by the &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot; sequence, with the gpgme library configured with the additional &amp;quot;--with-gpg-error-prefix&amp;quot; parameter.  You may need to overwrite your existing &amp;quot;/usr/bin/gpgme-config&amp;quot; file with the newer version for the kdepimlibs to pick up the new install.&lt;br /&gt;
&lt;br /&gt;
== kdebase ==&lt;br /&gt;
kdebase is divided into three parts:&lt;br /&gt;
* '''apps'''&lt;br /&gt;
:This contains applications like Dolphin or KWrite.&lt;br /&gt;
* '''runtime'''&lt;br /&gt;
:This contains things needed by every application at runtime, like icons. It is a required dependency for each KDE application, so you have to compile and install this.&lt;br /&gt;
* '''workspace'''&lt;br /&gt;
:This contains things specific to the KDE desktop, like Plasma or the window manager. Most stuff here depends on X11. You only need it if you want to build a full KDE desktop.&lt;br /&gt;
&lt;br /&gt;
You can build all of kdebase at once, which is described in the recipe below. If you only want to build kdebase-runtime, which is the only requirement, you can replace &amp;lt;code bash&amp;gt;cd kdebase&amp;lt;/code&amp;gt; with &amp;lt;code bash&amp;gt;cd kdebase/runtime&amp;lt;/code&amp;gt; in the recipe below.&lt;br /&gt;
&lt;br /&gt;
=== The Recipe ===&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase&lt;br /&gt;
 cd kdebase&lt;br /&gt;
 cmakekde&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
If you have troubles compiling kdebase:&lt;br /&gt;
* Make sure you have the &amp;lt;tt&amp;gt;libxss headers&amp;lt;/tt&amp;gt; installed. (Usually you got undefined references on xscreensaver objects if you do not have those headers)&lt;br /&gt;
* &amp;lt;tt&amp;gt;which meinproc&amp;lt;/tt&amp;gt; has to deliver {{path|/home/kde-devel/kde/bin/meinproc}}&lt;br /&gt;
* if cmakekde can not find the path of kdepimlibs, edit the file {{path|$KDE_BUILD/KDE/kdebase/CMakeCache.txt}} and manually set &amp;lt;tt&amp;gt;KDEPIMLIBS_INCLUDE_DIR:PATH=$KDE_BUILD/kdepimlibs&amp;lt;/tt&amp;gt;&lt;br /&gt;
* if you get an error saying &amp;quot;Please set the following variables: X11_XTest_LIB (ADVANCED)&amp;quot;, install the devel package of &amp;lt;tt&amp;gt;Xtst&amp;lt;/tt&amp;gt;. On some systems, this is packaged separately from &amp;lt;tt&amp;gt;xext&amp;lt;/tt&amp;gt; and called &amp;lt;tt&amp;gt;x11proto-xext-dev&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;libxtst-dev&amp;lt;/tt&amp;gt;. You may also need to remove the CMakeCache.txt file in the build dir after installing the package.&lt;br /&gt;
* the same for &amp;quot;X11_Xinerama_LIB (ADVANCED)&amp;quot; where you will need the devel package for &amp;lt;tt&amp;gt;xinerama&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* if you get an error complaining about a missing variable X11_Xrandr_LIB, you need the devel package for libxrandr (libxrandr-devel on ubuntu-systems)&lt;br /&gt;
* if you get the error &amp;quot;Please set the following variables: FONTCONFIG_INCLUDE_DIR, FONTCONFIG_LIBRARIES (ADVANCED)&amp;quot;, then you need to install  the libfontconfig headers&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: KMETADATA_LIBRARIES&amp;quot;, you need to install soprano from kdesupport and to rebuild kdelibs&lt;br /&gt;
* if you get the error &amp;quot;‘XserverRegion’ does not name a type&amp;quot; make sure you have libxcomposite headers installed (&amp;lt;tt&amp;gt;libxcomposite-dev&amp;lt;/tt&amp;gt; in ubuntu)&lt;br /&gt;
* if you get the error &amp;quot;CMake Error: This project requires some variables to be set, and cmake can not find them. Please set the following variables: QT_QTOPENGL_LIBRARY (ADVANCED) &amp;quot;, try editing CMakeCache.txt and setting QT_QTOPENGL_LIBRARY:FILEPATH=/home/kde-devel/qt-copy/lib/libQtOpenGL.so&lt;br /&gt;
&lt;br /&gt;
* if you get messages as &amp;quot;KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.&amp;quot; then, either find the files containing the offending line and comment it out manually, or run the following script in ~/kde/src/KDE/kdebase: [http://www.plamadeala.com/files/macros_corrector.sh macros_corrector.sh]. It will just REMOVE the line that has &amp;quot;kde4_create_handbook&amp;quot; in it from all the found files.&lt;br /&gt;
*If you get an error (in ubuntu) concerning libxtst.so install the libxtst-dev package&lt;br /&gt;
* If you get the message &amp;quot;kdebase/workspace/kcontrol/kxkb/x11helper.cpp:131: error: ‘KGlobal’ has not been declared&amp;quot;, you might need to install libxklavier development packages.&lt;br /&gt;
&lt;br /&gt;
== Running KDE 4 programs ==&lt;br /&gt;
&lt;br /&gt;
You can now run KDE 4 programs (e.g. kwrite) by typing:&lt;br /&gt;
 ssh -X kde-devel@localhost&lt;br /&gt;
 kwrite &lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
&lt;br /&gt;
* If you get &lt;br /&gt;
 KUniqueApplication: Cannot find the D-Bus session server&lt;br /&gt;
check if you can access the display, e.g. type&lt;br /&gt;
 xclock&lt;br /&gt;
and see if a clock appears on the screen.&lt;br /&gt;
&lt;br /&gt;
* If you get something like&lt;br /&gt;
 Error: standard icon theme &amp;quot;oxygen&amp;quot; not found!&lt;br /&gt;
 &lt;br /&gt;
 ASSERT: &amp;quot;!isEmpty()&amp;quot; in file /home/kde-devel/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h, line 245&lt;br /&gt;
 Aborted (core dumped)&lt;br /&gt;
You need to install kdebase - see above. It is enough to install the &amp;quot;runtime&amp;quot; directory from kdebase.&lt;br /&gt;
&lt;br /&gt;
== Generating local API documentation ==&lt;br /&gt;
Although the API documentation for KDE is available online at [http://api.kde.org api.kde.org], it is sometimes useful to have it on your own disk, for example when you want to use [[Getting_Started/Set_up_KDE_4_for_development#KDevelop|KDevelop]] for browsing the documentation or when you are not able to be online all the time.&lt;br /&gt;
&lt;br /&gt;
Be aware that generating the API documentation can take several hours and takes almost half a gigabyte of diskspace.&lt;br /&gt;
The generation is handled by a script in {{path|kdelibs/doc/api}}, you need &amp;lt;tt&amp;gt;doxygen&amp;lt;/tt&amp;gt; to be able to run it. &lt;br /&gt;
&lt;br /&gt;
To build the API documentation for kdelibs, type the following:&lt;br /&gt;
&amp;lt;!--'cs' and 'cb' are NOT typos!--&amp;gt;&lt;br /&gt;
 cs KDE/kdelibs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' is a bash function, click here to learn more]]&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Repeat for other modules as desired.&amp;lt;br&amp;gt;&lt;br /&gt;
 cd &amp;lt;module home&amp;gt;&lt;br /&gt;
 $KDE_SRC/KDE/kdelibs/doc/api/doxygen.sh \&lt;br /&gt;
 --doxdatadir=$KDE_SRC/KDE/kdelibs/doc/common .&lt;br /&gt;
&lt;br /&gt;
Another, even easier method involves downloading this [[Doxyfile]] to your local system. Then simply change directory to where you want to create the documentation and run&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
% doxygen /path/to/Doxyfile&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Then review the file {{path|doxygen.log}} to see the doxygen errors and warnings. You'll find the actual documentation in the {{path|apidocs}} subdirectory.&lt;br /&gt;
&lt;br /&gt;
== Staying up to date ==&lt;br /&gt;
&lt;br /&gt;
In order to keep the kde4 installation up to date, each of the modules installed should be updated periodically. As Monday is the day for big changes in kdelibs, Tuesday may be the best day to do this. For each module checked out, run &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs kdesupport # cs is not a typo&lt;br /&gt;
svn up&lt;br /&gt;
cb # cb is not a typo&lt;br /&gt;
make -j2 VERBOSE=1 &amp;amp;&amp;amp; make install&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a subset of a module ==&lt;br /&gt;
&lt;br /&gt;
Many modules in KDE contain a large number of programs which could take a long time to download and compile. In cases where you want to work only on a particular program or programs in a module, it is possible to download and compile particular folders. In some cases, certain folders are required for any build of the module. This is determined in the CMakeLists.txt file of the module. For example the [http://websvn.kde.org/trunk/KDE/kdegames/CMakeLists.txt?view=markup kdegames CMakeLists.txt file] lists:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
add_subdirectory(libkdegames)&lt;br /&gt;
add_subdirectory(libkmahjongg)&lt;br /&gt;
&lt;br /&gt;
macro_optional_add_subdirectory(doc)&lt;br /&gt;
macro_optional_add_subdirectory(lskat)&lt;br /&gt;
macro_optional_add_subdirectory(katomic)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, the libkdegames and libkmahjongg directories are required to build any of kdegames. The cmake directory will also usually be required. All the other directories (doc, katomic etc) are optional. They will be built if present on your machine. In this example, we build kmahjongg and kbattleship:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
cs KDE&lt;br /&gt;
svn co -N kdegames # The -N switch performs a non-recursive checkout&lt;br /&gt;
cd kdegames&lt;br /&gt;
svn up libkdegames # Get required directories&lt;br /&gt;
svn up libkmahjongg&lt;br /&gt;
svn up cmake&lt;br /&gt;
svn up kbattleship # Get optional directories&lt;br /&gt;
svn up kmahjongg&lt;br /&gt;
cmakekde &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== General troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
What can happen over time, after some &amp;lt;tt&amp;gt;svn up&amp;lt;/tt&amp;gt; commands, is that some of the tools used in the KDE build chain change their output format. For example, &amp;lt;tt&amp;gt;kcfg&amp;lt;/tt&amp;gt; files are read by &amp;lt;tt&amp;gt;kconfig_compiler&amp;lt;/tt&amp;gt; to produce configuration dialogs. CMake cannot detect those changes, and the compilation might fail. A workaround is to always force a re-generation of all such files:&lt;br /&gt;
 find $KDE_SRC/KDE/kdebase -name &amp;quot;*.kcfg&amp;quot; | xargs touch&lt;br /&gt;
The same applies to &amp;lt;tt&amp;gt;ui&amp;lt;/tt&amp;gt; files as produced by Qt designer.&lt;br /&gt;
&lt;br /&gt;
=== Locked sessions ===&lt;br /&gt;
When installing KDE 4 as a user, one will not be able to unlock a locked session. To work around this issue you can either:&lt;br /&gt;
 su&lt;br /&gt;
 chown root.root $KDEDIR/bin/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/bin/kcheckpass&lt;br /&gt;
&lt;br /&gt;
== Success! ==&lt;br /&gt;
&lt;br /&gt;
You are now ready to start building other svn modules in the same fashion as you built kdebase, running and testing KDE4 or writing your own patches and applications.&lt;br /&gt;
&lt;br /&gt;
See the [[Getting Started/Set up KDE 4 for development|Set up KDE 4 for development]] tutorial for how to start KDE 4 applications and how to use KDevelop to work on them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Build KDE]]&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Solid/Introduction</id>
		<title>Development/Tutorials/Solid/Introduction</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Solid/Introduction"/>
				<updated>2007-01-25T03:42:37Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: Added Category:KDE4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is Solid ==&lt;br /&gt;
Solid is the new hardware device framework for KDE 4 that features, among other things, a hardware discovery layer which allows you to detect and use devices regardless of operating system or architecture. You can learn more about the Solid project at [http://solid.kde.org solid.kde.org].&lt;br /&gt;
&lt;br /&gt;
== Who is this tutorial for? ==&lt;br /&gt;
This tutorial is written for developers looking to use the Solid hardware discovery layer within their applications.  It can also serve as a good starting point for developers looking to start working on the Solid framework.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* A working KDE4 development environment. Documentation on setting up a KDE environment can be found [[Getting_Started|here]].&lt;br /&gt;
&lt;br /&gt;
== Listing Devices ==&lt;br /&gt;
Our first program will be a simple console based app that gets a list of all the hardware devices and prints them out to the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code cppqt&amp;gt;&lt;br /&gt;
    Solid::DeviceManager &amp;amp;manager = Solid::DeviceManager::self();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gets us the device manager.  All the devices are queried through and returned from the device manager.  Once we have the list of devices we can interact with them as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code cppqt&amp;gt;foreach( Solid::Device device, manager.allDevices() )&lt;br /&gt;
{&lt;br /&gt;
    //print the name of device&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; device.udi() &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
device.udi() returns the Unique Device Identifier for the device as a QString. Even if you have more than one identical device, the UDI is guaranteed to be unique.  For example if you have a MythTV box with two PVR-250 T.V. capture cards in it, you will be able to refer to card #1 and #2 by their respective UDI.&lt;br /&gt;
&lt;br /&gt;
The complete program along with the CMake files necessary to build it can be found under &amp;quot;[http://websvn.kde.org/trunk/KDE/kdelibs/solid/examples/tutorial1/ kdelibs/solid/examples/tutorial1/]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Searching for specific devices ==&lt;br /&gt;
This second program makes uses of filters built into the solid framework.  Using these filters you can list only devices according to supported capabilities, sub-devices of a given parent, and various predicates.  In our example we'll be limiting our list to only audio hardware.  A full list of capabilities can be viewed under the Solid::Capability namespace.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code cppqt&amp;gt;Solid::DeviceManager &amp;amp;manager = Solid::DeviceManager::self();&lt;br /&gt;
DeviceList devices = manager.findDevicesFromQuery( &amp;quot;&amp;quot;,&lt;br /&gt;
    Solid::Capability::AudioHw );&lt;br /&gt;
//get a list of all devices that are AudioHw&lt;br /&gt;
foreach ( Solid::Device device, devices )&lt;br /&gt;
{&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; device.udi() &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example Solid::DeviceManager::findDevicesFromQuery looks for a device with any parent and the Solid::Capability::AudioHw capability.  If we had wanted to specify an AudioHw device with the parent &amp;quot;real_specific_parent&amp;quot; it would look like this:&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;code cppqt&amp;gt;manager.findDevicesFromQuery( &amp;quot;real_specific_parent&amp;quot;, &lt;br /&gt;
                              Solid::Capability::AudioHw )&amp;lt;/code&amp;gt;&lt;br /&gt;
The complete program along with the CMake files required to build it can be found under &amp;quot;[http://websvn.kde.org/trunk/KDE/kdelibs/solid/examples/tutorial2/ kdelibs/solid/examples/tutorial2/]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== What do we do with a device once we get it? ==&lt;br /&gt;
Now that we got a device, what do we do with it?  First lets look at the relationship between the Solid::Device and Solid::Capability. A Solid::Device can contain many Solid::Capability.  A device can be tested to have a capability in the following way:&lt;br /&gt;
&amp;lt;code cppqt&amp;gt;Solid::DeviceManager &amp;amp;manager = Solid::DeviceManager::self();&lt;br /&gt;
    &lt;br /&gt;
//get a Processor&lt;br /&gt;
Solid::DeviceList list = manager.findDevicesFromQuery( &amp;quot;&amp;quot;,&lt;br /&gt;
                             Solid::Capability::Processor );&lt;br /&gt;
&lt;br /&gt;
//take the first Processor&lt;br /&gt;
Solid::Device device = list[0];&lt;br /&gt;
if ( device.is&amp;lt;Solid::Processor&amp;gt;() ) {&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; &amp;quot;We've got a processor!&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
} else {&lt;br /&gt;
    kDebug() &amp;lt;&amp;lt; &amp;quot;Device is not a processor.&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To actually use this device as a processor we need to do the following:&lt;br /&gt;
&amp;lt;code cppqt&amp;gt;&lt;br /&gt;
    Solid::Processor *processor = device.as&amp;lt;Solid::Processor&amp;gt;();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The complete program along with the CMake files required to build it can be found under &amp;quot;[http://websvn.kde.org/trunk/KDE/kdelibs/solid/examples/tutorial3/ kdelibs/solid/examples/tutorial3/]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Category:C++]][[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Installing_third_party_softwares_in_terminal</id>
		<title>Installing third party softwares in terminal</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Installing_third_party_softwares_in_terminal"/>
				<updated>2007-01-21T18:07:54Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Are not the make &amp;amp;&amp;amp; make install instructions missing for the part describing the installation of kdelibs and kdebase ...?&lt;br /&gt;
&lt;br /&gt;
: No, KDE4 uses CMake. the cmakekde function does everything.&lt;br /&gt;
[[User:Kunalthakar|Kunalthakar]] 19:07, 21 January 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/KDE_TechBase_talk:Migrate_content</id>
		<title>KDE TechBase talk:Migrate content</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/KDE_TechBase_talk:Migrate_content"/>
				<updated>2007-01-21T17:18:46Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How about adding a section where we list all the articles that need to be ported from developer.kde.org? I think that will be very useful and will get work done from new volunteers like me.&lt;br /&gt;
[[User:Kunalthakar|Kunalthakar]] 18:18, 21 January 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/User:Kunalthakar</id>
		<title>User:Kunalthakar</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User:Kunalthakar"/>
				<updated>2007-01-16T17:03:29Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Kunal Thakar - KDE enthusiast&lt;br /&gt;
can be reached at kunalt at gmail&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tools</id>
		<title>Development/Tools</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tools"/>
				<updated>2007-01-16T15:26:46Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: /* Helper Tools */  Removed TODOs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section contains information about tools for KDE development.&lt;br /&gt;
&lt;br /&gt;
== Debugging and Analysis ==&lt;br /&gt;
A list of tools which are used to analyze a program. This includes debuggers and profilers, for instance.&lt;br /&gt;
&lt;br /&gt;
; Valgrind&lt;br /&gt;
: [[/Valgrind|Valgrind]] helps to find memory leaks and uninitialized memory blocks. Additional features are a profiler and more. Valgrind is one of the most important development tools!&lt;br /&gt;
&lt;br /&gt;
; The GNU Project Debugger (GDB)&lt;br /&gt;
: [http://sources.redhat.com/gdb/ GDB] helps in debugging source code. As GDB evolved over time it is recommended to use version 6.x. Graphical frontends are available (see below). See also the debugging tutorial [[../Tutorials/Debugging/Debugging with GDB|Debugging with GDB]].&lt;br /&gt;
&lt;br /&gt;
; KDbg&lt;br /&gt;
: [http://www.kdbg.org/ KDbg] is a graphical user interface to GDB, which is able to set breakpoints, step through the code etc.&lt;br /&gt;
&lt;br /&gt;
== Development Tools ==&lt;br /&gt;
; KDevelop&lt;br /&gt;
: [http://www.kdevelop.org KDevelop] is an excellent IDE for developing KDE and Qt C++ applications. It includes a an integrated debugger, a powerful editor with syntax highlighting, a ''Project wizard'' to create applications from templates, the automake/autoconf gunk, and even the class documentation. Further details can also be found in the [http://kdevelop.org/mediawiki/index.php/Main_Page KDevelop wiki].&lt;br /&gt;
&lt;br /&gt;
; Qt Designer&lt;br /&gt;
: With Trolltechs [http://www.trolltech.com/products/qt/features/designer Qt Designer] it is easy to layout user interfaces like buttons and checkboxes. Additional features are undo/redo, checking accelerator conflicts etc. Qt Designer allows even non-programmers to help design KDE dialogs. Further details can be found in the tutorial [[Development/Tutorials/Using_Qt_Designer|Using Qt Designer]] and in the [http://doc.trolltech.com/4.2/designer-manual.html Qt documentation].&lt;br /&gt;
&lt;br /&gt;
== Internationalization (i18n) Tools ==&lt;br /&gt;
&lt;br /&gt;
; KBabel&lt;br /&gt;
: [http://kbabel.kde.org/ KBabel] is a set of tools for editing and managing gettext PO files. Its main part is a powerful and comfortable PO file editor which features full navigation capabilities, full editing functionality, possibility to search for translations in different dictionaries, spell and syntax checking, showing diffs and many more.&lt;br /&gt;
&lt;br /&gt;
: Also included is a &amp;quot;Catalog Manager&amp;quot;, a file manager view which helps keeping an overview of PO files. Last but not least it includes a standalone dictionary application as an additional possibility to access KBabel's powerful dictionaries. KBabel will help you to translate fast and also keep consistent translations.&lt;br /&gt;
&lt;br /&gt;
; Dr. Klash&lt;br /&gt;
: This little utility, once activated, can present a report about conflicting shortcuts in menus. Not only this is helpful for translators but also for developers. A little hand editing of &amp;lt;tt&amp;gt;`kde-config --localprefix`/share/config/kdeglobals&amp;lt;/tt&amp;gt; activates this feature:&lt;br /&gt;
&lt;br /&gt;
 [Development]&lt;br /&gt;
 CheckAccelerators=F12&lt;br /&gt;
 AutoCheckAccelerators=false&lt;br /&gt;
 AlwaysShowCheckAccelerators=false&lt;br /&gt;
&lt;br /&gt;
: Now pressing F12 will show a dialog containing which accelerators in the currently focussed interface conflict and provide suggestions for new accelerators. If no accelerators conflict or Dr. Klash has nothing to suggest, no popup dialog will not be displayed at all. &lt;br /&gt;
&lt;br /&gt;
: With &amp;lt;tt&amp;gt;AutoCheckAccelerators&amp;lt;/tt&amp;gt; enabled the dialog will popup automatically if a conflict exists and &amp;lt;tt&amp;gt;AlwaysShowCheckAccelerators&amp;lt;/tt&amp;gt; can force the dialog to always popup even if there are no conflicts to report. &lt;br /&gt;
&lt;br /&gt;
; The XX language&lt;br /&gt;
: This helper language serves as a debugging aid for people finding untranslated strings in applications. If you start your application with the ``xx'' locale, all translated strings will appear with x's. First you have to check out these ``translations'' from l10n/xx and install them.&lt;br /&gt;
&lt;br /&gt;
: After you've built l10n/xx and installed it, run your application using the XX locale. This can be done by launching it from the command line like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; KDE_LANG=xx kspread&lt;br /&gt;
&lt;br /&gt;
: This will start KSpread using the XX locale no matter what your current language setting is. Look for strings that do not have the x's in them. If x's are missing from a string, it could be due to missing i18n calls or even missing or incorrectly generated .pot files. Consult the i18n tutorials for further information.&lt;br /&gt;
&lt;br /&gt;
: When checking for untranslated strings, be sure to check all the WhatsThis help and tooltips.&lt;br /&gt;
&lt;br /&gt;
=== Examining .po files ===&lt;br /&gt;
&lt;br /&gt;
You can look at the translated .po files to see if a string is present and has been translated. For example, here's a portion of l10n/de/messages/kdebase/konqueror.po: &lt;br /&gt;
&lt;br /&gt;
 #: konq_mainwindow.cc:3707 konq_tabs.cc:84&lt;br /&gt;
 msgid &amp;quot;&amp;amp;New Tab&amp;quot;&lt;br /&gt;
 msgstr &amp;quot;Neues &amp;amp;Unterfenster&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The string to be translated is given on the msgid line. The translated string is on the msgstr line. Notice that the exact same string to translate came from konq_mainwindow.cc and also from konq_tabs.cc. This saves the translators from having to translate the same identical string twice. &lt;br /&gt;
&lt;br /&gt;
You can also use KBabel to examine .po files. KBabel is part of the kdesdk module.&lt;br /&gt;
&lt;br /&gt;
{{note|More information on writing and translating documentation can be found on [http://i18n.kde.org/ the i18n project site].}}&lt;br /&gt;
&lt;br /&gt;
== Helper Tools ==&lt;br /&gt;
&lt;br /&gt;
; [[/Using kde-config|Get information about KDE's installation - kde-config]] &lt;br /&gt;
: The tool kde-config helps to find out more about a KDE installation.&lt;br /&gt;
&lt;br /&gt;
; [[/Using kfmclient|Driving Konqueror From Scripts - kfmclient]] &lt;br /&gt;
: kfmclient is a small tool to communicate with Konqueror.&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Talk:Development/Tools/Using_kde-config</id>
		<title>Talk:Development/Tools/Using kde-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Talk:Development/Tools/Using_kde-config"/>
				<updated>2007-01-16T15:26:24Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: copyright query&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document is actually copyrighted. From the original page http://developer.kde.org/documentation/other/kde-config.html&lt;br /&gt;
&lt;br /&gt;
Copyrights&lt;br /&gt;
kde-config is (c) Stephan Kulow, 2000&lt;br /&gt;
This document is maintained by David Faure.&lt;br /&gt;
&lt;br /&gt;
It would be nice if we obtain the permission from David Faure.&lt;br /&gt;
Thanks, [[User:Kunalthakar|Kunalthakar]] 16:26, 16 January 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Talk:Development/Tools/Using_kfmclient</id>
		<title>Talk:Development/Tools/Using kfmclient</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Talk:Development/Tools/Using_kfmclient"/>
				<updated>2007-01-16T15:22:47Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: copyright query&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is actually copyrighted.&lt;br /&gt;
&lt;br /&gt;
From the original page http://developer.kde.org/documentation/other/kfmclient.html&lt;br /&gt;
    * kfmclient is (c) Torben Weis and David Faure, 1997-2000&lt;br /&gt;
    * This document is (c) Richard J. Moore 1998-2000 &lt;br /&gt;
&lt;br /&gt;
I haven't asked for permission from the copyright holder. If someone can ask, it would be nice.&lt;br /&gt;
Thanks&lt;br /&gt;
[[User:Kunalthakar|Kunalthakar]] 16:22, 16 January 2007 (CET)&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tools/Using_kfmclient</id>
		<title>Development/Tools/Using kfmclient</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tools/Using_kfmclient"/>
				<updated>2007-01-16T15:20:10Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: ported page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Driving Konqueror From Scripts: kfmclient =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
''kfmclient'' is a small utility for communicating with Konqueror from the command line, or from scripts. It can control Konqueror to a high degree using an API similar to that provided to C++ programmers by the Konqueror class. ''kfmclient'' is part of the kdebase package, so you can rely on it's presence on any system running KDE.&lt;br /&gt;
The reason why it's still named kfmclient and not konqclient is so that scripts written for KDE 1.x still run with KDE 2.x&lt;br /&gt;
Note that all this help is also available from kfmclient itself, if you run &amp;lt;code&amp;gt;kfmclient --commands&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&lt;br /&gt;
All commands have the general form kfmclient ''command parameters''.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient openURL 'url''''&lt;br /&gt;
&lt;br /&gt;
Opens a window showing 'url'. 'url' may be a relative path\n&amp;quot; or file name, such as . or subdir/\n&amp;quot; If 'url' is omitted, $HOME is used instead.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient openProfile 'profile' ['url']'''&lt;br /&gt;
&lt;br /&gt;
Opens a window using the given profile. 'profile' is a file under share/apps/konqueror/profiles (globally or locally). 'url' is an optional URL to open.&lt;br /&gt;
New in KDE 2.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient openProperties 'url''''&lt;br /&gt;
&lt;br /&gt;
Opens a properties menu&lt;br /&gt;
&lt;br /&gt;
'''kfmclient exec 'url' ['binding']'''&lt;br /&gt;
&lt;br /&gt;
Tries to execute 'url'. 'url' may be a usual URL, this URL will be opened. You may omit 'binding'. In this case the default binding is tried. Of course URL maybe the URL of a document, or it may be a *.desktop file. This way you could for example mount a device by passing 'Mount default' as binding to 'cdrom.desktop'&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
    kfmclient exec file:/root/Desktop/cdrom.desktop &amp;quot;Mount&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Mounts the CDROM&lt;br /&gt;
&lt;br /&gt;
    kfmclient exec file:/home/weis/data/test.html&lt;br /&gt;
&lt;br /&gt;
Opens the file with default binding.&lt;br /&gt;
&lt;br /&gt;
    kfmclient exec file:/home/weis/data/test.html Netscape&lt;br /&gt;
&lt;br /&gt;
Opens the file with netscape&lt;br /&gt;
&lt;br /&gt;
    kfmclient exec ftp://localhost/&lt;br /&gt;
&lt;br /&gt;
Opens new window with URL&lt;br /&gt;
&lt;br /&gt;
    kfmclient exec file:/root/Desktop/emacs.desktop&lt;br /&gt;
&lt;br /&gt;
Starts emacs&lt;br /&gt;
&lt;br /&gt;
    kfmclient exec file:/root/Desktop/cdrom.desktop&lt;br /&gt;
&lt;br /&gt;
Opens the CD-ROM's mount directory&lt;br /&gt;
&lt;br /&gt;
    kfmclient exec .&lt;br /&gt;
&lt;br /&gt;
Opens the current directory. Very convenient.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient copy 'src' 'dest''''&lt;br /&gt;
&lt;br /&gt;
Copies the URL 'src' to 'dest'. 'src' may be a list of URLs.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient move 'src' 'dest''''&lt;br /&gt;
&lt;br /&gt;
Moves the URL 'src' to 'dest'. 'src' may be a list of URLs.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient sortDesktop'''&lt;br /&gt;
&lt;br /&gt;
Rearranges all icons on the desktop.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient configure'''&lt;br /&gt;
&lt;br /&gt;
Re-read konqueror's configuration.&lt;br /&gt;
&lt;br /&gt;
'''kfmclient configureDesktop'''&lt;br /&gt;
&lt;br /&gt;
Re-read kdesktop's configuration.&lt;br /&gt;
&lt;br /&gt;
== Usage example ==&lt;br /&gt;
&lt;br /&gt;
Here is a simple example of how you can use the kfmclient interface. It is a simple shell script to open a kfm window in the current working directory (I call this script &amp;quot;here&amp;quot;).&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  #!/bin/sh&lt;br /&gt;
  exec kfmclient openURL .&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tools/Using_kde-config</id>
		<title>Development/Tools/Using kde-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tools/Using_kde-config"/>
				<updated>2007-01-16T15:09:45Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: code formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Finding about KDE's installation : kde-config =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
''kde-config'' is a small utility for determining how KDE is installed. It can be used for debugging purposes, or in Makefiles for simple projects that don't want to use the full autoconf/automake framework.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
kde-config --help gives:&lt;br /&gt;
&lt;br /&gt;
    Options:&lt;br /&gt;
      '''--expandvars'''              expand ${prefix} and ${exec_prefix} in output&lt;br /&gt;
      '''--prefix'''                  Compiled in prefix for KDE libraries&lt;br /&gt;
      '''--exec-prefix'''             Compiled in exec_prefix for KDE libraries&lt;br /&gt;
      '''--localprefix'''             Prefix in $HOME used to write files&lt;br /&gt;
      '''--version'''                 Compiled in version string for KDE libraries&lt;br /&gt;
      '''--types'''                   Available KDE resource types&lt;br /&gt;
      '''--path type'''               Search path for resource type&lt;br /&gt;
      '''--install type'''            Prefix to install resource files to    &lt;br /&gt;
&lt;br /&gt;
kde-config --types gives:&lt;br /&gt;
&lt;br /&gt;
    '''apps''' - Applications menu (.desktop files)&lt;br /&gt;
    '''config''' - Configuration files&lt;br /&gt;
    '''data''' - Where applications store data&lt;br /&gt;
    '''exe''' - Executables in $prefix/bin&lt;br /&gt;
    '''html''' - HTML documentation&lt;br /&gt;
    '''icon''' - Icons&lt;br /&gt;
    '''lib''' - Libraries&lt;br /&gt;
    '''locale''' - Translation files for KLocale&lt;br /&gt;
    '''mime''' - Mime types&lt;br /&gt;
    '''pixmap''' - unknown type&lt;br /&gt;
    '''services''' - Services&lt;br /&gt;
    '''servicetypes''' - Service types&lt;br /&gt;
    '''sound''' - Application sounds&lt;br /&gt;
    '''templates''' - Templates&lt;br /&gt;
    '''wallpaper''' - Wallpapers  &lt;br /&gt;
&lt;br /&gt;
These are valid inputs of --path and --install.&lt;br /&gt;
--install gives the paths kdelibs was compiled for, while --path gives the whole set of paths as they are searched in the current environment.&lt;br /&gt;
&lt;br /&gt;
So while '''--path config''' can return &amp;lt;code&amp;gt;/home/coolo/.kde/share/config:/etc/kde2:/opt/kde2/share/config&amp;lt;/code&amp;gt;&lt;br /&gt;
'''--install config''' will return &amp;lt;code&amp;gt;${prefix}/share/config&amp;lt;/code&amp;gt;&lt;br /&gt;
you can ask for '''--prefix''' too, and '''--expandvars''' expands this right for you and gives: &amp;lt;code&amp;gt;/home/coolo/KDE/share/config&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tools/Using_kde-config</id>
		<title>Development/Tools/Using kde-config</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tools/Using_kde-config"/>
				<updated>2007-01-16T15:00:00Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: ported page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Finding about KDE's installation : kde-config =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
kde-config is a small utility for determining how KDE is installed. It can be used for debugging purposes, or in Makefiles for simple projects that don't want to use the full autoconf/automake framework.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
kde-config --help gives:&lt;br /&gt;
&lt;br /&gt;
    Options:&lt;br /&gt;
      '''--expandvars'''              expand ${prefix} and ${exec_prefix} in output&lt;br /&gt;
      '''--prefix'''                  Compiled in prefix for KDE libraries&lt;br /&gt;
      '''--exec-prefix'''             Compiled in exec_prefix for KDE libraries&lt;br /&gt;
      '''--localprefix'''             Prefix in $HOME used to write files&lt;br /&gt;
      '''--version'''                 Compiled in version string for KDE libraries&lt;br /&gt;
      '''--types'''                   Available KDE resource types&lt;br /&gt;
      '''--path type'''               Search path for resource type&lt;br /&gt;
      '''--install type'''            Prefix to install resource files to    &lt;br /&gt;
&lt;br /&gt;
kde-config --types gives:&lt;br /&gt;
&lt;br /&gt;
    '''apps''' - Applications menu (.desktop files)&lt;br /&gt;
    '''config''' - Configuration files&lt;br /&gt;
    '''data''' - Where applications store data&lt;br /&gt;
    '''exe''' - Executables in $prefix/bin&lt;br /&gt;
    '''html''' - HTML documentation&lt;br /&gt;
    '''icon''' - Icons&lt;br /&gt;
    '''lib''' - Libraries&lt;br /&gt;
    '''locale''' - Translation files for KLocale&lt;br /&gt;
    '''mime''' - Mime types&lt;br /&gt;
    '''pixmap''' - unknown type&lt;br /&gt;
    '''services''' - Services&lt;br /&gt;
    '''servicetypes''' - Service types&lt;br /&gt;
    '''sound''' - Application sounds&lt;br /&gt;
    '''templates''' - Templates&lt;br /&gt;
    '''wallpaper''' - Wallpapers  &lt;br /&gt;
&lt;br /&gt;
These are valid inputs of --path and --install.&lt;br /&gt;
--install gives the paths kdelibs was compiled for, while --path gives the whole set of paths as they are searched in the current environment.&lt;br /&gt;
&lt;br /&gt;
So while '''--path config''' can return /home/coolo/.kde/share/config:/etc/kde2:/opt/kde2/share/config&lt;br /&gt;
'''--install config''' will return ${prefix}/share/config&lt;br /&gt;
you can ask for '''--prefix''' too, and '''--expandvars''' expands this right for you and gives: /home/coolo/KDE/share/config&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Contribute</id>
		<title>Contribute</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Contribute"/>
				<updated>2007-01-16T14:22:31Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: Added internal links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page intends to give an overview of the different aspects of KDE development in particular for programming related issues.&lt;br /&gt;
&lt;br /&gt;
There are a lot of ways to get involved in KDE development, which can be summed up in several categories:&lt;br /&gt;
* [[#Getting Started with Documentation|Documentation]]&lt;br /&gt;
* [[#Getting Started with Usability|Translation]]&lt;br /&gt;
* Development&lt;br /&gt;
* [[#Getting Started with Usability|Usability]]&lt;br /&gt;
* [[#Getting Started with Accessibility|Accessibility]]&lt;br /&gt;
* [[#Getting Started with Artwork|Artwork]]&lt;br /&gt;
* [[#Getting Involved in Bug Hunting and Application Quality|Bug Hunting]]&lt;br /&gt;
* Promotion&lt;br /&gt;
Especially for tasks other than development (writing code) KDE's pages about [http://kde.org/getinvolved/ how to get involved] give a good overview.&lt;br /&gt;
&lt;br /&gt;
'''The KDE project welcomes anyone willing to help'''.&lt;br /&gt;
&lt;br /&gt;
== News and Mail Sources ==&lt;br /&gt;
The general direction of the KDE project is determined by those who do the work - there is no single high level plan for what KDE will look like in the future.&lt;br /&gt;
&lt;br /&gt;
If you want to find out what is currently happening, then there are a number of sources you might like to consider:&lt;br /&gt;
; [http://www.kde.org/mailinglists/ Mailing Lists]&lt;br /&gt;
: Probably the best way to find out what's going on in KDE development. Archives are available [http://lists.kde.org here]&lt;br /&gt;
&lt;br /&gt;
; [http://commitfilter.kde.org/ CommitFilter]&lt;br /&gt;
: Receive notification of [http://en.wikipedia.org/wiki/Subversion SVN] commits in areas that interest you.&lt;br /&gt;
&lt;br /&gt;
; [http://commit-digest.org/ KDE Commit-Digest]&lt;br /&gt;
: Weekly summary of SVN commits.&lt;br /&gt;
&lt;br /&gt;
; [http://dot.kde.org/ The Dot]&lt;br /&gt;
: The KDE news site.&lt;br /&gt;
&lt;br /&gt;
== Getting Started with Coding ==&lt;br /&gt;
Getting started at ''coding'' in KDE is a matter of finding something to fix, and fixing it. You may want to consult the module overview to help find what you are looking for; once you have fixed something, you will want to send in a patch. If you do that a few times, you may want to apply for an SVN account so you can fix things directly.&lt;br /&gt;
* [[/List of KDE Modules|Module overview]]&lt;br /&gt;
* [[/Send Patches|Sending patches]]&lt;br /&gt;
* [[/Get a SVN Account|Applying for a KDE SVN Account]]&lt;br /&gt;
* [[/First Steps with your KDE SVN Account|First steps with your new SVN account]]&lt;br /&gt;
&lt;br /&gt;
At the moment, there are two choices for development within KDE - you can work on KDE3, or KDE4. KDE3 is a good choice for bug fixing, however the main development work effort (and all new features) is on KDE4. This document mainly focuses on work in support of KDE4.&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
KDE is mostly written in C++. If you are not familiar with C++, you should do at least some work on it. There are a number of good books on C++ - an excellent source is Bruce Eckel's &amp;quot;Thinking in C++&amp;quot;, which is available both as a free download and as a printed document - see http://mindview.net/Books/TICPP/ThinkingInCPP2e.html. It isn't essential to understand everything before you start in KDE, but you do need to understand basic syntax and operations.&lt;br /&gt;
&lt;br /&gt;
=== Qt ===&lt;br /&gt;
To become proficient with KDE coding, you should understand the Qt toolkit. If you are not familiar with Qt, you should work through the tutorials included with Qt. Note that these tutorials are also available online (see http://doc.trolltech.com/latest/examples.html) for the Qt4 version, and http://doc.trolltech.com/3.3/tutorial.html for the Qt3 version.&lt;br /&gt;
&lt;br /&gt;
If you need a gentler introduction to Qt, or would just like an alternative view, then you may wish to look at the [http://qt4.digitalfanatics.org/tiqt/ The Independent Qt Tutorial].&lt;br /&gt;
&lt;br /&gt;
More suggestions on becoming familiar with Qt4 are available at http://doc.trolltech.com/latest/how-to-learn-qt.html. A copy of this documentation is also provided with Qt4.&lt;br /&gt;
&lt;br /&gt;
=== KDE ===&lt;br /&gt;
A range of information on KDE techniques is available in the [[Development/Tutorials|tutorial section]]. Note that some of these tutorials are still based on KDE3, however they should be at least partly applicable.&lt;br /&gt;
&lt;br /&gt;
You will also find useful information on KDE coding in the [[Development/FAQs|FAQs]] section. This information may also be somewhat dated for KDE4, however much of it is broadly applicable, even outside KDE.&lt;br /&gt;
&lt;br /&gt;
A list of some books that may help with KDE coding is provided in the [[Development/Books|Books]] section.&lt;br /&gt;
&lt;br /&gt;
Last, but by no means least, KDE comes with extensive class (Application Programmer Interface) documentation. This is available in the&lt;br /&gt;
[[Development/Tutorials/API Documentation|KDE API Reference Manuals]] section, which also contains a number of useful links on how to write or update the class documentation. You can also generate these on your own machine, or refer to a more up-to-date online version at [http://www.englishbreakfastnetwork.org/apidocs/apidox-4.0/kdelibs-apidocs/ The English Breakfast Network].&lt;br /&gt;
&lt;br /&gt;
A more detailed description of the steps above is available in our [http://quality.kde.org/develop/howto/howtohack.php Programming Guide].&lt;br /&gt;
&lt;br /&gt;
== Getting Started with Documentation ==&lt;br /&gt;
&lt;br /&gt;
KDE documentation work is very important, and can always use more developers to write new documentation, review and proofread current documentation, and to do translations and localization.&lt;br /&gt;
&lt;br /&gt;
For more information on getting started, refer to the [http://i18n.kde.org/docs/gettingstarted.php Joining the KDE Documentation Team] reference. There is a wealth of information on the [http://i18n.kde.org KDE Localization] web site, including list of the [http://i18n.kde.org/teams Translation Teams].&lt;br /&gt;
&lt;br /&gt;
== Getting Started with Usability ==&lt;br /&gt;
&lt;br /&gt;
KDE developers have become increasingly committed to usability, and if you have expertise in this area, you may wish to become involved in the [http://usability.kde.org KDE Usability Project]. The best way to get started is to participate on the mailing list - see the KDE Usability Project [http://usability.kde.org/communication/ Contact page].&lt;br /&gt;
&lt;br /&gt;
== Getting Involved in Accessibility ==&lt;br /&gt;
&lt;br /&gt;
[http://accessibility.kde.org KDE Accessibility] activities (making KDE accessible to all users, including those of us with physical handicaps) are coordinated on the kde-accessibility mailing list (see the KDE Accessibility [http://accessibility.kde.org/contact Contact page]). The best way to become involved is to discuss issues and solutions on the mailing list.&lt;br /&gt;
&lt;br /&gt;
== Getting Started with Artwork ==&lt;br /&gt;
&lt;br /&gt;
For information on getting involved in the KDE art community, see the [http://www.kde-artists.org/ KDE-Artists] website. KDE artists use a combination of IRC and mailing lists.&lt;br /&gt;
&lt;br /&gt;
== Getting Involved in Bug Hunting and Application Quality ==&lt;br /&gt;
&lt;br /&gt;
There are a large number of applications within KDE, and not all of them have a maintainer dedicated to managing bugs and generally helping out with all the issues associated with turning some working code into a polished application.&lt;br /&gt;
&lt;br /&gt;
If you are interested in helping out with KDE, but don't know where to start, becoming a member of the KDE Quality Team might appeal to you - see the [http://quality.kde.org Quality Team website] for more information. Note that you do not need any programming skills to become involved.&lt;br /&gt;
&lt;br /&gt;
Of course, you can become involved in bug hunting without being part of the KDE Quality Team - just create yourself an account on the KDE [http://bugs.kde.org bug tracking system], and start searching / sorting through the bugs. Again, you don't have to have programming skills - it helps the programmers enormously just to have a procedure that allows a bug to be consistently reproduced.&lt;br /&gt;
&lt;br /&gt;
The [[/Bugsquad|Bugsquad]] tries to keep track of bugs in KDE software and make sure that valid bugs are noticed by developers. You do not need any programming knowledge to be in the Bugsquad; in fact it is a great way to return something to the KDE community if you cannot program.&lt;br /&gt;
&lt;br /&gt;
== Historical Sources ==&lt;br /&gt;
&lt;br /&gt;
; [http://www.kerneltraffic.org/kde/ Kernel Cousin KDE]&lt;br /&gt;
: Summary of the development mailing lists. The Kernel Cousin KDE ran for 76 issues, from 10 March 2001 until 16 April 2004. The KDE Commit-Digest (described above) is its logical successor.&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Contribute/Send_Patches</id>
		<title>Contribute/Send Patches</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Contribute/Send_Patches"/>
				<updated>2007-01-16T14:05:48Z</updated>
		
		<summary type="html">&lt;p&gt;Kunalthakar: /* Non-Text Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial shows how to send modifications of code in the right way: '''by using patches'''.&lt;br /&gt;
&lt;br /&gt;
== Notation ==&lt;br /&gt;
&lt;br /&gt;
The word ''developer'' is used here for someone having a KDE SVN account.&lt;br /&gt;
&lt;br /&gt;
== Preliminaries ==&lt;br /&gt;
&lt;br /&gt;
We suppose that you have modified some code in KDE and that you are ready to share it. First a few important points:&lt;br /&gt;
* You must allow that the modification will have the license of the file where the modification is made.&lt;br /&gt;
* Please make sure that the code compiles correctly on a (fairly) recent version of the software.&lt;br /&gt;
&lt;br /&gt;
== What Is a Patch? ==&lt;br /&gt;
&lt;br /&gt;
Now you have the modification as a source file. Sending the source file will not be helpful, as probably someone else has done other modifications to the original file in the meantime. So your modified file could not replace it.&lt;br /&gt;
&lt;br /&gt;
That is why patches exist. Patches list the modifications, the line numbers and a few other useful information to be able to put that patch back into the existing code. (This process is called &amp;quot;patching&amp;quot; or also &amp;quot;applying a patch.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The main tool for creating patches is a tool called '''diff''', which makes the difference between two files. This tool has a mode called ''unified diff'', which KDE developers use. Unified diffs have not just the difference between the file but also the ''neighborhood'' around the differences. That allows to patch even if the line numbers are not the same anymore.&lt;br /&gt;
&lt;br /&gt;
== Creating a Simple File Patch ==&lt;br /&gt;
&lt;br /&gt;
The most simple patch is created between the modified file (here called {{path|source.cpp}}) and the non-modified version of the file (here called {{path|source.cpp.orig}}.)&lt;br /&gt;
 diff -u -p source.cpp.orig source.cpp&lt;br /&gt;
&lt;br /&gt;
That lists the difference between the two files in the unified diff format (and with function name information if possible.) However it only displays it to screen, which is of course not the goal. So you need to redirect the output.&lt;br /&gt;
 diff -u -p source.cpp.orig source.cpp &amp;amp;gt; ~/patch.diff&lt;br /&gt;
&lt;br /&gt;
{{path|~/patch.diff}} is here an example and you can create the file where you prefer with the name that you prefer. (You will soon find out that it is probably not a good idea to create a patch where the source is.)&lt;br /&gt;
&lt;br /&gt;
== The More Common Case ==&lt;br /&gt;
&lt;br /&gt;
But normally, you do not just change one file and you do not keep the original version around to be able to make the difference later. But here too, there is a solution.&lt;br /&gt;
&lt;br /&gt;
The program svn, which is used on the command line interact with the SVN server, has a diff function too: '''svn diff'''.&lt;br /&gt;
&lt;br /&gt;
You can run it like this and it will give you the difference of the current directory and all sub-directories below it. Of course, here too, you want to redirect the output.&lt;br /&gt;
&lt;br /&gt;
 svn diff &amp;amp;gt; ~/patch.diff&lt;br /&gt;
&lt;br /&gt;
There are useful variants too (shown here without redirection)&lt;br /&gt;
* For just one file: '''svn diff source.cpp'''&lt;br /&gt;
* For the current directory only: '''svn diff -N'''&lt;br /&gt;
&lt;br /&gt;
'''Note''': even if svn can make the difference of another directory (svn diff mydirectory), it is not recommended to do it for a patch that should be applied again. (The problem is that the person that will apply the patch will have to be more careful about how he applies it.)&lt;br /&gt;
&lt;br /&gt;
'''Note''': for simple diff, like those shown in the examples above, '''svn diff''' can be used offline, therefore without an active connection to the KDE SVN server. This is possible, as svn keeps a copy of the original files locally. (This feature is part of the design of SVN.)&lt;br /&gt;
&lt;br /&gt;
By default, svn diff does not have a feature like the &amp;lt;tt&amp;gt;-p&amp;lt;/tt&amp;gt; parameter of diff. But svn allows that an external diff program is called, so you can call diff:&lt;br /&gt;
 svn diff --diff-cmd diff --extensions &amp;quot;-u -p&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Non-Text Files ==&lt;br /&gt;
&lt;br /&gt;
The procedures described above work very well with text files, for example C++ source code. However they do not work with binary files, as diff is not made to handle them. And even if SVN can internally store binary differences, svn diff is not prepared to do anything similar yet, mainly because it currently uses the unified diff format only, which is not meant for binary data.&lt;br /&gt;
&lt;br /&gt;
Therefore, unfortunately, there is little choice but to attach binary files separately from the patch, of course attached in the same email.&lt;br /&gt;
&lt;br /&gt;
== New Files ==&lt;br /&gt;
&lt;br /&gt;
First, you need to make svn aware of files you have added.&lt;br /&gt;
 svn add path/to/new/file /path/to/another/new/file&lt;br /&gt;
&lt;br /&gt;
Then run '''svn diff''' as before.&lt;br /&gt;
&lt;br /&gt;
Note that if you do '''svn revert''', for example, the files you created will NOT be deleted by svn - but svn will no longer care about them (so they won't show up when you do '''svn diff''', for example).  You will have to '''rm''' them manually.&lt;br /&gt;
&lt;br /&gt;
(TODO: are there any other issues with adding new files if you don't have commit access?)&lt;br /&gt;
&lt;br /&gt;
== How To Share the Patch? ==&lt;br /&gt;
&lt;br /&gt;
Now you are ready to share the patch. If your patch fixes a bug from [http://bugs.kde.org KDE Bugs], then the easiest way is to attach it there, see next section.&lt;br /&gt;
&lt;br /&gt;
The main way of sharing a patch is to email to a mailing list. But be careful not to send big patches to a mailing list, a few 10KB is the limit.&lt;br /&gt;
&lt;br /&gt;
If you find that the patch is too big to send to a mailing list, the best is to create a bug report in [http://bugs.kde.org KDE Bugs] and to attach the patch there, after having created the bug report.&lt;br /&gt;
&lt;br /&gt;
Another possibility, however seldom used, is to post the patch on a public Web server (be it by HTTP or FTP) and to send an email to the mailing list, telling that the patch is waiting there.&lt;br /&gt;
&lt;br /&gt;
Another variant is to ask on the mailing list which developer is ready to get a big patch. (Try to give its size and ask if you should send it compressed, for example by bzip2.)&lt;br /&gt;
&lt;br /&gt;
A last variant, if you know exactly which developer will process the patch and that you know or that you suppose that he currently has time, is to send the patch to a developer directly. (But here too, be careful if your patch is big. Some KDE developers have still analog modems.)&lt;br /&gt;
&lt;br /&gt;
=== Patches for KDE Bugs ===&lt;br /&gt;
&lt;br /&gt;
In this section we assume that you have chosen to add your patch to an exisiting KDE bugs or that you create a bug report just for your patch.&lt;br /&gt;
&lt;br /&gt;
Even if this tutorial is more meant to send patches to a mailing list, most of it can be applied to adding a patch to [http://bugs.kde.org KDE Bugs].&lt;br /&gt;
&lt;br /&gt;
You have two ways to do it:&lt;br /&gt;
* online, by selecting the bug report and using the web interface to add attachements.&lt;br /&gt;
* offline, by emailing to the bug report.&lt;br /&gt;
&lt;br /&gt;
To send an email to a bug report, you can use an email address of the form '''12345@bugs.kde.org''' where 12345 is the bug number. Please be sure to attach your patch and not to have it inlined in your text. (If it is inlined, it would be corrupted by KDE Bugs, as HTML does not respect spaces.)&lt;br /&gt;
&lt;br /&gt;
'''Note''': if you send an email to KDE Bugs, be careful to use as sender the same email address as your login email address in KDE Bugs. Otherwise KDE Bugs will reject your email.&lt;br /&gt;
&lt;br /&gt;
'''Note''': if you create a new bug report just for your patch, be careful that you cannot attach a patch directly when creating a new bug. However as soon as the new bug is created, you can then attach files, one-by-one, therefore also patches.&lt;br /&gt;
&lt;br /&gt;
=== Which Mailing List? ===&lt;br /&gt;
&lt;br /&gt;
Assuming that you have chosen to sent the patch to a mailing list, you might ask yourself: to which one?&lt;br /&gt;
&lt;br /&gt;
The best destination for patches is the [http://www.kde.org/mailinglists corresponding developer mailing list].&lt;br /&gt;
&lt;br /&gt;
In case of doubt, you can send any patch for KDE to the [mailto:kde-devel@kde.org kde-devel mailing list]. (However with an increased risk that you would miss the right developer.)&lt;br /&gt;
&lt;br /&gt;
Of course, if you know exactly which developer will process the patch and that you know or that you suppose that he currently has time, then you can send the patch to him directly.&lt;br /&gt;
&lt;br /&gt;
=== Preparing The Email ===&lt;br /&gt;
&lt;br /&gt;
Now you have a patch redirected into a file (for this example called patch.diff), you are ready to send it by email. But the first question: where?&lt;br /&gt;
&lt;br /&gt;
Now that you have entered an email address, a good practice is to attach the patch to your file before writing anything else in the email. So you will not forget to attach it.&lt;br /&gt;
&lt;br /&gt;
A little note here: yes, in KDE (unlike for the Linux Kernel for example), we prefer to have the patches sent as attachments.&lt;br /&gt;
&lt;br /&gt;
Now you are ready to write the rest of the email. Please think of a title that matches your patch. (Think of having to find it again in [http://lists.kde.org the archives] in a few months or even years.) A good habit is to precede the title by &amp;lt;nowiki&amp;gt;[PATCH]&amp;lt;/nowiki&amp;gt;. So for example a title could be &amp;lt;nowiki&amp;gt;[PATCH] Fix backup files&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As for the body of the email, please tell to which file or directory your patch applies. For example for a file:&lt;br /&gt;
''The attached patch applies to the file koffice/kword/kwdoc.cpp'' or for a directory: ''The attached patch applies to the directory koffice/kword''. This help the developers to have an overview of which code has been modified. Also tell for which branch it is meant, for example for trunk.&lt;br /&gt;
&lt;br /&gt;
Then tell what your patch does. If it fixes a bug, then please give the bug number too. If the bug was not registered in [http://bugs.kde.org KDE Bugs], then please describe instead the bug that is fixed. Similarly, if you know that the patch fixes a bug introduced from a precise SVN revision, please add the revision number.&lt;br /&gt;
&lt;br /&gt;
Tell also what could be useful to the developers, for examples if you could not completely test the patch (and why), if you need help to finish fixing the code or if it is a quick&amp;amp;dirty solution that should be fixed better in long-term.&lt;br /&gt;
&lt;br /&gt;
Now check the email again to see if you have not forgotten anything (especially to attach the patch) and you can send the email.&lt;br /&gt;
&lt;br /&gt;
=== And Now? ===&lt;br /&gt;
&lt;br /&gt;
Now you have to wait that a developer reacts on your patch. (If you are not subscribed to the mailing lists where you have sent the patch, then monitor [http://lists.kde.org the mailing list archives]] for such a message.)&lt;br /&gt;
&lt;br /&gt;
The reaction is normally one of the following:&lt;br /&gt;
* No developer answers. (That is unfortunately happening from time to time.)&lt;br /&gt;
* The developer does not want your patch, as he is working on the same code.&lt;br /&gt;
* The developer does not like your patch.&lt;br /&gt;
* The developer finds that you should change a few things.&lt;br /&gt;
* The developer finds the patch good and tells that he will work on it.&lt;br /&gt;
* The developer accepts your patch as it is.&lt;br /&gt;
&lt;br /&gt;
The first case is when nobody has answered. That perhaps means that you have chosen the wrong mailing list. Perhaps you have not explained correctly what the patch fixes or you have given a title that is not precise enough. If this happens, the developer might have overseen the patch. Perhaps the developer that should have answered has not any time currently. (That too happens unfortunately.) The best is to try to work a little more on the patch, make a better description and try again a second time, perhaps to another mailing list or to use [http://bugs.kde.org KDE Bugs] instead.&lt;br /&gt;
&lt;br /&gt;
If the developer tells you that your patch conflicts with changes that he is currently doing, you could probably not do much against it. Maybe you can discuss with him how you can effectively work with him on this piece of code.&lt;br /&gt;
&lt;br /&gt;
If your patch was not accepted, you could work further on it. Probably you should discuss the problem on the mailing list to know in which direction you should work further.&lt;br /&gt;
&lt;br /&gt;
If a developer wants a few changes, then work on the code to make the changes according to the critic. If you need help because you do not understand how to do the needed change, then ask it on the mailing list.&lt;br /&gt;
&lt;br /&gt;
If your patch was accepted, congratulation! :)&lt;/div&gt;</summary>
		<author><name>Kunalthakar</name></author>	</entry>

	</feed>