How to Build TDE Core Modules

From Trinity Desktop Project Wiki
Jump to navigation Jump to search

This HowTo provides detailed notes and explanations for building the Trinity Desktop Environment base packages.

Introduction and Requirements

Basic Building Requirements

Individual Linux distributions might have different build requirements. If these are known they will be available on the Distribution Specific Builds page.

There is an ongoing effort to convert the build process from autotools to cmake. Until the cmake conversion is complete, both cmake and autotools are needed to build Trinity packages. cmake 2.8.12 or more recent is expected when building with cmake.

To build the packages still using autotools, you will need a standard autotools setup (automake, autoconf, etc.)

You'll also need a C++ compiler. g++ from the GNU Compiler Collection is the most usual, the current GIT version of Trinity has been tested against versions up to and including 4.6. clang++ is also supported.

Other Requirements

(NOTE: List compiled from old QT3/kdelibs/kde-base ebuilds--will someone please check these?)

Most of the non-build-related mandatory dependencies for the core Trinity packages are pretty basic:

  • an X server
  • openssl
  • fontconfig
  • freetype
  • ghostscript
  • xdg support
  • libpng
  • libmng

If your Linux distribution came with any kind of graphical environment at all, you should already have this stuff.

To build tdepim, you will also need libical (standard on many distros).

See Additional Functionality for a list of optional dependencies and what they enable.

About TQt

Trinity uses the TQt widget toolkit. TQt is a fork of the last version of Qt3, with a significant amount of bug-fixes and improvements. Since Trolltech, the original developer of Qt, dropped support for Qt3, the Trinity Project has forked it and continued its maintenance and development.

About libart

libart-lgpl is another dependency package that the Trinity Project has taken over after it was dropped by its original maintainer, because it needed several patches to prevent crashes. The version of libart provided by the Trinity Project includes those patches and is intended to be a replacement for any version of libart currently installed by any distro. Build this patched version of libart and replace the stock libart installed with the distro.

Coexisting with QT5/KDE Plasma

Trinity is intended to be able to run on computers that also have KDE Plasma installed. Originally, a lot of Trinity applications had the same names as their KDE4 counterparts, which was problematic. All of those have been renamed. In general, this was accomplished by changing the old KDE "K" prefix to a "T" ("kwin" -> "twin"). Applications that don't match anything currently part of KDE Plasma have retained their old names.

To avoid stepping on KDE Plasma's toes, we strongly suggest picking a specific subdirectory prefix to install Trinity to--the one used in these directions is $PREFIX=/opt/trinity.

Preparing the Source

To use the release tarballs, just untar them somewhere.

To live dangerously and use the GIT sources, read Notes on GIT Sources first.


Suggested Build Order

A lot of the Trinity core packages depend on one another (in particular, everything depends on tdelibs). Follow this build order to prevent problems.

Start with the required core packages:

  1. tqt3
  2. cmake-trinity
  3. tqtinterface
  4. arts
  5. dbus-tqt
  6. dbus-1-tqt
  7. tqca-tls (Recommended but required for some applications, such as the Kopete OTR add-on)
  8. libart-lgpl
  9. avahi-tqt (Recommended but required when supporting DNS discovery services)
  10. tdelibs
  11. tdebase

At this point, you should have a functioning TDE desktop with basic utilities (terminal, file manager, text/source editors, etc.) If you're going to build tdebindings and want Python support available, continue with the Python linking packages (or skip over them if you don't care about Python support):

  1. sip4-tqt
  2. python-tqt
  3. pytdeextensions
  4. python-trinity
  5. tqscintilla (if you want thr Scintilla editor component)

The following build order seems to work well for the remaining core packages when building the stable release. You don't have to install everything, though, unless you're packaging TDE for your distribution--pick the packages that suit your use case.

  1. tdebindings
  2. tdeaccessibility
  3. tdeutils
  4. tdemultimedia
  5. tdenetwork
  6. tdeadmin
  7. tdeartwork
  8. tdegames
  9. tdetoys
  10. tdeedu
  11. tdegraphics
  12. tdepim
  13. tdesdk (Build tdesdk after installing tdepim. tdepim provides libkcal (bugzilla) hooks for tdesdk.)
  14. tdevelop (Build tdevelop after tdesdk. tdesdk provides cvs support for tdevelop.)
  15. tdeaddons

Once that's done, you may want to add some extra applications on top.

Building Packages with cmake

Starting from TDE version R14.0.11, the package cmake-trinity is mandatory prior to building, this package includes the required macros for the build.

List of Packages Building with cmake

cmake is the newer, easier, and more maintainable build system the Trinity Project is in the process of porting TDE source to.

The list of modules maintained as an issue #9 in the TGW indicates which core and dependency packages have already been converted, and their autotools build scripts are no longer maintained. Some other packages are in the process of conversion, but do not have complete cmake build scripts yet. Build everything not in the list above with autotools.

Read the notes section below for individual package requirements before trying to build anything.

Performing a cmake Build with Ninja

The command listing below is only an example. You will wish to edit the exports if your distribution puts things in unusual locations or if you wish to install to somewhere other than /opt/trinity (tqtinterface has special requirements--see the Notes). Not all exports will be needed on all systems.

