Trinity Build HowTo?

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

1. Introduction, Prerequisites, and Precompiling Notes

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

NOTE: Many Trinity packages and files have been renamed to avoid confusion with KDE4 applications. Rather than use a "k" prefix, renamed Trinity files use a "t" prefix. The Krita package has been renamed to Chalk.

NOTE: 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.

NOTE: cmake 2.8.4 or more recent is expected when building with cmake.

NOTE: As of Trinity 3.5.13 the foundation modules (tqtinterface, arts, tdelibs, tdebase) and certain core modules (refer to the attached list) must be built with cmake. Remaining packages are built with autotools. Trinity packages converted to cmake:

Dependencies:

  • tqtinterface
  • arts
  • dbus-tqt
  • dbus-1-tqt
Core/Main Suite:
  • tdelibs
  • tdebase
  • tdenetwork
  • tdeartwork
  • tdegraphics
  • tdevelop
  • tdepim
  • tdesdk
  • tdetoys
  • tdeutils
Applications:
  • abakus
  • amarok
  • dolphin
  • gtk-qt-engine
  • kde-style-lipstik
  • kde-style-qtcurve
  • kdesvn
  • kgtk-qt3
  • kio-locate
  • knetworkmanager8
  • knetworkmanager9
  • kpilot
  • kpowersave
  • rosegarden
  • tde-systemsettings
  • wlassistant

NOTE: Conversion to cmake might have started with other Trinity packages but is not yet implemented or tested.

NOTE: Until the cmake migration is fully completed, tqtinterface should be built to install with a $PREFIX of /usr rather than /opt/trinity.

NOTE: Whenever there is any possibility of KDE4 being installed, the expected installation location for all Trinity packages, except tqtinterface but including tqt3/qt3, is to $PREFIX=/opt/trinity.

NOTE: Trinity packages are built with an expectation that KDE4 likely is installed and therefore is designed to be compatible with KDE4.

NOTE: As of the 3.5.13 release the Trinity project has taken over maintenance of Qt3. Therefore, pull the Qt3 sources from the Trinity release tarball or our GIT server. Existing distribution packaging should continue to work with the updated Trinity sources. However, be aware that the generic Qt3 patches in use by many distributions have already been included in the Trinity source tree, and therefore will need to be removed from packaging files. Distribution-specific patches have not been applied to the Trinity tree and must remain in the distribution's packaging files.

NOTE: 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)

NOTE: 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
  • tdetoys
  • tdeutils
  • kaffeine
  • kdiff3

NOTE: 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.

NOTE: Python-tqt, pytdeextensions, and python-trinity (built and installed in that order) are prerequisites to provide python bindings with tdebindings, but are not required to build tdebindings.

NOTE: Python-tqt, pytdeextensions, and python-trinity are direct replacements for PyQt3? and PyKDE3?. There no longer is any need to build PyQt3? or PyKDE3?.

NOTE: libart-lgpl no longer is maintained upstream (https://bugzilla.gnome.org/show_bug.cgi?id=155472#c4) and needs several patches (http://git.trinitydesktop.org/cgit/libart-lgpl/diff/?id=150562b89b645c402f1bb837a09f8b84bf6e49ec) to avoid crashing some apps. The version of libarts provided by the Trinity Project includes those patches and is intended to be a replacement for any version of libarts currently installed by any distro. Build this patched version of libart and replace the stock libart installed with the distro.

NOTE: Regarding Third-party/LibreOffice: This folder contains patches that add TDE support to the upstream LibreOffice? sources. The patches allow LibreOffice? to use Trinity dialog boxes. The patches have not been merged into the upstream LibreOffice? GIT tree, but they work just fine as-is when applied to the stock LO sources. Obtaining the advantages of these patches requires rebuilding LibreOffice? from sources.

NOTE: 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/include/libGL.la. 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.

NOTE: The tdepim package from the Trinity sources will not build unless the libical package is installed (libical is standard on most distributions).

NOTE: In some systems, K3B? is not built to support all the additional features K3B? provides, such as ripping an unencrypted DVD. To build that support into K3B? requires several additional packages be installed before building K3B?.

NOTE: The koffice package expects the wv2 package to provide MS Word import support. The older wv2-0.2.3 package is somewhat broken. Users are encouraged to update wv2-0.2.3 to wv2-0.4.2. The newer version of wv2 is compiled with cmake and ignores compiling with automake. The libwv2.la file provided upstream is broken with respect to automake and will cause automake to fail. Basically, /usr/lib/libwv2.la is missing a proper header statement. This should be patched when creating the wv2-0.4.2 package.

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

cd <tdeartwork>/kscreensaver/kxsconfig/
./update_hacks.sh
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).

