Getting Started/Build/FAQ

From KDE TechBase
Revision as of 01:31, 26 November 2008 by Tampakrap (talk | contribs) (orphography)

KDE developers and users that like to stay on the "bleeding edge" often hit a compilation problem for which there is a known solution (for instance getting a new Qt snapshot). To reduce traffic on the lists, this page tries to answer the most common problems one can find when trying to compile the current development version of KDE. This doesn't apply to trying to compile previous releases or snapshots, nor does it list bugs.

General Questions

How to get the latest sources?

The recommended method is to use anonsvn to get both KDE and Qt (from the module qt-copy). Alternatively, use snapshots : get Qt from ftp.trolltech.com and KDE from ftp.kde.org and mirrors.

What else do I need to compile KDE ?

It depends on the version of KDE you want to compile.

For KDE 4

  • CMake 2.4.3 or later.
  • A C++ compiler with support for exceptions. GCC Version 3.3 or greater is preferred. GCC 2.95.x is not supported.
  • Qt 4. KDE 4 is currently tied to the next version of Qt to be released (Qt 4.3). You may use the qt-copy module to get a supported version of Qt 4.
  • If you want SSL support (for instance, to support secure web sites in Konqueror), make sure you install OpenSSL, version 0.9.6 or later.
  • Some free space on your hard disk and some time... :)

For KDE 3

  • Automake 1.5.0 and Autoconf 2.53 or later
  • a C++ compiler which supports exceptions (preferably GCC 3.3. GCC 2.95.x will also work.)
  • Qt 3.3.2 or later in the Qt 3 series.
  • If you want SSL support (for instance, to support secure web sites in Konqueror), make sure you install OpenSSL, version 0.9.6 or later.
  • Some free space on your hard disk and some time... :)

Configure Errors

What is configure?

configure is a shell script residing in each KDE package. Upon invocation it will gather some information about your system and prepare a Makefile in each directory. It is no longer used starting with KDE 4.

can not guess host type; you must specify one

configure uses the config.guess script in the admin directory to determine your host type. config.guess expects the C compiler to be called cc, though. If your compiler is named differently you can either specify your compiler via the environment variable CC or create a symbolic link (e.g. ln -s /usr/local/bin/egcs /usr/local/bin/cc). Of course, in the latter example you should make sure that /usr/local/bin is in your PATH in the first place.

Can't find X includes

X headers like X.h are missing. They usually reside in /usr/include/X11/ or similar. Your distribution may contain them in a seperate package like X-devel. If the files are simply installed in a non-standard directory see configure --help.

cannot find -lXext

When using SuSE, install xdevel from SuSE's "X" Series in YaST. On Caldera, Mandrake and Redhat the package is named XFree86-devel.

configure in kdesupport gives: Header string not found

Install libstdc++-devel.

Qt [....] not found.

Do you have the currently required Qt library installed ? See "How to get the latest sources". Make sure that QTDIR is pointing to the correct location.

Some other common problems

If you are using Solaris 2.6 and want to compile KDE as a normal user, please see this document first.

(Solaris) ANSI C++ forbids declaration `XSetTransientForHint' with no type

Well it's not new but better put it somewhere. Solaris X headers are buggy. They declare functions with no return type (assuming it defaults to int). You can get around by setting CXXFLAGS="-fpermissive" before ./configure to let g++ be okay with that.

(BSD) Shared libraries are not correctly built, konqueror crashes with "Undefined symbol __eh_rtime_match"

Set LIBS="-lgcc -lstdc++ -Wl,-export-dynamic" while running configure, for all modules.

'Gslice' crash messages after KDE has been built with --enable-fast-malloc=full

If you are using a recent version of Glib (version >= 2.9.1) and have built kdelibs using the configure option --enable-fast-malloc=full, you are likely to see aRts related crashes which output an error message on the terminal:

***MEMORY-ERROR***: [xxxx]: GSlice: failed to allocate 248 bytes (alignment: 256): Invalid argument

This is due to a clash in the way that arts/kdelibs and Glib handle memory allocation. There are two alternative solutions to this: one is to not use --enable-fast-malloc=full; the other is to set an environment variable for the KDE session

G_SLICE=always-malloc

Stupid questions

Why do all the KDE applications installed including small games and text editors want to access Internet?

Q: I installed KDE4Win, everything is fine, but every time I try to start KDE application, my firewall asks me if I want to allow this application to access Internet. Despite of allow I or deny, some applications run, some not. I am confused.

See also

http://wiki.kde.org/ErrorMessages