2 Building, running and Valgrinding KDE 4.2 svn from source
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 It is recommended to make a new user ("kde4", maybe) to do the
6 building, and do all the following as that user. This means it can't
7 mess up any existing KDE sessions/settings.
9 Prelims (note, needed for both building and running KDE4):
11 # Change these as you like; but "-g -O" is known to be a good
12 # speed vs debuginfo-accuracy tradeoff for Valgrind
15 export CXXFLAGS="-g -O"
17 export KDEINST=$HOME/InstKdeSvn ## change as you like
18 export PATH=$KDEINST/bin:$PATH
19 export LD_LIBRARY_PATH=$KDEINST/lib:$KDEINST/lib64:$LD_LIBRARY_PATH
21 unset XDG_DATA_DIRS # to avoid seeing kde3 files from /usr
24 export PKG_CONFIG_PATH=$KDEINST/lib/pkgconfig:$KDEINST/lib64/pkgconfig:$PKG_CONFIG_PATH
25 # else kdelibs' config detection of strigi screws up
27 Check these carefully before proceeding.
34 The final installation will be placed in the directory $KDEINST.
36 As a general comment, it is particularly important to read the output
37 of the cmake runs (below), as these tell you of missing libraries that
38 may screw up the build. After a cmake run, you may want to install
39 some supporting libs (through yast, etc) before re-running cmake. The
40 "rm -f CMakeCache.txt" ensures cmakes starts afresh.
46 # note also that this assumes that the KDE 4.2 sources are
47 # acquired from the KDE trunk; that is, this is happening
48 # prior to the 4.2 release.
50 # note this takes ages, unless you are fortunate enough to have
51 # a gazigabit-per-second network connection
52 # checking out merely "trunk" is a really bad idea
53 # due to the enormous amount of unnecessary stuff fetched.
55 svn co svn://anonsvn.kde.org/home/kde/trunk/kdesupport trunk_kdesupport
56 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE trunk_KDE
58 # This alone soaks up about 2.5GB of disk space.
59 # You'll also need to snarf a copy of qt-x11-opensource-src-4.4.3.tar.bz2
60 # (md5 = 00e00c6324d342a7b0d8653112b4f08c)
66 First build qt-4.4.3 with QtDBus support and some other kind of
67 support (can't remember what. jpeg?). These are both added by
68 default provided the relevant packages are installed. Check the Qt
69 configure output to be sure.
71 bzip2 -dc qt-x11-opensource-src-4.4.3.tar.bz2 | tar xvf -
72 cd qt-x11-opensource-src-4.4.3
74 emacs mkspecs/common/g++.conf
75 # change QMAKE_CFLAGS_RELEASE and QMAKE_CFLAGS_DEBUG both to be -g -O
77 # optionally, in src/corelib/tools/qvector.h, for the defns of
78 # QVectorData and QVectorTypedData, change
79 #if defined(QT_ARCH_SPARC) && defined(Q_CC_GNU) && defined(__LP64__) \
80 && defined(QT_BOOTSTRAPPED)
81 # to "if 1 || defined ..."
82 # twice (else get strange memcheck errors with QVector on ppc. Not
83 # sure if this is a qt bug (possibly), a gcc bug (unlikely) or a
84 # valgrind bug (unlikely)). I don't think this is necessary on x86
87 echo yes | ./configure -platform linux-g++-64 -prefix $KDEINST
88 # NB: change that to linux-g++-32 for a 32 bit build
90 # check configure output before proceeding, to ensure that
91 # qt will built with support for the following:
93 # QtDBus module ....... yes (run-time)
94 # GIF support ......... plugin
95 # TIFF support ........ plugin (system)
96 # JPEG support ........ plugin (system)
97 # PNG support ......... yes (system)
98 # MNG support ......... plugin (system)
99 # zlib support ........ system
100 # OpenSSL support ..... yes (run-time)
102 # If some of these are missing ("... no"), then it means you need
103 # to install the relevant supporting libs and redo the qt configure
104 # (make confclean, then redo configure)
108 # this takes approx 1 hour on a dual processor 2.5GHz PPC970
110 # check that this installed correctly
111 # - qmake is in $KDEINST/bin and is linked against stuff in
113 # - ditto designer and linguist
114 # - check qmake, designer, linguist actually start up/run
122 for each package, use a separate source and build dir cd to the build
123 dir (can be anything)
127 # note that LIB_SUFFIX must be "" for 32 bit builds and "64" for 64 bit builds
128 rm -f CMakeCache.txt && cmake /path/to/source/tree/for/this/package -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
130 # check output, particularly that it has the right Qt
132 # make -j 2 quite often screws up
135 Packages should be built in the order:
143 This gives a working basic KDE. Then build the rest in any order, perhaps:
151 So the actual stuff to do is:
159 rm -f CMakeCache.txt && cmake ~/trunk_kdesupport \
160 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
161 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
168 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdelibs \
169 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
170 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
177 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdepimlibs \
178 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
179 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
184 mkdir kdebase-runtime
186 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdebase/runtime \
187 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
188 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
193 mkdir kdebase-workspace
195 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdebase/workspace \
196 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
197 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
204 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdebase/apps \
205 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
206 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
213 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdegraphics \
214 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
215 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
222 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdeadmin \
223 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
224 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
231 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdeutils \
232 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
233 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
240 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdenetwork \
241 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
242 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
249 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdepim \
250 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
251 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
258 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdeartwork \
259 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
260 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
267 rm -f CMakeCache.txt && cmake ~/trunk_KDE/kdemultimedia \
268 -DCMAKE_INSTALL_PREFIX=$KDEINST -DCMAKE_BUILD_TYPE=debugfull \
269 -DLIB_SUFFIX=64 -DQT_QMAKE_EXECUTABLE=$KDEINST/bin/qmake
274 # still todo: koffice, amarok ?
280 Make sure dbus is running (pstree -p <myusername> | grep dbus)
284 eval `dbus-launch --auto-syntax`
286 probably best to ensure there's only one instance, to avoid confusion
288 You need PATH, LD_LIBRARY_PATH, XDG_DATA_DIRS and XDG_CONFIG_DIRS set as above
290 Then run startkde in an xterm on the new X server