NOTE: 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.

NOTE: To avoid build problems with automake when Qt4 is installed set the following configure options:

    --with-qt-dir=${QTDIR}
    --with-qt-includes=${QTDIR}/include
    --with-qt-libraries=${QTDIR}/lib

NOTE: The only package built with cmake that requires Qt configure options is tqtinterface: -DQT_VERSION=3.

NOTE: 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:

  /opt/trinity/share/services/svn+file.protocol
  /opt/trinity/share/services/svn+http.protocol
  /opt/trinity/share/services/svn+https.protocol
  /opt/trinity/share/services/svn+ssh.protocol
  /opt/trinity/share/services/svn.protocol

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.

2. Building from GIT Sources

To download the sources from GIT, first ensure GIT is installed locally. Then create a new directory to store those sources. Detailed instructions for using GIT are available here at this wiki:

Project GIT

Downloading the entire GIT tree might require several hours depending upon connection speed. Currently the approximate size is about 4 GB. Updating the local tree is much faster after the upstream tree is downloaded.

3. Building with autoconf

For those packages 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/libtool.m4.in
cp -Rp <path to your system's ltmain.sh file> admin/ltmain.sh
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"

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

View the Distribution Specific Builds page for additional configure options.

4. Building with cmake

Building with cmake is much easier. The current GIT code has been recently updated to build with the latest GCC versions (verified up to and including gcc4.6). If class constructor issues surface during the build, please post the error to the trinity-users list. Choose where to install Trinity (/opt/trinity, /opt/tde, etc...) and update the path for a successful build. (the following example places trinity in /opt/trinity - adjust as needed) Please adjust the path variable as necessary. The cmake arguments that have been used successfully to build Trinity will vary, but will look similar to the following. Not all exports will be needed on all systems:

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="--disable-debug"
export DEBUG_CMAKE_OPT=""

  cmake path/to/trinity/module \
    -DCMAKE_C_FLAGS:STRING="$CPUOPTIONS" \
    -DCMAKE_CXX_FLAGS:STRING="$CPUOPTIONS $DEBUG_CMAKE_OPT" \
    -DCMAKE_INSTALL_PREFIX=${PREFIX} \
    -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
    -DMAN_INSTALL_DIR=${MANDIR} \
    -DBUILD_ALL=ON
  make VERBOSE=1

Out of source building

Out of source building of Trinity modules is recommended to build the code without cluttering the local pristine GIT source tree. To do an out of source build, create a temporary directory to build the trinity module in (eg. $TMP/tdelibs) then change into the $TMP/tdelibs directory and issue the cmake command:

mkdir $TMP/tdelibs
cd $TMP/tdelibs

cmake ~/trinity/tdelibs \
    -DCMAKE_INSTALL_PREFIX=${PREFIX} \
    -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
    -DMAN_INSTALL_DIR=${MANDIR} \
  -DBUILD_ALL=ON
make VERBOSE=1

5. Unique Build Requirements for Individual Packages

* 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.

* The cmake -DQT_VERSION=3 option is needed only to build tqtinterface.

* When building on 64-bit, the following (T)Qt3 configuration option might need to be explicitly declared in some distro build scripts:

-platform ${PLATFORM}

where ${PLATFORM} == linux=g++-64 rather than linux-g++ (notice the dash!)

More to be written!

6. Install

make install || exit 1

7. Build Order

There is a specific order to prevent dependency errors during building Trinity.

Required:

  • tqt3 (replaces Qt3; Qt3 without the tqtinterface layer remains available)
  • tqtinterface
  • arts
  • dbus-tqt
  • dbus-1-tqt
  • tqca-tls (Recommended but required for some applications, such as the Kopete OTR add-on)
  • libart-lgpl
  • avahi-tqt (Recommended but required when supporting DNS discovery services)
  • tdelibs
  • tdebase (after building and installing tdebase the basic Trinity desktop is functional)

Recommended:

  • sip4-tqt (Recommended but required for building python related bindings for tdebindings)
  • python-tqt (Recommended but required for python bindings support)
  • pytdeextensions (Recommended but required for building python related bindings for tdebindings)
  • python-trinity (Recommended but required for building python related bindings for tdebindings)
  • tqscintilla

