<?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=Chackal+sjc&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=Chackal+sjc&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Special:Contributions/Chackal_sjc"/>
		<updated>2013-05-18T23:08:29Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/User:Chackal_sjc</id>
		<title>User:Chackal sjc</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User:Chackal_sjc"/>
				<updated>2011-02-16T11:08:30Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
My name is Felipe Ferreri Tonello and I'm from Brazil.&lt;br /&gt;
I really love KDE and its application, so I want to contribuite more and more..&lt;br /&gt;
&lt;br /&gt;
== My Contribution ==&lt;br /&gt;
* KSysGuard&lt;br /&gt;
&lt;br /&gt;
== Contact Me ==&lt;br /&gt;
I'm usually on freenode, look for &amp;quot;chackal_sjc&amp;quot;. And my e-mail is chackal_sjc at users.sourceforge.net.&lt;/div&gt;</summary>
		<author><name>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-12-04T16:48:54Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Problemas */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== O Shell Para Desenvolvimento ==&lt;br /&gt;
&lt;br /&gt;
Em alguns sistemas um novo usuário é configurado por padrão para usar o {{path|/bin/sh}}. Se esse não é o caso do seu sistema, você pode pular essa sessão. Usando {{path|/bin/sh}} pode ser bastante inconveniente para trabalhar e talvez você queria mudar isso para {{path|/bin/bash}} ou outro shell.&lt;br /&gt;
No Ark Linux, Fedora e Slackware, você pode pular esse passo - {{path|/bin/sh}} é {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Como o usuário kde-devel ===&lt;br /&gt;
&lt;br /&gt;
Se você não tem acesso ao root e seu sistema suporta a mudança do seu próprio shell com o aplicativo &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt;, então você pode tentar mudar seu shell para {{path|/bin/bash}} assim:&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: Como o usuário root ===&lt;br /&gt;
&lt;br /&gt;
Se seu sistema vem com a aplicação &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; você pode rodar o seguinte comando como root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Outra opção é de usar a aplicação &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; como root para editar com segurança seu {{path|/etc/passwd}}. Ache o 'kde-devel' no arquivo. Mude '{{path|/bin/sh}}' no final da linha para '{{path|/bin/bash}}', salve as mudanças e saia.&lt;br /&gt;
&lt;br /&gt;
O novo shell vai startar automaticamente quando você entrar como o usuário kde-devel.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
O QtDBus e KDE são conhecidos por trabalhar com versões 0.62, também com 0.92 e superiores, do D-Bus. As versões 0.60 e 0.61 podem funcionar também mas não foram testadas. Nós recomendamos usar a versão post-1.0 release (pelo menos a 0.94), então atualize se você não o fez.&lt;br /&gt;
&lt;br /&gt;
Você pode pular essa parte se você já tem uma versão recente do D-Bus ou se não quer atualizar. Provavelmente você não quer compilar os bindings ao menos que você irá ter que compilar o HAL (ver abaixo).&lt;br /&gt;
&lt;br /&gt;
Antes de continuar com os passos, tenha certeza que os cabeçalhos do X11 e as bibliotecas estão habilitadas. O script configure roda na linha 5, a seguinte instrução deverá aparecer para confirmar:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Tenha certeza que você configurou o ambiente corretamente como feito [[Getting_Started/Build/KDE4_%28pt_BR%29#Configure_o_Ambiente|acima]]. Isso é necessário para as funções &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; e &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; funcionarem.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' é uma função bash, clique aqui para saber mais(inglês)]] &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 # ver acima&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;
=== O Quê Aconteceu === &lt;br /&gt;
Depois de mudar para o diretório do código fonte(linha 1), o código fonte do D-Bus é baixado pelo freedesktop.org (linha 2) e descompactado (linha 3). Depois entra no diretório criado para o D-Bus (linha 4), as configurações de compilação são criadas pelo script {{path|configure}} (linha 5). Depois da compilação (linha 6) e instalação (linha 7) do D-Bus, nós usamos a ferramenta &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; para instalar o arquivo de identificação da maquina (machine identification file) que permite o bus começar automaticamente quando a sessão do desktop começar (linha 8).&lt;br /&gt;
&lt;br /&gt;
Note que você precisa de permissão de escrita no {{path|/var}} para os dois últimos passos. Se seu sistema não tem acesso ao comando sudo, você pode usar o comando &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt;, ex. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Os passos para compilar os bindings do glib são similares aos acima.&lt;br /&gt;
&lt;br /&gt;
Então quando esses dois pacotes estão compilados e instalados, nós precisamos arrumar o dono do arquivo pois ao usar 'sudo make install' o root que fica como dono do arquivo e dos diretórios no ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Pule essa parte se você têm o [http://cmake.org/ CMake] &amp;gt;=2.4.5 instalado. &lt;br /&gt;
Você pode baixar os pacotes binários diretamente do [http://www.cmake.org/HTML/Download.html CMake site]. Existem também pacotes específicos para diversas distribuições.&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&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' é uma função bash, clique aqui para saber mais(inglês) ]] &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;
=== O Quê Aconteceu ===&lt;br /&gt;
Primeiro, vamos ao diretório do código fonte (linha 1), baixamos o código fonte do CMake (linha 2) e os descompactamos (linha 3). Criamos um diretório para compilar o CMake (linha 4) e entramos nele (linha 5). Rodamos o script de bootstrap do CMake para configurar a compilação (linha 6), depois compilamos (linha 7) e instalamos (linha 8) usando o usuário root.&lt;br /&gt;
&lt;br /&gt;
Se seu sistema não tem acesso ao comando &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, então você pode usar o &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;
Agora precisamos instalar o Qt4 que está no repositório do KDE. KDE é garantido com qualquer Qt 4.3. Qt 4.2 e antigos não são suportados e não irá funcionar. Você deve usar a cópia do Qt no server Subversion do KDE. (nota: algumas distros, tais como Debian e openSUSE, dão um suporte ao Qt com patches do KDE svn, então você pode usar o método pré-compilado da sua distro, porque eles irão funcionar normalmente). KDE tenta garantir que o código é compativel com o Qt 4.3.0, mas você pode pegar alguns bugfixes adicionais usando o qt-copy (entretanto, sua distribuição já deve cuidar desses bugfixes, então na maioria das vezes a distro já disponibiliza uma versão com atualizações suficientes). Para maior referência sobre distribuições, acesse as sessões acima.&lt;br /&gt;
&lt;br /&gt;
Por enquanto a compatibilidade com o Qt3 é obrigatória, porfavor &amp;lt;b&amp;gt;evite&amp;lt;/b&amp;gt; usar a opção &amp;quot;-no-qt3support&amp;quot; quando for compilar o Q4.&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
 cd # Note: qt-copy fica em $HOME/qt-copy. Veja $QTDIR em [[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;
 # se não instalamos, só limpa os arquivos obj para&lt;br /&gt;
 # limpar memória no disco&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;
=== O Quê Aconteceu ===&lt;br /&gt;
Nós mudamos de volta para o diretório home do usuário &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; (linha 1) e fizemos o download do código usando o subversion (svn) pelo repositório do KDE (linha 2). Depois acessamos o diretório {{path|qt-copy}} (linha 3), rodamos o script que manipula os patches que vem com o &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (linha 4). &lt;br /&gt;
&lt;br /&gt;
Uma vez que os patches foi feito, nós rodamos o script &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; para configurar a instalação (linha 5-6). Os comandos de linha usados são explicados no arquivo {{path|qt-copy/README.qt-copy}}. Finalmente, nós compilamos os requerimentos minimos para o KDE (linha 7) e instalamos (linha 10) o Qt. Se o diretório de instalação for o mesmo do diretório corrente (line 8), então só limpamos um pouco de espaço (linha 9). Se você quiser todos os exemplos e aplicações demo, você pode compilar individualmente ou simplismente dar um &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; no diretório {{path|qt-copy}}. &lt;br /&gt;
&lt;br /&gt;
Note que a instalação não requer root já que o Qt é instalado localmente no {{path|$QTDIR}}. Mas, a instalação só é necessário se o {{path|$QTDIR}} for diferente do {{path|$HOME/qt-copy}}, que não é o caso se você seguiu todas as instruções corretamente.&lt;br /&gt;
&lt;br /&gt;
=== Problemas ===&lt;br /&gt;
Se você teve &amp;quot;error: X11/Xlib.h: No such file or directory&amp;quot;, instale o devel package do &amp;lt;tt&amp;gt;xorg&amp;lt;/tt&amp;gt; (o nome varia bastante da distribuição, por exemplo é &amp;lt;tt&amp;gt;xorg-dev&amp;lt;/tt&amp;gt; nos sistemas baseados em Ubunto como o Kubuntu). &lt;br /&gt;
&lt;br /&gt;
Se você teve um erro de no passo de configuração (linha 5-6), cheque o valor da variável &amp;lt;tt&amp;gt;$QMAKESPEC&amp;lt;/tt&amp;gt;. Algumas distribuições setam essa variável apontado diretamente pro diretório Qt do sitema. Se &amp;lt;tt&amp;gt;unset QMAKESPEC&amp;lt;/tt&amp;gt; resolver seu problema, então provavelmente você quer adicionar no seu script &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Se você teve um erro &amp;quot;.pch/debug-shared/QtCore&amp;quot;, isso é porque o Qt-4.3 habilita  cabeçalhos pré-compilados para o gcc suportar isso, mas por alguma rasão isso não funcionou para você. Se você usar distcc, configure o qt com -no-pch. Se você usa o icecream, atualize para a útlima versão do svn trunk.&lt;br /&gt;
&lt;br /&gt;
Tente rodar qualquer programa Qt, como o {{program|assistant}}. '''Nota:''' Você talvez precise rodar &amp;lt;tt&amp;gt;xhost +local:kde-devel&amp;lt;/tt&amp;gt; com seu usuário normal do kde3 para rodar essa aplicação.  Se der erro no QSpanData::adjustSpanMethods, então seu problema é o style. Tente remover {{path|lib/kde4/plugins/styles/kstyle-oxygen.so}} e {{path|lib/kde4/plugins/styles/oxygen.so}} se eles existirem no prefixo de instalação do KDE.&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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-12-04T16:47:18Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Qt */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== O Shell Para Desenvolvimento ==&lt;br /&gt;
&lt;br /&gt;
Em alguns sistemas um novo usuário é configurado por padrão para usar o {{path|/bin/sh}}. Se esse não é o caso do seu sistema, você pode pular essa sessão. Usando {{path|/bin/sh}} pode ser bastante inconveniente para trabalhar e talvez você queria mudar isso para {{path|/bin/bash}} ou outro shell.&lt;br /&gt;
No Ark Linux, Fedora e Slackware, você pode pular esse passo - {{path|/bin/sh}} é {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Como o usuário kde-devel ===&lt;br /&gt;
&lt;br /&gt;
Se você não tem acesso ao root e seu sistema suporta a mudança do seu próprio shell com o aplicativo &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt;, então você pode tentar mudar seu shell para {{path|/bin/bash}} assim:&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: Como o usuário root ===&lt;br /&gt;
&lt;br /&gt;
Se seu sistema vem com a aplicação &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; você pode rodar o seguinte comando como root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Outra opção é de usar a aplicação &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; como root para editar com segurança seu {{path|/etc/passwd}}. Ache o 'kde-devel' no arquivo. Mude '{{path|/bin/sh}}' no final da linha para '{{path|/bin/bash}}', salve as mudanças e saia.&lt;br /&gt;
&lt;br /&gt;
O novo shell vai startar automaticamente quando você entrar como o usuário kde-devel.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
O QtDBus e KDE são conhecidos por trabalhar com versões 0.62, também com 0.92 e superiores, do D-Bus. As versões 0.60 e 0.61 podem funcionar também mas não foram testadas. Nós recomendamos usar a versão post-1.0 release (pelo menos a 0.94), então atualize se você não o fez.&lt;br /&gt;
&lt;br /&gt;
Você pode pular essa parte se você já tem uma versão recente do D-Bus ou se não quer atualizar. Provavelmente você não quer compilar os bindings ao menos que você irá ter que compilar o HAL (ver abaixo).&lt;br /&gt;
&lt;br /&gt;
Antes de continuar com os passos, tenha certeza que os cabeçalhos do X11 e as bibliotecas estão habilitadas. O script configure roda na linha 5, a seguinte instrução deverá aparecer para confirmar:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Tenha certeza que você configurou o ambiente corretamente como feito [[Getting_Started/Build/KDE4_%28pt_BR%29#Configure_o_Ambiente|acima]]. Isso é necessário para as funções &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; e &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; funcionarem.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' é uma função bash, clique aqui para saber mais(inglês)]] &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 # ver acima&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;
=== O Quê Aconteceu === &lt;br /&gt;
Depois de mudar para o diretório do código fonte(linha 1), o código fonte do D-Bus é baixado pelo freedesktop.org (linha 2) e descompactado (linha 3). Depois entra no diretório criado para o D-Bus (linha 4), as configurações de compilação são criadas pelo script {{path|configure}} (linha 5). Depois da compilação (linha 6) e instalação (linha 7) do D-Bus, nós usamos a ferramenta &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; para instalar o arquivo de identificação da maquina (machine identification file) que permite o bus começar automaticamente quando a sessão do desktop começar (linha 8).&lt;br /&gt;
&lt;br /&gt;
Note que você precisa de permissão de escrita no {{path|/var}} para os dois últimos passos. Se seu sistema não tem acesso ao comando sudo, você pode usar o comando &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt;, ex. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Os passos para compilar os bindings do glib são similares aos acima.&lt;br /&gt;
&lt;br /&gt;
Então quando esses dois pacotes estão compilados e instalados, nós precisamos arrumar o dono do arquivo pois ao usar 'sudo make install' o root que fica como dono do arquivo e dos diretórios no ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Pule essa parte se você têm o [http://cmake.org/ CMake] &amp;gt;=2.4.5 instalado. &lt;br /&gt;
Você pode baixar os pacotes binários diretamente do [http://www.cmake.org/HTML/Download.html CMake site]. Existem também pacotes específicos para diversas distribuições.&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&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' é uma função bash, clique aqui para saber mais(inglês) ]] &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;
=== O Quê Aconteceu ===&lt;br /&gt;
Primeiro, vamos ao diretório do código fonte (linha 1), baixamos o código fonte do CMake (linha 2) e os descompactamos (linha 3). Criamos um diretório para compilar o CMake (linha 4) e entramos nele (linha 5). Rodamos o script de bootstrap do CMake para configurar a compilação (linha 6), depois compilamos (linha 7) e instalamos (linha 8) usando o usuário root.&lt;br /&gt;
&lt;br /&gt;
Se seu sistema não tem acesso ao comando &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, então você pode usar o &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;
Agora precisamos instalar o Qt4 que está no repositório do KDE. KDE é garantido com qualquer Qt 4.3. Qt 4.2 e antigos não são suportados e não irá funcionar. Você deve usar a cópia do Qt no server Subversion do KDE. (nota: algumas distros, tais como Debian e openSUSE, dão um suporte ao Qt com patches do KDE svn, então você pode usar o método pré-compilado da sua distro, porque eles irão funcionar normalmente). KDE tenta garantir que o código é compativel com o Qt 4.3.0, mas você pode pegar alguns bugfixes adicionais usando o qt-copy (entretanto, sua distribuição já deve cuidar desses bugfixes, então na maioria das vezes a distro já disponibiliza uma versão com atualizações suficientes). Para maior referência sobre distribuições, acesse as sessões acima.&lt;br /&gt;
&lt;br /&gt;
Por enquanto a compatibilidade com o Qt3 é obrigatória, porfavor &amp;lt;b&amp;gt;evite&amp;lt;/b&amp;gt; usar a opção &amp;quot;-no-qt3support&amp;quot; quando for compilar o Q4.&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
 cd # Note: qt-copy fica em $HOME/qt-copy. Veja $QTDIR em [[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;
 # se não instalamos, só limpa os arquivos obj para&lt;br /&gt;
 # limpar memória no disco&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;
=== O Quê Aconteceu ===&lt;br /&gt;
Nós mudamos de volta para o diretório home do usuário &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; (linha 1) e fizemos o download do código usando o subversion (svn) pelo repositório do KDE (linha 2). Depois acessamos o diretório {{path|qt-copy}} (linha 3), rodamos o script que manipula os patches que vem com o &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (linha 4). &lt;br /&gt;
&lt;br /&gt;
Uma vez que os patches foi feito, nós rodamos o script &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; para configurar a instalação (linha 5-6). Os comandos de linha usados são explicados no arquivo {{path|qt-copy/README.qt-copy}}. Finalmente, nós compilamos os requerimentos minimos para o KDE (linha 7) e instalamos (linha 10) o Qt. Se o diretório de instalação for o mesmo do diretório corrente (line 8), então só limpamos um pouco de espaço (linha 9). Se você quiser todos os exemplos e aplicações demo, você pode compilar individualmente ou simplismente dar um &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; no diretório {{path|qt-copy}}. &lt;br /&gt;
&lt;br /&gt;
Note que a instalação não requer root já que o Qt é instalado localmente no {{path|$QTDIR}}. Mas, a instalação só é necessário se o {{path|$QTDIR}} for diferente do {{path|$HOME/qt-copy}}, que não é o caso se você seguiu todas as instruções corretamente.&lt;br /&gt;
&lt;br /&gt;
=== Problemas ===&lt;br /&gt;
Se você teve &amp;quot;error: X11/Xlib.h: No such file or directory&amp;quot;, instale o devel package do &amp;lt;tt&amp;gt;xorg&amp;lt;/tt&amp;gt; (o nome varia bastante da distribuição, por exemplo é &amp;lt;tt&amp;gt;xorg-dev&amp;lt;/tt&amp;gt; nos sistemas baseados em Ubunto como o Kubuntu). &lt;br /&gt;
&lt;br /&gt;
Se você teve um erro de no passo de configuração (linha 5-6), cheque o valor da variável &amp;lt;tt&amp;gt;$QMAKESPEC&amp;lt;/tt&amp;gt;. Algumas distribuições setam essa variável apontado diretamente pro diretório Qt do sitema. Se &amp;lt;tt&amp;gt;unset QMAKESPEC&amp;lt;/tt&amp;gt; resolver seu problema, então provavelmente você quer adicionar no seu script &amp;lt;tt&amp;gt;~/.bashrc&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Se você teve um erro &amp;quot;.pch/debug-shared/QtCore&amp;quot;, isso é porque o Qt-4.3 habilita  cabeçalhos pré-compilados para o gcc suportar isso, mas por alguma rasão isso não funcionou para você. Se você usar distcc, configure o qt com -no-pch. Se você usa o icecream, atualize para a útlima versão do svn trunk.&lt;br /&gt;
&lt;br /&gt;
Tente rodar qualquer programa Qt, como o {{program|assistant}}. '''Note:''' Você talvez precise rodar &amp;lt;tt&amp;gt;xhost +local:kde-devel&amp;lt;/tt&amp;gt; com seu usuário normal do kde3 para rodar essa aplicação.  Se der erro no QSpanData::adjustSpanMethods, então seu problema é o style. Tente remover {{path|lib/kde4/plugins/styles/kstyle-oxygen.so}} e {{path|lib/kde4/plugins/styles/oxygen.so}} se eles existirem no prefixo de instalação do KDE.&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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-12-04T16:33:38Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Qt */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== O Shell Para Desenvolvimento ==&lt;br /&gt;
&lt;br /&gt;
Em alguns sistemas um novo usuário é configurado por padrão para usar o {{path|/bin/sh}}. Se esse não é o caso do seu sistema, você pode pular essa sessão. Usando {{path|/bin/sh}} pode ser bastante inconveniente para trabalhar e talvez você queria mudar isso para {{path|/bin/bash}} ou outro shell.&lt;br /&gt;
No Ark Linux, Fedora e Slackware, você pode pular esse passo - {{path|/bin/sh}} é {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Como o usuário kde-devel ===&lt;br /&gt;
&lt;br /&gt;
Se você não tem acesso ao root e seu sistema suporta a mudança do seu próprio shell com o aplicativo &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt;, então você pode tentar mudar seu shell para {{path|/bin/bash}} assim:&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: Como o usuário root ===&lt;br /&gt;
&lt;br /&gt;
Se seu sistema vem com a aplicação &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; você pode rodar o seguinte comando como root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Outra opção é de usar a aplicação &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; como root para editar com segurança seu {{path|/etc/passwd}}. Ache o 'kde-devel' no arquivo. Mude '{{path|/bin/sh}}' no final da linha para '{{path|/bin/bash}}', salve as mudanças e saia.&lt;br /&gt;
&lt;br /&gt;
O novo shell vai startar automaticamente quando você entrar como o usuário kde-devel.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
O QtDBus e KDE são conhecidos por trabalhar com versões 0.62, também com 0.92 e superiores, do D-Bus. As versões 0.60 e 0.61 podem funcionar também mas não foram testadas. Nós recomendamos usar a versão post-1.0 release (pelo menos a 0.94), então atualize se você não o fez.&lt;br /&gt;
&lt;br /&gt;
Você pode pular essa parte se você já tem uma versão recente do D-Bus ou se não quer atualizar. Provavelmente você não quer compilar os bindings ao menos que você irá ter que compilar o HAL (ver abaixo).&lt;br /&gt;
&lt;br /&gt;
Antes de continuar com os passos, tenha certeza que os cabeçalhos do X11 e as bibliotecas estão habilitadas. O script configure roda na linha 5, a seguinte instrução deverá aparecer para confirmar:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Tenha certeza que você configurou o ambiente corretamente como feito [[Getting_Started/Build/KDE4_%28pt_BR%29#Configure_o_Ambiente|acima]]. Isso é necessário para as funções &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; e &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; funcionarem.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' é uma função bash, clique aqui para saber mais(inglês)]] &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 # ver acima&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;
=== O Quê Aconteceu === &lt;br /&gt;
Depois de mudar para o diretório do código fonte(linha 1), o código fonte do D-Bus é baixado pelo freedesktop.org (linha 2) e descompactado (linha 3). Depois entra no diretório criado para o D-Bus (linha 4), as configurações de compilação são criadas pelo script {{path|configure}} (linha 5). Depois da compilação (linha 6) e instalação (linha 7) do D-Bus, nós usamos a ferramenta &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; para instalar o arquivo de identificação da maquina (machine identification file) que permite o bus começar automaticamente quando a sessão do desktop começar (linha 8).&lt;br /&gt;
&lt;br /&gt;
Note que você precisa de permissão de escrita no {{path|/var}} para os dois últimos passos. Se seu sistema não tem acesso ao comando sudo, você pode usar o comando &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt;, ex. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Os passos para compilar os bindings do glib são similares aos acima.&lt;br /&gt;
&lt;br /&gt;
Então quando esses dois pacotes estão compilados e instalados, nós precisamos arrumar o dono do arquivo pois ao usar 'sudo make install' o root que fica como dono do arquivo e dos diretórios no ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Pule essa parte se você têm o [http://cmake.org/ CMake] &amp;gt;=2.4.5 instalado. &lt;br /&gt;
Você pode baixar os pacotes binários diretamente do [http://www.cmake.org/HTML/Download.html CMake site]. Existem também pacotes específicos para diversas distribuições.&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&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' é uma função bash, clique aqui para saber mais(inglês) ]] &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;
=== O Quê Aconteceu ===&lt;br /&gt;
Primeiro, vamos ao diretório do código fonte (linha 1), baixamos o código fonte do CMake (linha 2) e os descompactamos (linha 3). Criamos um diretório para compilar o CMake (linha 4) e entramos nele (linha 5). Rodamos o script de bootstrap do CMake para configurar a compilação (linha 6), depois compilamos (linha 7) e instalamos (linha 8) usando o usuário root.&lt;br /&gt;
&lt;br /&gt;
Se seu sistema não tem acesso ao comando &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, então você pode usar o &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;
Agora precisamos instalar o Qt4 que está no repositório do KDE. KDE é garantido com qualquer Qt 4.3. Qt 4.2 e antigos não são suportados e não irá funcionar. Você deve usar a cópia do Qt no server Subversion do KDE. (nota: algumas distros, tais como Debian e openSUSE, dão um suporte ao Qt com patches do KDE svn, então você pode usar o método pré-compilado da sua distro, porque eles irão funcionar normalmente). KDE tenta garantir que o código é compativel com o Qt 4.3.0, mas você pode pegar alguns bugfixes adicionais usando o qt-copy (entretanto, sua distribuição já deve cuidar desses bugfixes, então na maioria das vezes a distro já disponibiliza uma versão com atualizações suficientes). Para maior referência sobre distribuições, acesse as sessões acima.&lt;br /&gt;
&lt;br /&gt;
Por enquanto a compatibilidade com o Qt3 é obrigatória, porfavor &amp;lt;b&amp;gt;evite&amp;lt;/b&amp;gt; usar a opção &amp;quot;-no-qt3support&amp;quot; quando for compilar o Q4.&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
 cd # Note: qt-copy fica em $HOME/qt-copy. Veja $QTDIR em [[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;
 # se não instalamos, só limpa os arquivos obj para&lt;br /&gt;
 # limpar memória no disco&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;
=== O Quê Aconteceu ===&lt;br /&gt;
Nós mudamos de volta para o diretório home do usuário &amp;lt;tt&amp;gt;kde-devel&amp;lt;/tt&amp;gt; (linha 1) e fizemos o download do código usando o subversion (svn) pelo repositório do KDE (linha 2). Depois acessamos o diretório {{path|qt-copy}} (linha 3), rodamos o script que manipula os patches que vem com o &amp;lt;tt&amp;gt;qt-copy&amp;lt;/tt&amp;gt; (linha 4). &lt;br /&gt;
&lt;br /&gt;
Uma vez que os patches foi feito, nós rodamos o script &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; para configurar a instalação (linha 5-6). Os comandos de linha usados são explicados no arquivo {{path|qt-copy/README.qt-copy}}. Finalmente, nós compilamos os requerimentos minimos para o KDE (linha 7) e instalamos (linha 10) o Qt. Se o diretório de instalação for o mesmo do diretório corrente (line 8), então só limpamos um pouco de espaço (linha 9). Se você quiser todos os exemplos e aplicações demo, você pode compilar individualmente ou simplismente dar um &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; no diretório {{path|qt-copy}}. &lt;br /&gt;
&lt;br /&gt;
Note que a instalação não requer root já que o Qt é instalado localmente no {{path|$QTDIR}}. Mas, a instalação só é necessário se o {{path|$QTDIR}} for diferente do {{path|$HOME/qt-copy}}, que não é o caso se você seguiu todas as instruções corretamente.&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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Talk:Installing_third_party_softwares_in_terminal/Build/KDE4</id>
		<title>Talk:Installing third party softwares in terminal/Build/KDE4</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Talk:Installing_third_party_softwares_in_terminal/Build/KDE4"/>
				<updated>2007-11-27T07:15:31Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* This article is fat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== This article is fat ====&lt;br /&gt;
&lt;br /&gt;
When I first wrote this article, it was lean and mean and simple to understand. And it was good for all distributions. Now I have the impression of a fat pig when I read this article. I pledge for removing the usual sources of error, e.g. the many subdirectories. Why do we need a directory KDE, for example ?&lt;br /&gt;
If a tutorial is not simple, it is not done.&lt;br /&gt;
&lt;br /&gt;
--[[User:Tstaerk|Tstaerk]] 14:23, 9 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:+1. A cleanup would be nice, especially before the official 4.0.0 release! Volunteers needed who do this. --[[User:Dhaumann|Dhaumann]] 22:52, 9 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:This tutorial is fine by me. Okay, that's not for newbies, but someone who wants to compile KDE4 RC1 needs to know how to follow this tutorial at least. --[[User:Chackal_sjc|Chackal_sjc]] 06:56, 27 November 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
==== This article is full of errors ====&lt;br /&gt;
&lt;br /&gt;
For example it *is* nessecary to install qt-copy, even if you keep it in the source directory (which leads to 394583069845 error messages on the console during the install). And kdelibs won't build unless something unknown is done with strigi - if it is installed into KDEDIR, it isn't just found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the heading says pre-requirments are to read &amp;quot;Anonymous SVN Quickstart Guide&amp;quot; first.   but the things it does are mostly done in this guide(but a little differently).  for example the &amp;quot;Anonymous SVN Quickstart Guide&amp;quot; has you just svn a bunch of stuff.... but that all ended up in the wrong place cause in this guide the svn'd stuff needed to go to &amp;quot;kde-devl&amp;quot;-user's dir not the normal user dir..&lt;br /&gt;
&lt;br /&gt;
:This tutorial clearly states: &amp;quot;The rest of this tutorial assumes you are running as the kde-devel user.&amp;quot; -[[User:TMG|TMG]] 14:16, 25 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
==== This article is complicated ====&lt;br /&gt;
when I wrote this article, it was lean and simple. It has been improved somewhere, but on most places worsened. An example is the directory structure (to get to qt-copy: cd &amp;amp;&amp;amp; cd qt-copy; to get to kdelibs: cs &amp;amp;&amp;amp; cd kdelibs; to get to kdepim: cs &amp;amp;&amp;amp; cd KDE &amp;amp;&amp;amp; cd kdepim - no one understands this!!!).&lt;br /&gt;
Another example is cs and cb which is quite unnecessary as my initial article shows. But of course, with the complexity as the article has NOW, it IS necessary.&lt;br /&gt;
&lt;br /&gt;
Why do you spoil a simple article so that even I no longer find my own subdirs ?&lt;br /&gt;
--­­­­[[User:Tstaerk|Tstaerk]] 10:25, 28 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
: Where do you see &amp;quot;cs &amp;amp;&amp;amp; cd KDE &amp;amp;&amp;amp; cd kdepim&amp;quot;? Because I don't see that anywhere. In any case it would just be &amp;quot;cs kdepim&amp;quot;. Perhaps that's the bit need explaining a bit better? --[[User:Aseigo|Aseigo]] 02:48, 29 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:To whom are you talking to? ;) There are many contributors and as it's a wiki an article probably &amp;quot;degenerates&amp;quot; automatically if noone has an eye on it. The article certainly has valuable information and simply needs a cleanup. In other words: Fix it! :) --[[User:Dhaumann|Dhaumann]] 12:20, 28 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
::IMHO all of this cs/cb/cmakekde and such is only confusing, users just do copy&amp;amp;paste with no really knowledge of what's going on when they type those commands. This way troubleshooting is quite difficult, and they learn nothing about the '''real''' compiling way. The concept of source/build dirs is barely noted. The ''old'' http://developer.kde.org/build/trunk.html has some more commands to type, but it was quite more understandable and clear about the '''real''' steps to do. --[[user:Pino|pino]] 12:54, 28 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
::: Yes, this article could go back to being more verbose. I suppose what is missing is an explanation of ''why'' the shortcuts are used. They are there for a reason. I also don't get the differentiation between real and not real steps; unless we now consider using the shell for what it was designed for as not real. --[[User:Aseigo|Aseigo]] 02:48, 29 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:::: What's wrong in explicitely telling:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co .../kdelibs&lt;br /&gt;
mkdir build-kdelibs&lt;br /&gt;
cd build-kdelibs&lt;br /&gt;
cmake &amp;lt;options&amp;gt; ../kdelibs&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:::: After all, we did that with the &amp;lt;tt&amp;gt;./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&amp;lt;/tt&amp;gt; sequence in KDE 3 times, and that worked quite fine. I still fail why we have to make our things more complicated. Moreover, these macros force fixed paths -- [[user:Pino|pino]] 23:43, 29 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:I am also for removing cb and cs, somebody should just do it. They are indeed confusing and sometimes don't work as expected (that is why cd $KDE_SRC is needed in one place). cmakekde on the other hand could stay IMHO. -[[User:TMG|TMG]] 14:16, 25 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
==== Q: What is cs and cb? ====&lt;br /&gt;
&lt;br /&gt;
A: '''This is not a typo'''. Read the article about setting up your .bashrc.  Both '''cs''' and '''cb''' are bash functions, used to change to the KDE source directory and KDE build directory respectively.&lt;br /&gt;
&lt;br /&gt;
==== Q: Are there build instructions for other OS? ====&lt;br /&gt;
&lt;br /&gt;
A: Actually '''yes''', for [[Getting Started/Build/KDE4/Mac OS X|Mac OS X]]. There also is [http://www.kdelibs.com kdelibs.com] (see also [[User_talk:Jstaniek#KDElibs.com_and_developernew.kde.org_coexistence|here]]) which will be merged into this wiki in the future.&lt;br /&gt;
&lt;br /&gt;
==== Q: Isn't the install prefix, make and make install missing for modules like kdelibs and kdebase? ====&lt;br /&gt;
A: No. The shell function ''cmakekde'' handels this, have a look at the file [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|.bashrc]].&lt;br /&gt;
&lt;br /&gt;
==== Q: I changed the first command of the &amp;quot;Set up QT - Recipe&amp;quot; from cd to cs because I think this was a typo. Am I right?? ====&lt;br /&gt;
A: Right --[[User:Dhaumann|Dhaumann]]&lt;br /&gt;
&lt;br /&gt;
:: no, it was perfectly intentional. see the [[/Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc bashrc in the productivity with KDE4 scripts tutorial]]. it has QTDIR set to ~/qt-copy. this makes sense, actually, since building Qt is done rather differently from the rest of KDE and one may not get Qt from KDE's svn in any case. so yes, it is supposed to be cd, not cs.&lt;br /&gt;
&lt;br /&gt;
::: *blush* ;) i should read more carefully. --[[User:Dhaumann|Dhaumann]] &lt;br /&gt;
&lt;br /&gt;
==== Notes: ~/install ====&lt;br /&gt;
&lt;br /&gt;
When installing KDE4, I strongly recommend installing all tools (like dbus and cmake) and kde packages into the same place, e.g. ~/install. Qt is the only exception.&lt;br /&gt;
&lt;br /&gt;
The reason for this is because if you install some packages to ~/kde and some to /usr/local and maybe one in /usr then cmake will generate errors like:&lt;br /&gt;
&lt;br /&gt;
-- It is impossible to order the include directories.&lt;br /&gt;
&lt;br /&gt;
This is not a fatal error, so you will still be able to compile, but you will possibly be using the wrong versions of libraries and this will product problems that are very hard to diagnose.&lt;br /&gt;
&lt;br /&gt;
You may not experience any problems when installed like I advise not to, however I have and you might too in some typical situations.&lt;br /&gt;
&lt;br /&gt;
Please see:&lt;br /&gt;
&lt;br /&gt;
http://developer.kde.org/build/trunk.html&lt;br /&gt;
&lt;br /&gt;
==== Install CMake modules local ====&lt;br /&gt;
&lt;br /&gt;
The CMake modules should be installed local into ~/install/cmake/modules or similar.&lt;br /&gt;
When following the current instructions [[ Getting_Started/Build/KDE4#Install_additional_CMake_modules|6.1: Install additional CMake modules]],  it's impossible to do a non-root installation, because &amp;quot;kdelibs/cmake/modules/cmake_install.cmake&amp;quot; wants to install the modules to &amp;quot;/cmake/modules&amp;quot;. (I didn't install CMake local, because my system already provided CMake &amp;gt; 2.4.3).&lt;br /&gt;
&lt;br /&gt;
I've already tried to do this, fiddling around with CMAKE_MODULE_PATH and DATA_INSTALL_DIR but couldn't get it working.&lt;br /&gt;
&lt;br /&gt;
Does anybody know how to do this properly?&lt;br /&gt;
&lt;br /&gt;
--[[User:Eliasp|Eliasp]] 15:44, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fixes needed ====&lt;br /&gt;
* qt-copy: Should we pass the -debug flag?  Doesn't Qt install debug information separately by default anyways?  Or is that just in the snapshot? --[[User:Mpyne|Mpyne]]&lt;br /&gt;
&lt;br /&gt;
: according to ./configure --help, the default is -release in snapshot. --[[User:Aseigo|Aseigo]] 04:33, 14 March 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
* In the part of the tutorial that describes how to create a new users, shoudn't to have an edit /etc/sudoers to add permitions for kde-devel call sudo? --[[User:SilveiraNeto|SilveiraNeto]] 03:01, 14 March 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
: no. why would you want them to have sudo access?&lt;br /&gt;
&lt;br /&gt;
==== libungif/giflib ====&lt;br /&gt;
Since the patents expired, why not use giflib?&lt;br /&gt;
&lt;br /&gt;
==== Old gcc and -pch flag ====&lt;br /&gt;
In Qt part I had problems with error like this: [http://www.qtforum.org/thread.php?threadid=19998 QtForum thread]. I had GCC 3.3.X installed. Using -pch flag (as in recipe) get me errors. Someone friendly gave me tip on #kde-devel not to use this flag, although I didn't test it. Instead I've just updated gcc and g++ from debian repositories. Newer version works fine as &amp;quot;Precompiled headers are supported in GCC (3.4 and newer)&amp;quot; [http://en.wikipedia.org/wiki/Precompiled_header Wikipedia pch].&lt;br /&gt;
&lt;br /&gt;
==== Build status ====&lt;br /&gt;
&lt;br /&gt;
You might want to include the [http://developer.kde.org/~dirk/dashboard/ dashboard link] to show which modules currently build and which don't. --[[User:141.35.8.106|141.35.8.106]] 13:28, 20 March 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Extra optional software ==&lt;br /&gt;
&lt;br /&gt;
- openldap&lt;br /&gt;
- cyrus&lt;br /&gt;
&lt;br /&gt;
If there was a line at the top like:&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install libaaa-dev libbbb-dev ...-dev ...&lt;br /&gt;
&lt;br /&gt;
This would be very useful and save hours. Is this something we should do?&lt;br /&gt;
&lt;br /&gt;
== su - kde4 didn't set the variables ==&lt;br /&gt;
&lt;br /&gt;
after running 'su - kde4' and 'export' i saw that no variables in .bashrc were set, instead the old one (of the system) where set. I tried 'su kde4' and it worked fine. Why is that?&lt;br /&gt;
&lt;br /&gt;
I'm running gentoo 2006.1 amd64&lt;br /&gt;
&lt;br /&gt;
== Qt Flags ==&lt;br /&gt;
&lt;br /&gt;
Are &amp;quot;-pch&amp;quot; and &amp;quot;-qdbus&amp;quot; really needed? The configure script shows that they're enabled by default. --[[User:McEnroe|McEnroe]] 16:49, 19 April 2007 (CEST)&lt;br /&gt;
:Fixed. Also got rid of openssl for the same reason [[User:Logixoul|Logixoul]] 18:03, 5 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Amount of space needed? ==&lt;br /&gt;
&lt;br /&gt;
It would be nice to know how much space (roughly, in GB) you need for a setup to build and run the basic things and packages. --[[User:Liquidat|Liquidat]] 03:08, 7 June 2007 (CEST)&lt;br /&gt;
: 4.5 GB --[[User:Logixoul|Logixoul]] 18:12, 5 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Install error? ==&lt;br /&gt;
&lt;br /&gt;
With the kdesupport package I have an install error:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CMake Error: Error in cmake code at&lt;br /&gt;
/media/local/kde-devel/kde/build/kdesupport/qca/plugins/qca-logger/cmake_install                                                                            .cmake:35:&lt;br /&gt;
FILE cannot create directory: /usr/lib/qt4/plugins/crypto. Maybe need administrative privileges.&lt;br /&gt;
Current CMake stack: /media/local/kde-devel/kde/build/kdesupport/cmake_install.c                                                                            make;/media/local/kde-devel/kde/build/kdesupport/qca/cmake_install.cmake;/media/                                                                            local/kde-devel/kde/build/kdesupport/qca/plugins/cmake_install.cmake;/media/loca                                                                            l/kde-devel/kde/build/kdesupport/qca/plugins/qca-logger/cmake_install.cmake&lt;br /&gt;
make: *** [install] Error 255&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why is it trying to install that system wide?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Have you installed local copy of qt4 as described in this tutorial? I had the same error while trying to skip installation of local qt4 copy and use system-wide installed one. The error is gone with local copy of qt4.&lt;br /&gt;
&lt;br /&gt;
::I checked back, and the problem is that the script tries to install &amp;quot;libqca-logger.so&amp;quot; to $QTDIR - any idea how to change that?&lt;br /&gt;
&lt;br /&gt;
:::Did you set $QTDIR to the correct value? Make sure you use the .bashrc so that all environment variables are correct. -[[User:TMG|TMG]] 14:25, 25 June 2007 (CEST)&lt;br /&gt;
::::The entire point is that $QTDIR has to be set to /usr/lib/qt4/ - because I use the system wide installed copy of Qt 4.3!&lt;br /&gt;
::::So the problem is not that $QTDIR is set wrong but that the script tries to install something to $QTDIR. --[[User:141.35.185.149|141.35.185.149]] 23:38, 3 July 2007 (CEST)&lt;br /&gt;
:::::Well, then you probably need to install with sudo to get the file installed. I guess it needs to be in the Qt directory because otherwise, Qt doesn't find the files. -[[User:TMG|TMG]] 17:31, 4 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Wrong line numbers (and explanation) in the &amp;quot;What's Happening&amp;quot; section for Qt part. ==&lt;br /&gt;
&lt;br /&gt;
Line numbers:&lt;br /&gt;
----&lt;br /&gt;
Once the patches have been applied, we then set up the build using the configure script (line 5-7). Finally, we build the minimal requirements for KDE (line 8)...&lt;br /&gt;
----&lt;br /&gt;
It should be 5-6 for configure and 7 for make.&lt;br /&gt;
&lt;br /&gt;
Explanation is wrong because there is no make install command. And this directory will be used directly. But in the article: &amp;quot;...we build the minimal requirements for KDE (line 8) and install (line 9-10) Qt&amp;quot;.&lt;br /&gt;
But in lines 9-10:&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;
----&lt;br /&gt;
Best regards, powerfox.&lt;br /&gt;
&lt;br /&gt;
== Wrong directories? ==&lt;br /&gt;
&lt;br /&gt;
Why does the recipe for kdesupport only say &amp;quot;cs&amp;quot; before getting the source and building while the &amp;quot;cmakekdeall&amp;quot; function in the example .bashrc says &amp;quot;cs KDE/kdesupport &amp;amp;&amp;amp; svn up &amp;amp;&amp;amp; cmakekde&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
It should either use the KDE subfolder or it shouldn't but now I'm confused as to which of the two is right.&lt;br /&gt;
&lt;br /&gt;
== Problem with required soprano version (Kubuntu Gutsy Gibbon) ==&lt;br /&gt;
&lt;br /&gt;
(sorry for grammar errors if they occur)&lt;br /&gt;
So, &lt;br /&gt;
&lt;br /&gt;
I,m using Kubuntu Gutsy Gibbon and I had problems with soprano library at installing kdelibs.&lt;br /&gt;
&lt;br /&gt;
cmakekde requires to install kdelibs the version of soprano library, which does not exist in ubuntu repositories. The needed version you can find e.g. &lt;br /&gt;
here: http://ubuntu2.cica.es/ubuntu/ubuntu/pool/universe/s/soprano/&lt;br /&gt;
&lt;br /&gt;
From this website you have to download libsoprano-dev and libsoprano4 having the same suffix (e.g. ubuntu1~gutsy1_all.deb if you are using Kubuntu Gutsy Gibbon).  &lt;br /&gt;
&lt;br /&gt;
Go to directory where you downloaded packages and install each package using dpkg ( I have forgotten the order, so try and when something goes wrong, dpkg shows an information and proposes a solution).&lt;br /&gt;
&lt;br /&gt;
After this remove ~/kde/src/KDE/kdelibs/CMakeCache.txt and try again to install kdelibs.&lt;br /&gt;
&lt;br /&gt;
Good luck :)&lt;/div&gt;</summary>
		<author><name>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Talk:Installing_third_party_softwares_in_terminal/Build/KDE4</id>
		<title>Talk:Installing third party softwares in terminal/Build/KDE4</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Talk:Installing_third_party_softwares_in_terminal/Build/KDE4"/>
				<updated>2007-11-27T07:14:02Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* This article is fat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== This article is fat ====&lt;br /&gt;
&lt;br /&gt;
When I first wrote this article, it was lean and mean and simple to understand. And it was good for all distributions. Now I have the impression of a fat pig when I read this article. I pledge for removing the usual sources of error, e.g. the many subdirectories. Why do we need a directory KDE, for example ?&lt;br /&gt;
If a tutorial is not simple, it is not done.&lt;br /&gt;
&lt;br /&gt;
--[[User:Tstaerk|Tstaerk]] 14:23, 9 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:+1. A cleanup would be nice, especially before the official 4.0.0 release! Volunteers needed who do this. --[[User:Dhaumann|Dhaumann]] 22:52, 9 September 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:This tutorial is fine by me. Okay, that's not for newbies, but someone who wants to compile KDE4 RC1 needs to know how to follow this tutorial at least.&lt;br /&gt;
&lt;br /&gt;
==== This article is full of errors ====&lt;br /&gt;
&lt;br /&gt;
For example it *is* nessecary to install qt-copy, even if you keep it in the source directory (which leads to 394583069845 error messages on the console during the install). And kdelibs won't build unless something unknown is done with strigi - if it is installed into KDEDIR, it isn't just found.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the heading says pre-requirments are to read &amp;quot;Anonymous SVN Quickstart Guide&amp;quot; first.   but the things it does are mostly done in this guide(but a little differently).  for example the &amp;quot;Anonymous SVN Quickstart Guide&amp;quot; has you just svn a bunch of stuff.... but that all ended up in the wrong place cause in this guide the svn'd stuff needed to go to &amp;quot;kde-devl&amp;quot;-user's dir not the normal user dir..&lt;br /&gt;
&lt;br /&gt;
:This tutorial clearly states: &amp;quot;The rest of this tutorial assumes you are running as the kde-devel user.&amp;quot; -[[User:TMG|TMG]] 14:16, 25 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
==== This article is complicated ====&lt;br /&gt;
when I wrote this article, it was lean and simple. It has been improved somewhere, but on most places worsened. An example is the directory structure (to get to qt-copy: cd &amp;amp;&amp;amp; cd qt-copy; to get to kdelibs: cs &amp;amp;&amp;amp; cd kdelibs; to get to kdepim: cs &amp;amp;&amp;amp; cd KDE &amp;amp;&amp;amp; cd kdepim - no one understands this!!!).&lt;br /&gt;
Another example is cs and cb which is quite unnecessary as my initial article shows. But of course, with the complexity as the article has NOW, it IS necessary.&lt;br /&gt;
&lt;br /&gt;
Why do you spoil a simple article so that even I no longer find my own subdirs ?&lt;br /&gt;
--­­­­[[User:Tstaerk|Tstaerk]] 10:25, 28 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
: Where do you see &amp;quot;cs &amp;amp;&amp;amp; cd KDE &amp;amp;&amp;amp; cd kdepim&amp;quot;? Because I don't see that anywhere. In any case it would just be &amp;quot;cs kdepim&amp;quot;. Perhaps that's the bit need explaining a bit better? --[[User:Aseigo|Aseigo]] 02:48, 29 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:To whom are you talking to? ;) There are many contributors and as it's a wiki an article probably &amp;quot;degenerates&amp;quot; automatically if noone has an eye on it. The article certainly has valuable information and simply needs a cleanup. In other words: Fix it! :) --[[User:Dhaumann|Dhaumann]] 12:20, 28 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
::IMHO all of this cs/cb/cmakekde and such is only confusing, users just do copy&amp;amp;paste with no really knowledge of what's going on when they type those commands. This way troubleshooting is quite difficult, and they learn nothing about the '''real''' compiling way. The concept of source/build dirs is barely noted. The ''old'' http://developer.kde.org/build/trunk.html has some more commands to type, but it was quite more understandable and clear about the '''real''' steps to do. --[[user:Pino|pino]] 12:54, 28 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
::: Yes, this article could go back to being more verbose. I suppose what is missing is an explanation of ''why'' the shortcuts are used. They are there for a reason. I also don't get the differentiation between real and not real steps; unless we now consider using the shell for what it was designed for as not real. --[[User:Aseigo|Aseigo]] 02:48, 29 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:::: What's wrong in explicitely telling:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co .../kdelibs&lt;br /&gt;
mkdir build-kdelibs&lt;br /&gt;
cd build-kdelibs&lt;br /&gt;
cmake &amp;lt;options&amp;gt; ../kdelibs&lt;br /&gt;
make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:::: After all, we did that with the &amp;lt;tt&amp;gt;./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&amp;lt;/tt&amp;gt; sequence in KDE 3 times, and that worked quite fine. I still fail why we have to make our things more complicated. Moreover, these macros force fixed paths -- [[user:Pino|pino]] 23:43, 29 May 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
:I am also for removing cb and cs, somebody should just do it. They are indeed confusing and sometimes don't work as expected (that is why cd $KDE_SRC is needed in one place). cmakekde on the other hand could stay IMHO. -[[User:TMG|TMG]] 14:16, 25 June 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
==== Q: What is cs and cb? ====&lt;br /&gt;
&lt;br /&gt;
A: '''This is not a typo'''. Read the article about setting up your .bashrc.  Both '''cs''' and '''cb''' are bash functions, used to change to the KDE source directory and KDE build directory respectively.&lt;br /&gt;
&lt;br /&gt;
==== Q: Are there build instructions for other OS? ====&lt;br /&gt;
&lt;br /&gt;
A: Actually '''yes''', for [[Getting Started/Build/KDE4/Mac OS X|Mac OS X]]. There also is [http://www.kdelibs.com kdelibs.com] (see also [[User_talk:Jstaniek#KDElibs.com_and_developernew.kde.org_coexistence|here]]) which will be merged into this wiki in the future.&lt;br /&gt;
&lt;br /&gt;
==== Q: Isn't the install prefix, make and make install missing for modules like kdelibs and kdebase? ====&lt;br /&gt;
A: No. The shell function ''cmakekde'' handels this, have a look at the file [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|.bashrc]].&lt;br /&gt;
&lt;br /&gt;
==== Q: I changed the first command of the &amp;quot;Set up QT - Recipe&amp;quot; from cd to cs because I think this was a typo. Am I right?? ====&lt;br /&gt;
A: Right --[[User:Dhaumann|Dhaumann]]&lt;br /&gt;
&lt;br /&gt;
:: no, it was perfectly intentional. see the [[/Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc bashrc in the productivity with KDE4 scripts tutorial]]. it has QTDIR set to ~/qt-copy. this makes sense, actually, since building Qt is done rather differently from the rest of KDE and one may not get Qt from KDE's svn in any case. so yes, it is supposed to be cd, not cs.&lt;br /&gt;
&lt;br /&gt;
::: *blush* ;) i should read more carefully. --[[User:Dhaumann|Dhaumann]] &lt;br /&gt;
&lt;br /&gt;
==== Notes: ~/install ====&lt;br /&gt;
&lt;br /&gt;
When installing KDE4, I strongly recommend installing all tools (like dbus and cmake) and kde packages into the same place, e.g. ~/install. Qt is the only exception.&lt;br /&gt;
&lt;br /&gt;
The reason for this is because if you install some packages to ~/kde and some to /usr/local and maybe one in /usr then cmake will generate errors like:&lt;br /&gt;
&lt;br /&gt;
-- It is impossible to order the include directories.&lt;br /&gt;
&lt;br /&gt;
This is not a fatal error, so you will still be able to compile, but you will possibly be using the wrong versions of libraries and this will product problems that are very hard to diagnose.&lt;br /&gt;
&lt;br /&gt;
You may not experience any problems when installed like I advise not to, however I have and you might too in some typical situations.&lt;br /&gt;
&lt;br /&gt;
Please see:&lt;br /&gt;
&lt;br /&gt;
http://developer.kde.org/build/trunk.html&lt;br /&gt;
&lt;br /&gt;
==== Install CMake modules local ====&lt;br /&gt;
&lt;br /&gt;
The CMake modules should be installed local into ~/install/cmake/modules or similar.&lt;br /&gt;
When following the current instructions [[ Getting_Started/Build/KDE4#Install_additional_CMake_modules|6.1: Install additional CMake modules]],  it's impossible to do a non-root installation, because &amp;quot;kdelibs/cmake/modules/cmake_install.cmake&amp;quot; wants to install the modules to &amp;quot;/cmake/modules&amp;quot;. (I didn't install CMake local, because my system already provided CMake &amp;gt; 2.4.3).&lt;br /&gt;
&lt;br /&gt;
I've already tried to do this, fiddling around with CMAKE_MODULE_PATH and DATA_INSTALL_DIR but couldn't get it working.&lt;br /&gt;
&lt;br /&gt;
Does anybody know how to do this properly?&lt;br /&gt;
&lt;br /&gt;
--[[User:Eliasp|Eliasp]] 15:44, 4 January 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Fixes needed ====&lt;br /&gt;
* qt-copy: Should we pass the -debug flag?  Doesn't Qt install debug information separately by default anyways?  Or is that just in the snapshot? --[[User:Mpyne|Mpyne]]&lt;br /&gt;
&lt;br /&gt;
: according to ./configure --help, the default is -release in snapshot. --[[User:Aseigo|Aseigo]] 04:33, 14 March 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
* In the part of the tutorial that describes how to create a new users, shoudn't to have an edit /etc/sudoers to add permitions for kde-devel call sudo? --[[User:SilveiraNeto|SilveiraNeto]] 03:01, 14 March 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
: no. why would you want them to have sudo access?&lt;br /&gt;
&lt;br /&gt;
==== libungif/giflib ====&lt;br /&gt;
Since the patents expired, why not use giflib?&lt;br /&gt;
&lt;br /&gt;
==== Old gcc and -pch flag ====&lt;br /&gt;
In Qt part I had problems with error like this: [http://www.qtforum.org/thread.php?threadid=19998 QtForum thread]. I had GCC 3.3.X installed. Using -pch flag (as in recipe) get me errors. Someone friendly gave me tip on #kde-devel not to use this flag, although I didn't test it. Instead I've just updated gcc and g++ from debian repositories. Newer version works fine as &amp;quot;Precompiled headers are supported in GCC (3.4 and newer)&amp;quot; [http://en.wikipedia.org/wiki/Precompiled_header Wikipedia pch].&lt;br /&gt;
&lt;br /&gt;
==== Build status ====&lt;br /&gt;
&lt;br /&gt;
You might want to include the [http://developer.kde.org/~dirk/dashboard/ dashboard link] to show which modules currently build and which don't. --[[User:141.35.8.106|141.35.8.106]] 13:28, 20 March 2007 (CET)&lt;br /&gt;
&lt;br /&gt;
== Extra optional software ==&lt;br /&gt;
&lt;br /&gt;
- openldap&lt;br /&gt;
- cyrus&lt;br /&gt;
&lt;br /&gt;
If there was a line at the top like:&lt;br /&gt;
&lt;br /&gt;
sudo apt-get install libaaa-dev libbbb-dev ...-dev ...&lt;br /&gt;
&lt;br /&gt;
This would be very useful and save hours. Is this something we should do?&lt;br /&gt;
&lt;br /&gt;
== su - kde4 didn't set the variables ==&lt;br /&gt;
&lt;br /&gt;
after running 'su - kde4' and 'export' i saw that no variables in .bashrc were set, instead the old one (of the system) where set. I tried 'su kde4' and it worked fine. Why is that?&lt;br /&gt;
&lt;br /&gt;
I'm running gentoo 2006.1 amd64&lt;br /&gt;
&lt;br /&gt;
== Qt Flags ==&lt;br /&gt;
&lt;br /&gt;
Are &amp;quot;-pch&amp;quot; and &amp;quot;-qdbus&amp;quot; really needed? The configure script shows that they're enabled by default. --[[User:McEnroe|McEnroe]] 16:49, 19 April 2007 (CEST)&lt;br /&gt;
:Fixed. Also got rid of openssl for the same reason [[User:Logixoul|Logixoul]] 18:03, 5 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Amount of space needed? ==&lt;br /&gt;
&lt;br /&gt;
It would be nice to know how much space (roughly, in GB) you need for a setup to build and run the basic things and packages. --[[User:Liquidat|Liquidat]] 03:08, 7 June 2007 (CEST)&lt;br /&gt;
: 4.5 GB --[[User:Logixoul|Logixoul]] 18:12, 5 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Install error? ==&lt;br /&gt;
&lt;br /&gt;
With the kdesupport package I have an install error:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
CMake Error: Error in cmake code at&lt;br /&gt;
/media/local/kde-devel/kde/build/kdesupport/qca/plugins/qca-logger/cmake_install                                                                            .cmake:35:&lt;br /&gt;
FILE cannot create directory: /usr/lib/qt4/plugins/crypto. Maybe need administrative privileges.&lt;br /&gt;
Current CMake stack: /media/local/kde-devel/kde/build/kdesupport/cmake_install.c                                                                            make;/media/local/kde-devel/kde/build/kdesupport/qca/cmake_install.cmake;/media/                                                                            local/kde-devel/kde/build/kdesupport/qca/plugins/cmake_install.cmake;/media/loca                                                                            l/kde-devel/kde/build/kdesupport/qca/plugins/qca-logger/cmake_install.cmake&lt;br /&gt;
make: *** [install] Error 255&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why is it trying to install that system wide?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:Have you installed local copy of qt4 as described in this tutorial? I had the same error while trying to skip installation of local qt4 copy and use system-wide installed one. The error is gone with local copy of qt4.&lt;br /&gt;
&lt;br /&gt;
::I checked back, and the problem is that the script tries to install &amp;quot;libqca-logger.so&amp;quot; to $QTDIR - any idea how to change that?&lt;br /&gt;
&lt;br /&gt;
:::Did you set $QTDIR to the correct value? Make sure you use the .bashrc so that all environment variables are correct. -[[User:TMG|TMG]] 14:25, 25 June 2007 (CEST)&lt;br /&gt;
::::The entire point is that $QTDIR has to be set to /usr/lib/qt4/ - because I use the system wide installed copy of Qt 4.3!&lt;br /&gt;
::::So the problem is not that $QTDIR is set wrong but that the script tries to install something to $QTDIR. --[[User:141.35.185.149|141.35.185.149]] 23:38, 3 July 2007 (CEST)&lt;br /&gt;
:::::Well, then you probably need to install with sudo to get the file installed. I guess it needs to be in the Qt directory because otherwise, Qt doesn't find the files. -[[User:TMG|TMG]] 17:31, 4 July 2007 (CEST)&lt;br /&gt;
&lt;br /&gt;
== Wrong line numbers (and explanation) in the &amp;quot;What's Happening&amp;quot; section for Qt part. ==&lt;br /&gt;
&lt;br /&gt;
Line numbers:&lt;br /&gt;
----&lt;br /&gt;
Once the patches have been applied, we then set up the build using the configure script (line 5-7). Finally, we build the minimal requirements for KDE (line 8)...&lt;br /&gt;
----&lt;br /&gt;
It should be 5-6 for configure and 7 for make.&lt;br /&gt;
&lt;br /&gt;
Explanation is wrong because there is no make install command. And this directory will be used directly. But in the article: &amp;quot;...we build the minimal requirements for KDE (line 8) and install (line 9-10) Qt&amp;quot;.&lt;br /&gt;
But in lines 9-10:&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;
----&lt;br /&gt;
Best regards, powerfox.&lt;br /&gt;
&lt;br /&gt;
== Wrong directories? ==&lt;br /&gt;
&lt;br /&gt;
Why does the recipe for kdesupport only say &amp;quot;cs&amp;quot; before getting the source and building while the &amp;quot;cmakekdeall&amp;quot; function in the example .bashrc says &amp;quot;cs KDE/kdesupport &amp;amp;&amp;amp; svn up &amp;amp;&amp;amp; cmakekde&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
It should either use the KDE subfolder or it shouldn't but now I'm confused as to which of the two is right.&lt;br /&gt;
&lt;br /&gt;
== Problem with required soprano version (Kubuntu Gutsy Gibbon) ==&lt;br /&gt;
&lt;br /&gt;
(sorry for grammar errors if they occur)&lt;br /&gt;
So, &lt;br /&gt;
&lt;br /&gt;
I,m using Kubuntu Gutsy Gibbon and I had problems with soprano library at installing kdelibs.&lt;br /&gt;
&lt;br /&gt;
cmakekde requires to install kdelibs the version of soprano library, which does not exist in ubuntu repositories. The needed version you can find e.g. &lt;br /&gt;
here: http://ubuntu2.cica.es/ubuntu/ubuntu/pool/universe/s/soprano/&lt;br /&gt;
&lt;br /&gt;
From this website you have to download libsoprano-dev and libsoprano4 having the same suffix (e.g. ubuntu1~gutsy1_all.deb if you are using Kubuntu Gutsy Gibbon).  &lt;br /&gt;
&lt;br /&gt;
Go to directory where you downloaded packages and install each package using dpkg ( I have forgotten the order, so try and when something goes wrong, dpkg shows an information and proposes a solution).&lt;br /&gt;
&lt;br /&gt;
After this remove ~/kde/src/KDE/kdelibs/CMakeCache.txt and try again to install kdelibs.&lt;br /&gt;
&lt;br /&gt;
Good luck :)&lt;/div&gt;</summary>
		<author><name>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/User:Chackal_sjc</id>
		<title>User:Chackal sjc</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User:Chackal_sjc"/>
				<updated>2007-11-27T07:05:16Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: New page: Hi,  My name is Felipe Ferreri Tonello. I'm from Brazil and I have 19 years old. Well, I'm very excited with this KDE4 and to help in the project!  == My Contribution == * KSysGuard  But I...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, &lt;br /&gt;
My name is Felipe Ferreri Tonello. I'm from Brazil and I have 19 years old.&lt;br /&gt;
Well, I'm very excited with this KDE4 and to help in the project!&lt;br /&gt;
&lt;br /&gt;
== My Contribution ==&lt;br /&gt;
* KSysGuard&lt;br /&gt;
&lt;br /&gt;
But I really want to help more :)&lt;br /&gt;
&lt;br /&gt;
== Contact Me ==&lt;br /&gt;
I'm usually on freenode, look for &amp;quot;chackal_sjc&amp;quot;. And my e-mail is chackal_sjc at users.sourceforge.net.&lt;/div&gt;</summary>
		<author><name>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-27T06:56:38Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* CMake */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== O Shell Para Desenvolvimento ==&lt;br /&gt;
&lt;br /&gt;
Em alguns sistemas um novo usuário é configurado por padrão para usar o {{path|/bin/sh}}. Se esse não é o caso do seu sistema, você pode pular essa sessão. Usando {{path|/bin/sh}} pode ser bastante inconveniente para trabalhar e talvez você queria mudar isso para {{path|/bin/bash}} ou outro shell.&lt;br /&gt;
No Ark Linux, Fedora e Slackware, você pode pular esse passo - {{path|/bin/sh}} é {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Como o usuário kde-devel ===&lt;br /&gt;
&lt;br /&gt;
Se você não tem acesso ao root e seu sistema suporta a mudança do seu próprio shell com o aplicativo &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt;, então você pode tentar mudar seu shell para {{path|/bin/bash}} assim:&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: Como o usuário root ===&lt;br /&gt;
&lt;br /&gt;
Se seu sistema vem com a aplicação &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; você pode rodar o seguinte comando como root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Outra opção é de usar a aplicação &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; como root para editar com segurança seu {{path|/etc/passwd}}. Ache o 'kde-devel' no arquivo. Mude '{{path|/bin/sh}}' no final da linha para '{{path|/bin/bash}}', salve as mudanças e saia.&lt;br /&gt;
&lt;br /&gt;
O novo shell vai startar automaticamente quando você entrar como o usuário kde-devel.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
O QtDBus e KDE são conhecidos por trabalhar com versões 0.62, também com 0.92 e superiores, do D-Bus. As versões 0.60 e 0.61 podem funcionar também mas não foram testadas. Nós recomendamos usar a versão post-1.0 release (pelo menos a 0.94), então atualize se você não o fez.&lt;br /&gt;
&lt;br /&gt;
Você pode pular essa parte se você já tem uma versão recente do D-Bus ou se não quer atualizar. Provavelmente você não quer compilar os bindings ao menos que você irá ter que compilar o HAL (ver abaixo).&lt;br /&gt;
&lt;br /&gt;
Antes de continuar com os passos, tenha certeza que os cabeçalhos do X11 e as bibliotecas estão habilitadas. O script configure roda na linha 5, a seguinte instrução deverá aparecer para confirmar:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Tenha certeza que você configurou o ambiente corretamente como feito [[Getting_Started/Build/KDE4_%28pt_BR%29#Configure_o_Ambiente|acima]]. Isso é necessário para as funções &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; e &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; funcionarem.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' é uma função bash, clique aqui para saber mais(inglês)]] &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 # ver acima&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;
=== O Quê Aconteceu === &lt;br /&gt;
Depois de mudar para o diretório do código fonte(linha 1), o código fonte do D-Bus é baixado pelo freedesktop.org (linha 2) e descompactado (linha 3). Depois entra no diretório criado para o D-Bus (linha 4), as configurações de compilação são criadas pelo script {{path|configure}} (linha 5). Depois da compilação (linha 6) e instalação (linha 7) do D-Bus, nós usamos a ferramenta &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; para instalar o arquivo de identificação da maquina (machine identification file) que permite o bus começar automaticamente quando a sessão do desktop começar (linha 8).&lt;br /&gt;
&lt;br /&gt;
Note que você precisa de permissão de escrita no {{path|/var}} para os dois últimos passos. Se seu sistema não tem acesso ao comando sudo, você pode usar o comando &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt;, ex. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Os passos para compilar os bindings do glib são similares aos acima.&lt;br /&gt;
&lt;br /&gt;
Então quando esses dois pacotes estão compilados e instalados, nós precisamos arrumar o dono do arquivo pois ao usar 'sudo make install' o root que fica como dono do arquivo e dos diretórios no ~kde-devel/kde.&lt;br /&gt;
&lt;br /&gt;
== CMake ==&lt;br /&gt;
Pule essa parte se você têm o [http://cmake.org/ CMake] &amp;gt;=2.4.5 instalado. &lt;br /&gt;
Você pode baixar os pacotes binários diretamente do [http://www.cmake.org/HTML/Download.html CMake site]. Existem também pacotes específicos para diversas distribuições.&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&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' é uma função bash, clique aqui para saber mais(inglês) ]] &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;
=== O Quê Aconteceu ===&lt;br /&gt;
Primeiro, vamos ao diretório do código fonte (linha 1), baixamos o código fonte do CMake (linha 2) e os descompactamos (linha 3). Criamos um diretório para compilar o CMake (linha 4) e entramos nele (linha 5). Rodamos o script de bootstrap do CMake para configurar a compilação (linha 6), depois compilamos (linha 7) e instalamos (linha 8) usando o usuário root.&lt;br /&gt;
&lt;br /&gt;
Se seu sistema não tem acesso ao comando &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt;, então você pode usar o &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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-27T06:48:14Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* O Que Aconteceu */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== O Shell Para Desenvolvimento ==&lt;br /&gt;
&lt;br /&gt;
Em alguns sistemas um novo usuário é configurado por padrão para usar o {{path|/bin/sh}}. Se esse não é o caso do seu sistema, você pode pular essa sessão. Usando {{path|/bin/sh}} pode ser bastante inconveniente para trabalhar e talvez você queria mudar isso para {{path|/bin/bash}} ou outro shell.&lt;br /&gt;
No Ark Linux, Fedora e Slackware, você pode pular esse passo - {{path|/bin/sh}} é {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Como o usuário kde-devel ===&lt;br /&gt;
&lt;br /&gt;
Se você não tem acesso ao root e seu sistema suporta a mudança do seu próprio shell com o aplicativo &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt;, então você pode tentar mudar seu shell para {{path|/bin/bash}} assim:&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: Como o usuário root ===&lt;br /&gt;
&lt;br /&gt;
Se seu sistema vem com a aplicação &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; você pode rodar o seguinte comando como root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Outra opção é de usar a aplicação &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; como root para editar com segurança seu {{path|/etc/passwd}}. Ache o 'kde-devel' no arquivo. Mude '{{path|/bin/sh}}' no final da linha para '{{path|/bin/bash}}', salve as mudanças e saia.&lt;br /&gt;
&lt;br /&gt;
O novo shell vai startar automaticamente quando você entrar como o usuário kde-devel.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
O QtDBus e KDE são conhecidos por trabalhar com versões 0.62, também com 0.92 e superiores, do D-Bus. As versões 0.60 e 0.61 podem funcionar também mas não foram testadas. Nós recomendamos usar a versão post-1.0 release (pelo menos a 0.94), então atualize se você não o fez.&lt;br /&gt;
&lt;br /&gt;
Você pode pular essa parte se você já tem uma versão recente do D-Bus ou se não quer atualizar. Provavelmente você não quer compilar os bindings ao menos que você irá ter que compilar o HAL (ver abaixo).&lt;br /&gt;
&lt;br /&gt;
Antes de continuar com os passos, tenha certeza que os cabeçalhos do X11 e as bibliotecas estão habilitadas. O script configure roda na linha 5, a seguinte instrução deverá aparecer para confirmar:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Tenha certeza que você configurou o ambiente corretamente como feito [[Getting_Started/Build/KDE4_%28pt_BR%29#Configure_o_Ambiente|acima]]. Isso é necessário para as funções &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; e &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; funcionarem.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' é uma função bash, clique aqui para saber mais(inglês)]] &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 # ver acima&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;
=== O Quê Aconteceu === &lt;br /&gt;
Depois de mudar para o diretório do código fonte(linha 1), o código fonte do D-Bus é baixado pelo freedesktop.org (linha 2) e descompactado (linha 3). Depois entra no diretório criado para o D-Bus (linha 4), as configurações de compilação são criadas pelo script {{path|configure}} (linha 5). Depois da compilação (linha 6) e instalação (linha 7) do D-Bus, nós usamos a ferramenta &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; para instalar o arquivo de identificação da maquina (machine identification file) que permite o bus começar automaticamente quando a sessão do desktop começar (linha 8).&lt;br /&gt;
&lt;br /&gt;
Note que você precisa de permissão de escrita no {{path|/var}} para os dois últimos passos. Se seu sistema não tem acesso ao comando sudo, você pode usar o comando &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt;, ex. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Os passos para compilar os bindings do glib são similares aos acima.&lt;br /&gt;
&lt;br /&gt;
Então quando esses dois pacotes estão compilados e instalados, nós precisamos arrumar o dono do arquivo pois ao usar 'sudo make install' o root que fica como dono do arquivo e dos diretórios no ~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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-27T06:44:28Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* D-Bus */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== O Shell Para Desenvolvimento ==&lt;br /&gt;
&lt;br /&gt;
Em alguns sistemas um novo usuário é configurado por padrão para usar o {{path|/bin/sh}}. Se esse não é o caso do seu sistema, você pode pular essa sessão. Usando {{path|/bin/sh}} pode ser bastante inconveniente para trabalhar e talvez você queria mudar isso para {{path|/bin/bash}} ou outro shell.&lt;br /&gt;
No Ark Linux, Fedora e Slackware, você pode pular esse passo - {{path|/bin/sh}} é {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Como o usuário kde-devel ===&lt;br /&gt;
&lt;br /&gt;
Se você não tem acesso ao root e seu sistema suporta a mudança do seu próprio shell com o aplicativo &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt;, então você pode tentar mudar seu shell para {{path|/bin/bash}} assim:&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: Como o usuário root ===&lt;br /&gt;
&lt;br /&gt;
Se seu sistema vem com a aplicação &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; você pode rodar o seguinte comando como root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Outra opção é de usar a aplicação &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; como root para editar com segurança seu {{path|/etc/passwd}}. Ache o 'kde-devel' no arquivo. Mude '{{path|/bin/sh}}' no final da linha para '{{path|/bin/bash}}', salve as mudanças e saia.&lt;br /&gt;
&lt;br /&gt;
O novo shell vai startar automaticamente quando você entrar como o usuário kde-devel.&lt;br /&gt;
&lt;br /&gt;
== D-Bus ==&lt;br /&gt;
O QtDBus e KDE são conhecidos por trabalhar com versões 0.62, também com 0.92 e superiores, do D-Bus. As versões 0.60 e 0.61 podem funcionar também mas não foram testadas. Nós recomendamos usar a versão post-1.0 release (pelo menos a 0.94), então atualize se você não o fez.&lt;br /&gt;
&lt;br /&gt;
Você pode pular essa parte se você já tem uma versão recente do D-Bus ou se não quer atualizar. Provavelmente você não quer compilar os bindings ao menos que você irá ter que compilar o HAL (ver abaixo).&lt;br /&gt;
&lt;br /&gt;
Antes de continuar com os passos, tenha certeza que os cabeçalhos do X11 e as bibliotecas estão habilitadas. O script configure roda na linha 5, a seguinte instrução deverá aparecer para confirmar:&lt;br /&gt;
 Building X11 code:        yes&lt;br /&gt;
&lt;br /&gt;
=== A Receita ===&lt;br /&gt;
&lt;br /&gt;
{{tip|Tenha certeza que você configurou o ambiente corretamente como feito [[Getting_Started/Build/KDE4_%28pt_BR%29#Configure_o_Ambiente|acima]]. Isso é necessário para as funções &amp;lt;tt&amp;gt;cs&amp;lt;/tt&amp;gt; e &amp;lt;tt&amp;gt;cb&amp;lt;/tt&amp;gt; funcionarem.}}&lt;br /&gt;
&lt;br /&gt;
 cs # [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc|'cs' é uma função bash, clique aqui para saber mais(inglês)]] &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 # ver acima&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;
=== O Que Aconteceu === &lt;br /&gt;
Depois de mudar para o diretório do código fonte(linha 1), o código fonte do D-Bus é baixado pelo freedesktop.org (linha 2) e descompactado (linha 3). Depois entra no diretório criado para o D-Bus (linha 4), as configurações de compilação são criadas pelo script {{path|configure}} (linha 5). Depois da compilação (linha 6) e instalação (linha 7) do D-Bus, nós usamos a ferramenta &amp;lt;tt&amp;gt;dbus-uuidgen&amp;lt;/tt&amp;gt; para instalar o arquivo de identificação da maquina (machine identification file) que permite o bus começar automaticamente quando a sessão do desktop começar (linha 8).&lt;br /&gt;
&lt;br /&gt;
Note que você precisa de permição de escrita no {{path|/var}} para os dois últimos passos. Se seu sistema não tem acesso ao comando sudo, você pode usar o comando &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt;, ex. &amp;lt;tt&amp;gt;su -c &amp;quot;make install&amp;quot;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Os passos para compilar os bindings do glib são similares aos acima.&lt;br /&gt;
&lt;br /&gt;
Então quando esses dois pacotes estão compilados e instalados, nós precisamos arrumar o dono do arquivo pois ao usar 'sudo make install' o root que fica como dono do arquivo e dos diretórios no ~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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-27T06:22:59Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* The development user's shell */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[Getting_Started/Set_up_KDE_4_for_development|KDE4 development guide]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== O Shell Para Desenvolvimento ==&lt;br /&gt;
&lt;br /&gt;
Em alguns sistemas um novo usuário é configurado por padrão para usar o {{path|/bin/sh}}. Se esse não é o caso do seu sistema, você pode pular essa sessão. Usando {{path|/bin/sh}} pode ser bastante inconveniente para trabalhar e talvez você queria mudar isso para {{path|/bin/bash}} ou outro shell.&lt;br /&gt;
No Ark Linux, Fedora e Slackware, você pode pular esse passo - {{path|/bin/sh}} é {{path|bash}}.&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Como o usuário kde-devel ===&lt;br /&gt;
&lt;br /&gt;
Se você não tem acesso ao root e seu sistema suporta a mudança do seu próprio shell com o aplicativo &amp;lt;tt&amp;gt;chsh&amp;lt;/tt&amp;gt;, então você pode tentar mudar seu shell para {{path|/bin/bash}} assim:&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: Como o usuário root ===&lt;br /&gt;
&lt;br /&gt;
Se seu sistema vem com a aplicação &amp;lt;tt&amp;gt;usermod&amp;lt;/tt&amp;gt; você pode rodar o seguinte comando como root: &amp;lt;tt&amp;gt;usermod -s /bin/bash&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Outra opção é de usar a aplicação &amp;lt;tt&amp;gt;vipw&amp;lt;/tt&amp;gt; como root para editar com segurança seu {{path|/etc/passwd}}. Ache o 'kde-devel' no arquivo. Mude '{{path|/bin/sh}}' no final da linha para '{{path|/bin/bash}}', salve as mudanças e saia.&lt;br /&gt;
&lt;br /&gt;
O novo shell vai startar automaticamente quando você entrar como o usuário kde-devel.&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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-26T03:45:30Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Create a user account for KDE4 development */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
== Criando a conta de usuário para o desenvolvimento do KDE 4 ==&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Algumas pessoas gostam de ter uma conta de usuário separada para o KDE4 (Antes de que um bug delete arquivos por engano), e as instruções abaixo foram escritas com esse proposito.&lt;br /&gt;
&lt;br /&gt;
Entretando é muito mais eficiente por ter tudo em uma conta de usuário, veja [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]]&lt;br /&gt;
para mais detalhes. &lt;br /&gt;
&lt;br /&gt;
Você pode continuar seguindo as instruções abaixo, mas não coloque as váriaveis de ambiente no seu &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;, coloque elas em um arquivo separado que você faça uso quando for para o ambiente de desenvolvimento do KDE 4.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Opção 1: Linha de Comando ===&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: Usando o KControl ===&lt;br /&gt;
&lt;br /&gt;
Ao invez dos comandos acima, você pode usar o módulo User no KDE Control Center se você já tem o KDE3 instalado.&lt;br /&gt;
&lt;br /&gt;
=== Configure o Ambiente ===&lt;br /&gt;
&lt;br /&gt;
Copie o {{path|~/.bashrc}} do seu usuário normal par o novo usuário kde-devel. Depois, copie e cole o conteúdo do [[Getting Started/Increased Productivity in KDE4 with Scripts/.bashrc|exemplo .bashrc]] dentro do {{path|~kde-devel/.bashrc}}. Tenha certeza de comentar a linha &amp;lt;tt&amp;gt;alias make=makeobj&amp;lt;/tt&amp;gt; se você não tem o comando &amp;lt;tt&amp;gt;[[Getting Started/Build/KDE4#Required Software|makeobj]]&amp;lt;/tt&amp;gt;. Provavelmente você quer modificar os paths para ter certeza que não irá incluir os kde3 paths. Também se você quer usar o KDevelop para desenvolver aplicativos para o KDE 4 você precisa passar a flag ''-GKDevelop3'' ao comando ''cmake'' (para fazer o CMake gerar arquivos de projetos KDevelop, isso irá ajudar a recompilar no futuro, veja [[Getting_Started/Set_up_KDE_4_for_development#Setting_up_the_environment|isso]]).  &lt;br /&gt;
Para fazer isso, você precisa abrir um novo bash ou executar &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;
Isso irá dar acesso aos comandos tais como &amp;lt;tt&amp;gt;cmakekde&amp;lt;/tt&amp;gt; que é usado no tutorial para forçar o cominho dos binários do Qt, KDE e CMake.&lt;br /&gt;
&lt;br /&gt;
Para mais informações, por favor leia o tutorial [[Getting_Started/Increased_Productivity_in_KDE4_with_Scripts|Aumentando a produtividade no KDE4 com Scripts(inglês)]].&lt;br /&gt;
&lt;br /&gt;
=== Mudando Para o Novo Usuário ===&lt;br /&gt;
Mude para o usuário kde-devel: (Não se esqueça do hífen)&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;
Se o ssh falhar, veja o [[Getting_Started/Set_up_KDE_4_for_development#Launching_KDE_4_apps|Launching KDE 4 apps]] na sessão [[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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-26T03:25:16Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Fedora */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-10/15/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-26T03:24:21Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Mandriva */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-15/10/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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;
No Mandriva as dependências necessárias para compilar o KDE4 são:&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 libgpgme-devel libboost1-devel libxine-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se você está rodando em um processador 64-bit você deve substituir o começo dos nomes dos pacotes de &amp;quot;lib...&amp;quot; para &amp;quot;lib64...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Se você prefere uma interfaçe gráfica(GUI), selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mandriva Linux Control Center.&lt;br /&gt;
&lt;br /&gt;
Isso inclui as instalação do CMake, DBus - você pode pular os passos 5 e 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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-26T03:21:05Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Gentoo */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-15/10/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [http://software.opensuse.org/download/devel:/tools:/building/ openSUSE build service].&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
==== Instalando na mão ====&lt;br /&gt;
&lt;br /&gt;
Você pode usar stable ebuilds só lembrando o seu sync portage antes de começar.&lt;br /&gt;
&lt;br /&gt;
Lembrete: Todos os comandos são executados como root.&lt;br /&gt;
&lt;br /&gt;
Requerimento:&lt;br /&gt;
&lt;br /&gt;
Precisamos habilitar os seguintes keywords no 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;
Tenha certeza que você setou a flah USE para o redland, se não o epomuk não irá funcionar.&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;
echo 'x11-libs/qt accessibility' &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esses são os pacotes que você vai precisar, Eu inclui a opção update para que você não precise reusar o emarge para pacotes já instalados.&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;
Você também vai precisar usar o emerge para o 'kde-base/kdesdk' ou kde-base/kdesdk-scripts'.&lt;br /&gt;
&lt;br /&gt;
Se você &amp;quot;emergou&amp;quot; o DBUS, CMAKE, QT ou HAL você pode pular as seguintes sessões.&lt;br /&gt;
Boa sorte!&lt;br /&gt;
&lt;br /&gt;
==== Instalando via portage ====&lt;br /&gt;
&lt;br /&gt;
Você pode instalar os pacotes KDE4 diretamente por:&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;
Para isso você precisa [http://gentoo-wiki.com/TIP_Overlays#Layman instalar layman] e depois colocar no &amp;quot;kde&amp;quot; overlay (que contém a 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;
Depois disso você precisa ajudar alguns USE-flags para o KDE4 e avisar o portage para usar o testing KDE 4 ebuilds ao invez do stable KDE 3. &lt;br /&gt;
&lt;br /&gt;
Assim o portage irá fazer todo trabalho de dependência para você. &lt;br /&gt;
&lt;br /&gt;
Informações detalhadas de como compilar o KDE4 no Gentoo via portage pode ser encontrada no [http://overlays.gentoo.org/proj/kde/wiki KDE overlay wiki]. E também é discutida nesse tópico [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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-26T03:09:56Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Ark Linux */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
apt-get install 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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-15/10/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-25T21:50:56Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: &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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-15/10/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== openSUSE ===&lt;br /&gt;
&lt;br /&gt;
No openSUSE 10.2 e mais novos, você pode instalar os pacotes usando [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;
Em releases mais antigas do SUSE, você pode usar o 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;
'''Pacotes Requeridos'''&lt;br /&gt;
&lt;br /&gt;
Os pacotes que você precisa para instalar são:&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 (para compilar kdesupport)&lt;br /&gt;
gpgme-devel (para compilar kdepimlibs)&lt;br /&gt;
libxine1-devel&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Pacotes Opcionais'''&lt;br /&gt;
&lt;br /&gt;
Você pode pular a parte de instalação do manual e a do kdesupport e suas dependências ( Qt 4.3, CMake 2.4.6, DBus, Hal, clucene-core, Strigi,&lt;br /&gt;
Soprano e outras dependências do Nepomuk) por adicionar o repositório KDE:KDE4 do [http://download.opensuse.org/repositories/KDE:/KDE4/ openSUSE Build Service] para suas instalações. &lt;br /&gt;
&lt;br /&gt;
Para openSUSE 10.2 ou mais novo, faça:&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;
Para versões mais velhas do SUSE Linux faça:&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/[SUA VERSÃO SUSE LINUX]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Agora instale os seguintes pacotes:&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;
Existem mais pacotes que precisam ser instalados para satisfazer o config-check, como libusb-devel, bison etc., então dê uma olhada nas notificações de configuração e instale de acordo. Por favor lembre de pular qualquer instrução que seja referencia do kdesupport abaixo. Comece a compilar pelo kdelibs. &lt;br /&gt;
&lt;br /&gt;
E para uma completa e funcional documentação da API você vai precisar também:&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;
Os pacotes binários do CMake para openSUSE estão disponiveis no repositório do KDE:KDE4 pelo [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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-25T21:23:52Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: &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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-15/10/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e strigi rpms. YMMV&lt;br /&gt;
&lt;br /&gt;
=== Kubuntu e Debian ===&lt;br /&gt;
&lt;br /&gt;
No Kubuntu 7.04 (Feisty) e Debian (Testing/Unstable) as dependencias que você precisa instalar são:&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 libpng12-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;
No Kubuntu 7.10 (Gutsy) e Debian unstable você deve adicionar:&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;
Para uma completa e funcional documentação da API você também precisa:&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;
Não tem necessidade de compilar o qt ou kdesupport no kubuntu gutsy. Todos os pacotes requeridos já estão inclusos na instalação acima. Para configurar o kde4 user e etc será explicado na próxima sessão, mas passe por cima das sessões de compilação do qt, hal e kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
Se você tiver erros na compilação do KDE4&lt;br /&gt;
Beta4 ou acima no Kubuntu 7.10, como:&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
Talvez você precise dar um checkout na parte do código fonte do kdesupport no SVN server do KDE4.  &lt;br /&gt;
&lt;br /&gt;
Isso será mostrado quando você chegar na parte da compilação do kdesupport.&lt;br /&gt;
&lt;br /&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;
libxine1-devel&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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-25T21:08:57Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: &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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
No Arch Linux você precisa instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Se quiser, você instalar o qt4 a partir do repositório do Arch Linux com o comando:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Para as bibliotecas clucene você precisa do [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] pelo AUR.&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
Alguns pacotes são requisitos para a compilação do KDE4 no Fedora 7 ou superior:&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Esta instalação inclui o D-Bus e CMake -- você pode pular os passos 5 e 6.&lt;br /&gt;
&lt;br /&gt;
DCH-15/10/07: Note - Pode ser mais simples usar RPMs. Note que vocÊ pode editar as variáveis em /etc/rpm/macros.kde4 (que são providas pelo Rawhide kde-filesystem).&lt;br /&gt;
&lt;br /&gt;
Para compilar:&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;
Eu tive melhores resultados criando uma rpm do kdesupport, significa que você não precisa instalar o soprano e 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 libpng12-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;
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;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided by installing the above. Setup the kde4 user etc as explained in the next section, but skip over compiling qt, hal and kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If you get something trouble on compile KDE4&lt;br /&gt;
Beta4 or above in Kubuntu 7.10, such as :&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
You may need to checkout the relevant part of&lt;br /&gt;
kdesupport source code in the SVN server of KDE4.  &lt;br /&gt;
&lt;br /&gt;
This is covered when you get to the section on compiling kdesupport.&lt;br /&gt;
&lt;br /&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;
libxine1-devel&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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-25T21:00:27Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: &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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[Getting_Started/Build/KDE4/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[Getting_Started/Build/KDE4/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ark Linux ===&lt;br /&gt;
No Ark Linux, as dependencias que você precisa é instalada pelo comando:&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;
Se você preferir uma interface gráfica, selecione os pacotes listados acima na ferramenta &amp;quot;Install Software&amp;quot; no Mission Control.&lt;br /&gt;
&lt;br /&gt;
Isso inclui a instalação do CMake, DBus e Qt - você pode pular os passos 5, 6 e 7.&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
In Arch Linux you need to install the following packages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to use the qt4 from the Arch Linux repository you can install them with:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For clucene libraries you need the [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] from AUR.&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This includes installation of D-Bus and CMake -- you can skip steps 5 and 6.&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 libpng12-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;
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;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided by installing the above. Setup the kde4 user etc as explained in the next section, but skip over compiling qt, hal and kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If you get something trouble on compile KDE4&lt;br /&gt;
Beta4 or above in Kubuntu 7.10, such as :&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
You may need to checkout the relevant part of&lt;br /&gt;
kdesupport source code in the SVN server of KDE4.  &lt;br /&gt;
&lt;br /&gt;
This is covered when you get to the section on compiling kdesupport.&lt;br /&gt;
&lt;br /&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;
libxine1-devel&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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-24T23:28:10Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Requerimentos */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc e g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&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;
=== Arch Linux ===&lt;br /&gt;
In Arch Linux you need to install the following packages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to use the qt4 from the Arch Linux repository you can install them with:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For clucene libraries you need the [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] from AUR.&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This includes installation of D-Bus and CMake -- you can skip steps 5 and 6.&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 libpng12-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;
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;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided by installing the above. Setup the kde4 user etc as explained in the next section, but skip over compiling qt, hal and kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If you get something trouble on compile KDE4&lt;br /&gt;
Beta4 or above in Kubuntu 7.10, such as :&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
You may need to checkout the relevant part of&lt;br /&gt;
kdesupport source code in the SVN server of KDE4.  &lt;br /&gt;
&lt;br /&gt;
This is covered when you get to the section on compiling kdesupport.&lt;br /&gt;
&lt;br /&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;
libxine1-devel&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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</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-24T23:28:02Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Requerimentos */&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=[[../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;
== Software Requirements ==&lt;br /&gt;
&lt;br /&gt;
The following is need to be installed to correct use of the tutorial:&lt;br /&gt;
* gcc and g++, preferable version 4.2 or higher&lt;br /&gt;
* svn, the subversion controll(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, witch is included in kdesdk. You can install from kdesdk (kdesdk-scripts on Debian) or similar packages, or download at [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], is the freedesktop MIME standard now used in KDE&lt;br /&gt;
* [http://boost.org/ boost], used by kdebase; after build and/or install, in order to make cmake aware about its location (FindBoost),  add the boost directory (witch contains the include subdirectory) to CMAKE_INCLUDE_PATH or set a environment variable called BOOST_ROOT that points to the 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;
=== Arch Linux ===&lt;br /&gt;
In Arch Linux you need to install the following packages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to use the qt4 from the Arch Linux repository you can install them with:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For clucene libraries you need the [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] from AUR.&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This includes installation of D-Bus and CMake -- you can skip steps 5 and 6.&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 libpng12-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;
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;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided by installing the above. Setup the kde4 user etc as explained in the next section, but skip over compiling qt, hal and kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If you get something trouble on compile KDE4&lt;br /&gt;
Beta4 or above in Kubuntu 7.10, such as :&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
You may need to checkout the relevant part of&lt;br /&gt;
kdesupport source code in the SVN server of KDE4.  &lt;br /&gt;
&lt;br /&gt;
This is covered when you get to the section on compiling kdesupport.&lt;br /&gt;
&lt;br /&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;
libxine1-devel&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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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/lib/kde4/libexec/kcheckpass&lt;br /&gt;
or&lt;br /&gt;
 chmod 755 $KDEDIR/lib/kde4/libexec/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>Chackal sjc</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)</id>
		<title>Getting Started/Build/KDE4 (pt BR)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Getting_Started/Build/KDE4_(pt_BR)"/>
				<updated>2007-11-24T23:26:07Z</updated>
		
		<summary type="html">&lt;p&gt;Chackal sjc: /* Requerimentos */&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=Começando|&lt;br /&gt;
&lt;br /&gt;
name=Compilando O KDE4 A Partir Do Código Fonte|&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=[[../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;
== Abstrato ==&lt;br /&gt;
&lt;br /&gt;
Esse tutorial mostra uma maneira de instalar o KDE pelo trunk rodando em sistemas Linus/BSD. Você pode também ajudar a traduzir tutoriais para [[/FreeBSD|FreeBSD]], [http://www.kdelibs.com/ Windows], [[/Mac OS X|Mac OS X]] e [http://solaris.kde.org/ Solaris]. Durante todo o tutorial o bash shell é usado.&lt;br /&gt;
&lt;br /&gt;
{{warning|Existe um grande risco de falhas '''nas Segundas-Feiras''' quando a maioria das kdelibs são commited(atualizadas). Acesse o [http://developer.kde.org/~dirk/dashboard/ Dashboard] para reportar quebras inesperadas. Você é encorajado à corrigir as falhas e erros.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Requerimentos ==&lt;br /&gt;
&lt;br /&gt;
Os seguintes softwares precisam ser instalados antes de seguir com o tutorial:&lt;br /&gt;
* gcc and g++, preferivel versão 4.2 ou superior&lt;br /&gt;
* svn, o controle de versão(cliente)&lt;br /&gt;
* pkg-config&lt;br /&gt;
* bibliotecas de desenvolvimento e headers para X11, OpenGL (mesa-common-dev e libglu1-mesa-dev), libjpeg, libpng, libungif, [http://clucene.sourceforge.net/index.php/Downloads libclucene], [http://download.librdf.org/source/ librdf], libxml2 e libxslt&lt;br /&gt;
* o &amp;lt;tt&amp;gt;makeobj&amp;lt;/tt&amp;gt; script, que faz parte do kdesdk. Você pode instalar pelo kdesdk (kdesdk-scripts no Debian) ou pacotes semelhantes, ou faça o download pelo  [http://websvn.kde.org/*checkout*/trunk/KDE/kdesdk/scripts/makeobj WebSVN]&lt;br /&gt;
* o [http://freedesktop.org/wiki/Software/shared-mime-info shared-mime-info package], que é o freedesktop MIME padrão usado agora pelo KDE&lt;br /&gt;
* [http://boost.org/ boost], precisa pelo kdebase; depois de compilar e/ou instalar, para que o cmake saiba sua localização (FindBoost),  adicione o diretório do boost (o que contém o sub-diretório include) para CMAKE_INCLUDE_PATH ou crie uma environment variable chamada BOOST_ROOT apontado para o diretório do boost.&lt;br /&gt;
&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;
=== Arch Linux ===&lt;br /&gt;
In Arch Linux you need to install the following packages:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy subversion bzip2 libxslt libxml2 \&lt;br /&gt;
shared-mime-info mesa boost dbus openssl \&lt;br /&gt;
pkgconfig xine-lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to use the qt4 from the Arch Linux repository you can install them with:&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
pacman -Sy qt4&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For clucene libraries you need the [http://aur.archlinux.org/packages.php?do_Details=1&amp;amp;ID=5968&amp;amp;O=0&amp;amp;L=0&amp;amp;C=0&amp;amp;K=clucene&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=25&amp;amp;do_MyPackages=0&amp;amp;do_Orphans=0&amp;amp;SeB=nd  PKGBUILD] from AUR.&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 gcc-c++ libXext-devel cmake subversion giflib-devel \&lt;br /&gt;
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \&lt;br /&gt;
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \&lt;br /&gt;
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \&lt;br /&gt;
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \&lt;br /&gt;
imlib2-devel patch&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This includes installation of D-Bus and CMake -- you can skip steps 5 and 6.&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 libpng12-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;
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;
There is no need to compile qt or kdesupport on kubuntu gutsy. All required packages are provided by installing the above. Setup the kde4 user etc as explained in the next section, but skip over compiling qt, hal and kdesupport.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
If you get something trouble on compile KDE4&lt;br /&gt;
Beta4 or above in Kubuntu 7.10, such as :&lt;br /&gt;
&lt;br /&gt;
Soprano version is too low&lt;br /&gt;
&lt;br /&gt;
strigi xxx.h not found...&lt;br /&gt;
&lt;br /&gt;
You may need to checkout the relevant part of&lt;br /&gt;
kdesupport source code in the SVN server of KDE4.  &lt;br /&gt;
&lt;br /&gt;
This is covered when you get to the section on compiling kdesupport.&lt;br /&gt;
&lt;br /&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;
libxine1-devel&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;
echo 'x11-libs/qt accessibility' &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 libgpgme-devel libboost1-devel libxine-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 manually into the kdesupport directory in ~ and execute the command cmakekde. if this still doesn't 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?  ($QTDIR and $PATH are used to get the QT installation path)&lt;br /&gt;
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 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.o