export PREFIX=/opt/trinity
export SYSCONFDIR=/etc/trinity
export LIBDIR=$PREFIX/lib
export MANDIR=$PREFIX/man
export TQTDIR=$PREFIX/tqt3
export PATH=$TQTDIR/bin:$PREFIX/bin:$PATH
export PKG_CONFIG_PATH=:$LIBDIR/pkgconfig:$TQTDIR/lib/pkgconfig:$PKG_CONFIG_PATH
# for lib64:
# export LIBDIRSUFFIX=64
from the Trinity module:
mkdir -p build && cd build
cmake -G "Ninja" \
   -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 cmake --build . -- -v


  • Until the cmake migration is fully completed, tqtinterface should be built to install with a $PREFIX of /usr rather than /opt/trinity, even if you are installing everything else to /opt/trinity.
  • tqtinterface requires the following additional QT-related build option:
  • arts and tdelibs execute compiled binaries as part of the build process. Therefore they need to have -DCMAKE_SKIP_RPATH="OFF" set. All other modules do not need the RPATH set.
  • When building on 64-bit, the following (T)Qt3 configuration option might need to be explicitly declared in some distro build scripts:
-platform linux-g++-64 (rather than linux-g++ (notice the dash!))
  • If class constructor issues surface during the build, please post the error to the trinity-users list.

Building Packages with Autoconf


If the package you're trying to build is on the list of those that will build with cmake, try that first, because its autotools files will be unmaintained, bit-rotted, and possibly outright broken.

Please read the notes section below for individual package requirements before trying to build anything.

For those packages that still need to be built with autotools, the following steps must be run for each affected Trinity module, including tarball snapshots.

Regenerate Autoconf/Automake files

cd to the desired module to build, then run:

cp -Rp <path to your system's libtool.m4 file> admin/
cp -Rp <path to your system's file> admin/
make -f admin/Makefile.common

Configure and Build

export PREFIX=/opt/trinity
export SYSCONFDIR=/etc/trinity
export LIBDIR=/opt/trinity/lib
export MANDIR=/opt/trinity/man
export QTDIR=/opt/trinity/lib/qt3-3.3.8.d
export PATH=/opt/trinity/qt3-3.3.8.d/bin:/opt/trinity/bin:$PATH
export LD_LIBRARY_PATH=/opt/trinity/lib:/opt/trinity/lib/trinity:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=:/opt/trinity/lib/pkgconfig:/opt/trinity/qt3-3.3.8.d/lib/pkgconfig:$PKG_CONFIG_PATH
# Enable only one of the following:
# export DEBUG_AUTOTOOL_OPT="--enable-debug=full"
export DEBUG_AUTOTOOL_OPT="--disable-debug"

 ./configure \
   --prefix=${PREFIX} \
   --sysconfdir=${SYSCONFDIR} \
   --libdir=${LIBDIR} \
   --mandir=${MANDIR} \
   --with-qt-dir=${QTDIR} \
   --with-qt-includes=${QTDIR}/include \
   --with-qt-libraries=${QTDIR}/lib \

View the Distribution Specific Builds page for additional configure options.


  • Certain modules will not build across multiple cores in parallel. That is, with a "make -j" flag set to anything greater than 1. These packages are:
    • tdebindings (some people have no problems with this package and parallel processing)
    • tdemultimedia (some people have no problems with this package and parallel processing)
  • Not well documented anywhere, but when building with automake several packages need the --enable-closure configure option:
    • tdeaccessibility
    • tdeaddons
    • tdeadmin
    • tdebindings
    • tdeedu
    • tdegames
    • tdemultimedia
    • tdesdk
  • When building on 64-bit, the following (T)Qt3 configuration option might need to be explicitly declared in some distro build scripts:
-platform linux=g++-64 (rather than linux-g++ (notice the dash!))

Build Times

Building Trinity requires time and patience. Build times vary. Here are some guidelines from building Trinity 3.5.12 on a dual core 2.3 GHz AM2 with 4GB of RAM, using tmpfs, 7200 rpm SATA II hard drives; with Amarok, Firefox, Konsole, Konqueror, Kate, and other various apps often running concurrently. Compile times will be faster without such overhead, but likely will be longer when building with support package hooks. Packages using cmake will build faster than those still stuck on autotools.

  • tqtinterface: 2 minutes
  • arts: 4 minutes
  • tdelibs: 44 minutes
  • tdebase: 33 minutes
  • tdebindings: 36 minutes
  • tdeaccessibility: 5 minutes
  • tdeutils: 8 minutes
  • tdemultimedia: 24 minutes
  • tdenetwork: 23 minutes
  • tdeadmin: 4 minutes
  • tdeartwork: 3 minutes
  • tdegames: 8 minutes
  • tdetoys: 2 minutes
  • tdeedu: 15 minutes
  • tdegraphics: 17 minutes
  • tdesdk: 14 minutes
  • tdevelop: 27 minutes
  • tdeaddons: 7 minutes
  • tdewebdev: 12 minutes
  • tdepim: 63 minutes