The following build order seems to work well for the remaining core packages when building the stable release.

  • tdebindings
  • tdeaccessibility
  • tdeutils
  • tdemultimedia
  • tdenetwork
  • tdeadmin
  • tdeartwork
  • tdegames
  • tdetoys
  • tdeedu
  • tdegraphics
  • tdepim
  • tdesdk (Build tdesdk after installing tdepim. tdepim provides libkcal (bugzilla) hooks for tdesdk.)
  • tdevelop (Build tdevelop after tdesdk. tdesdk provides cvs support for tdevelop.)
  • tdeaddons

8. Additional Functionality

Certain Trinity packages are not required but provide additional functionality when building Trinity packages:

Trinity Libraries:

NOTE: 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

Other packages:

The following list includes additional packages that may be installed to obtain full functionality of various Trinity packages. These additional packages are not required. This list only provides how additional Trinity functionality is obtained and is not a list of dependencies per se, although there might be some overlap.

This is not a complete list. Please help with updating the list!

tdelibs

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

tdebase

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

tdebindings

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

tdeutils

  • xmms multimedia player (superkaramba)

tdemultimedia

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

tdenetwork

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

tdeedu

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

tdevelop

  • graphviz graph visualization

tdeaddons

  • xmms multimedia player (kicker applets)

tdewebdev

  • XSLT Extensible Stylesheet Language Transformations
  • DocBook?

tdepim

k3b

  • libsndfile C library for reading and writing sampled sound files
  • libdvdcss library for transparent DVD device access with on-the-fly CSS decryption
  • libdvdnav library support for DVD navigation features
  • ffmpeg software to record, convert and stream audio and video
  • lame MP3 encoding support
  • libdv- quasar DV codec
  • libdvdread read DVD video disks
  • a52dec video decoder
  • faac Advanced Audio Coder (MPEG2-AAC, MPEG4-AAC)
  • faad2 AAC decoder
  • xvidcore MPEG-4 compliant video codec
  • schroedinger C implementation of BBC's dirac codec
  • openjpeg open-source JPEG 2000 codec
  • x264 H264/AVC video stream encoder
  • speex an audio compression format designed for speech
  • transcode video stream processor
  • libquicktime library for reading and writing QuickTime? files
  • mjpegtools video recording/playback tools
  • libmpeg2 mpeg-video decoding library
  • vcdimager video CD and Super Video CD tools
  • emovix video CD distribution tools
  • musepack-tools Musepack decoder/encoder
  • libmusicbrainz MusicBrainz? client library

amarok

  • Ruby
  • libmp4v2 MP4V2? tagging

koffice

  • wv2 Microsoft Word conversion
  • GraphicsMagick? various image filters (chalk)
  • PostgreSQL? (kexi)

kaffeine

  • cdparanoia digital audio extraction tool
  • gst-plugins-base GStreamer plugins
  • gstreamer streaming multimedia framework
  • xine-lib xine multimedia playback engine libraries

k9copy

  • ffmpeg software to record, convert and stream audio and video
  • dvdauthor DVD authoring tools
  • vamps DVD backup tool
  • MPlayer movie player
  • k3b CD and DVD creation and ripping

digikam

  • lcms color management engine
  • dcraw decode raw digital photos
  • libgphoto2 digital camera library
  • jasper JPEG-2000 codec
  • exiv2 Exif and IPTC metadata library and tools
  • libkdcraw dcraw C++ library wrapper
  • libkexiv2 exiv2 library wrapper
  • libkipi image plugin interface structure
  • kipi-plugins plugins for libKipi
  • sqlite self contained SQL database engine

gwenview

  • exiv2 Exif and IPTC metadata library and tools
  • libkexiv2 exiv2 library wrapper
  • libkipi image plugin interface structure
  • kipi-plugins plugins for libKipi

9. 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.

NOTE: Building with cmake is much faster.

Core Packages

  • 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

Other Packages

  • libical: 1 minute
  • libcaldav: 1 minutes
  • libcarddav: ? minutes
  • k3b: 8 minutes
  • amarok: 10 minutes
  • knemo: 2 minutes
  • ktorrent: 7 minutes
  • koffice: 109 minutes
Topic revision: r53 - 21 Nov 2012 - 22:36:09 - DarrellAnderson
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Trinity Desktop Environment Wiki? Send feedback