Approximate total time: 5 hours 51 minutes

Time to a functional system (basic desktop): 1 hour 23 minutes


The command is the same regardless of whether your package was built with cmake or autotools:

make install || exit 1

Additional Functionality

Certain Trinity packages gain additional functionality when compiled with additional dependencies available. Also, we maintain some libraries which provide purely optional functionality.

Optional Trinity Libraries

None of these Trinity libraries are required but all provide additional functionality for a variety of packages. These libraries must be built and installed before any packages using these libraries can take advantage of the additional functionality.

  • libkipi: required by kipi-plugins
  • kipi-plugins: several high-end image viewers such as gwenview and digikam
  • libkdcraw: several image viewers and graphics apps, such as chalk and digikam
  • libkexiv2: several image viewers
  • libksquirrel: required by ksquirrel (TDE swiss-army-knife for graphic file formats, also supports medical image formats if xmedcon is provided)
  • libtqt-perl: adept add-on
  • mlt: not required or supported at this time
  • mlt++: not required or supported at this time
  • pytdeextensions: replacement for PyQt3 and PyKDE3, and used by apps such as tdebindings and tde-guidance
  • python-trinity: replacement for PyQt3 and PyKDE3, and used by apps such as tdebindings and tde-guidance

List of Optional Dependencies by Trinity Package


  • avahi DNS discovery
  • avahi-tqt Trinity TQt layer for avahi, available in Trinity libraries
  • hspell Hebrew spell checking
  • krb5 Kerberos authentication
  • openexr EXR image format


  • avahi DNS discovery
  • avahi-tqt Trinity TQt layer for avahi, available in Trinity libraries
  • krb5 Kerberos authentication
  • openexr EXR image format
  • GraphicsMagick image filters


  • Ruby
  • JRE Java Runtime Environment
  • JDK Java Development Kit
  • Python
  • python-trinity, available in Trinity libraries
  • pytdeextensions, available in Trinity libraries


  • xmms multimedia player (superkaramba)


  • cdparanoia digital audio extraction tool (kaudiocreator)
  • speex an audio compression format designed for speech


  • xmms multimedia player (kopete plugins)
  • ortp real-time transport protocol stack under GPL (kopete plugins)
  • speex audio compression format designed for speech (kopete plugins)


  • facile functional constraint library (kalzium)
  • ocaml A programming language (kalzium)
  • boost boost C++ Libraries


  • graphviz graph visualization


  • xmms multimedia player (kicker applets)


  • XSLT Extensible Stylesheet Language Transformations
  • DocBook text markup


Quirks and Known Bugs

Building Sip

Sip is available on many/most distros. Sip requires Qt3 to build, but won't build on TQt3, which adds the tqinterface layer to Qt3. More than likely down the road, Sip will be dumped or moved to Qt4 by distro maintainers. All of the python-*-tqt-* packages need Sip to build. Build this TQt3 compatible version of Sip and replace the stock Sip installed with the distro.

OpenGL and nVidia

Building many Trinity and related packages depend upon OpenGL, such as tdegraphics, k3b, koffice, tdenetwork, gwenview, digikam, etc.;

as well as dependency packages such as libkipi, libkdcraw, libkexiv2, avahi, etc.

If any of those packages are built when the proprietary nvidia drivers are installed, the dependent package will fail to build with an error about /usr/lib/

That file is installed by the proprietary nvidia package. When building for personal use only, then building those packages with nvidia installed will pose no harm.

When building packages for other users then build the entire suite of packages in a "clean" generic OpenGL environment.

Other users might not use the proprietary nvidia package. This is true of any package that has OpenGL dependencies.

Tdeartwork and xhack Screensavers

Before building tdeartwork, install any and all xhack screensavers that might be uses, then

cd <tdeartwork>/kscreensaver/kxsconfig/ ./

This will generate the TDE bindings required to allow installed screensavers show up in the Trinity screensaver control panel, along with their configuration options. When adding a new screensaver the update_hacks command needs to be rerun and tdeartwork recompiled/reinstalled. Distribution maintainers should install all available screensavers from their distribution and then run update_hacks during the initial build setup when building redistributable binary packages (see the Debian tdeartwork build scripts in GIT for an example of how to do this).

Poppler Support in Tdegraphics

Building tdegraphics with poppler support requires building a Trinity poppler-tqt support package. With many distros poppler no longer is built with Qt3 support. The Trinity poppler-tqt provides the necessary hooks for tdegraphics without rebuilding poppler. The poppler-tqt dependency sources are located in the tdegraphics/kfile-plugins dependencies directory and are built automatically with the tdegraphics build option -DWITH_PDF=ON.

Tdesvn/Tdesdk svn-kio Conflict

tdesvn and tdesdk provide conflicting files for svn-kio services. Neither package is a dependency of the other. When tdesdk or tdesvn will be installed without the other, then no change is required. When both tdesdk and tdesvn are to be installed, then to avoid filesystem conflicts the following files must be removed from one of the packages before installing:


Since tdesvn uses the ksvn kio exclusively, while tdesdk uses the svn kio, consider removing the conflicting files from tdesdk to eliminate the same services relying on multiple kio service files.