Getting Started/Build/Distributions/Linux From Scratch

< Getting Started‎ | Build‎ | Distributions
Revision as of 05:11, 4 February 2011 by JRT (Talk | contribs)

Jump to: navigation, search


Contents

Getting_Started/Build/KDE4/LFS


Building KDE4 From Source (Linux From Scratch requirements)
Tutorial Series   Getting Started
Previous   Build KDE4.x, D-Bus Configuration
What's Next   Build KDE4.x
Further Reading   Introduction to CMake

CMake

KDE-4 and some supporting libraries use CMake.

Install the latest version from cmake.org

Library Requirements

General dependencies

KDE-4 requires a lot of the same general purpose libraries as KDE-3.

The output from running CMake should list what you are missing -- which generally applicable libraries that you need which I will not discuss further.

DBus and HAL

A system should have these installed:

DBus
DBus-Glib
HAL
HAL-Info
PolicyKit-0.9
EggDBus
polkit-0.97
ConsoleKit

(and properly configured) although, strictly speaking, they are not all dependencies for KDE-4.x.

See: BLFS for build and configure instructions.

HOWEVER, KDE-4 and KDESupport libraries may need newer versions of the libraries than those in BLFS. So, it is probably best to install the versions stated above or the latest releases of these dependencies rather than the versions in BLFS.

Some of these libraries are dependent on:

Linux-PAM-1.1.1
Shadow-4.1.4.2

which should be installed and configured according to the BLFS instructions.

DocBook DTD

KDE-4 still requires version 4.2 of:

DocBook SGML DTD
DocBook XML DTD.

See the instructions in this old version of BLFS:

http://archive.linuxfromscratch.org/blfs-museum/5.0/BLFS-5.0/

Boost C++ Libraries

Get the current release (e.g. boost_1_42_0.tar.gz) here:

http://sourceforge.net/projects/boost/files/boost/
Build

The current release eliminates the arcane naming issues. Although not the same as using autotools, it is now simple to build and install.

Remove the includes from previous versions:

/usr/include/boost_<version>

and if you have a link:

/usr/include/boost

remove that also.

Then:

./bootstrap.sh --prefix=/usr
./bjam install

CLucene

The CLucene developers suggest using the GIT repository since there are no recent releases. However, KDE-4 currently depends on the last (old) release:

http://downloads.sourceforge.net/project/clucene/clucene-core-stable/0.9.21b/clucene-core-0.9.21b.tar.bz2

Do NOT use CMake to build it.

Qt

TRUNK

Use kde-qt from:

git clone git://gitorious.org/+kde-developers/qt/kde-qt.git

This installs as Qt-<version>, so when it updates to the next version, it won't install in the same place. This means that you will need to change the <version> any place where it is specified. You will also have to install QCA (and its plugins) again when the version changes.

KDE >= 4.4

You can use the GIT clone [see TRUNK above], or your can use the latest release of QT-4.6.x from Nokia:

http://qt.nokia.com/downloads/linux-x11-cpp
BRANCH up to 4.3 or a release up to 4.3.x

Use 4.5.3:

http://qt.nokia.com/downloads/downloads#lgpl

Or a newer release (see above). A newer release may have issues.

Build

You will probably need to use some options for configuring Qt. Various options may be appropriate and/or needed depending on your system, what you have installed, and where it is installed. Run:

 ./configure --help

to see the options. There are a lot of them, but the defaults work for most of them.

Suggested configuration:

./configure -no-separate-debug-info -plugin-sql-mysql -I/usr/include/mysql -plugin-sql-sqlite -optimized-qmake -nomake demos -nomake examples -fast -dbus

{change the include directory for mysql as needed}

If installing Phonon from KDESupport (recommended), or other separate Phonon, add the configure option:

-no-phonon

to avoid having two versions of libraries with the same SO number.

QCA-2.0.2 (crypto add on for Qt)

Do not use the one in KDESupport or KDE's SVN.

Download the current release of qca from:

http://delta.affinix.com/download/qca/2.0/

and the plugins:

qca-cyrus-sasl
qca-gnupg
qca-ossl

from:

http://delta.affinix.com/download/qca/2.0/plugins/

NOTE: qca-ossl-2.0.0-beta3 will not build against the current release of OpenSSL without being patched:

http://home.earthlink.net/~tyrerj/kde/KDE-4/qca-ossl.patch

LibDBusMenu-Qt

Required for KDE >= 4.5.0. Appears to be optional for KDE-4.4.

Get release >= 0.3.5 here:

https://launchpad.net/libdbusmenu-qt/+download

and the current release of the dependency QJson here:

http://sourceforge.net/projects/qjson/files/

GMM

If you don't have Getfem++ installed, get the current release of GMM from:

http://home.gna.org/getfem/download.html

Qzion and Qedjie

Get them:

http://code.openbossa.org/projects/qedje/pages/Home

You also need the dependency EET. Get either the snapshot there o the current release here:

http://download.enlightenment.org/releases/

PROBLEM: KDE requires QEdje >= 0.4.0 which depends on QZion >= 0.4.0 and the 0.4.0 release of QZion will not build.

If it won't build, check line 13 of the file:

... /qzion-mainline/python/qzion/qzionobject.sip

It should be:

const char *name;

Eigen2

Get the current 2.0.x release from:

http://eigen.tuxfamily.org

Java Development Kit

You need a Java compiler with JNI to build the Sesame2 storage backend for Soprano and a Java RunTime (JVM) to run it.

http://java.sun.com/javase/downloads/widget/jdk6.jsp

Remember to add the "bin" directory to your path and the "lib" directory to your "/etc/ld.so.conf" file.

Raptor, Rasqal, and Redland

Get:

redland-1.0.8
rasqal-0.9.19
raptor-1.4.21

From:

http://download.librdf.org/source/

Note: newer versions of Redland don't work.

and the current release of the (optional) Redland dependency 3Store here:

http://downloads.sourceforge.net/project/threestore/files/

Note: If 3store3-3.0.17 will not build against Rasqal, then skip it for now -- it is optional.

When building Redland, you will probably need to use:

--with-bdb=

to point to your Berkeley DB directory.

If your installed SQLite is > 3.6.16, you will probably have to configure Redland with:

--with-sqlite=no

Install in this order:

Raptor
Rasqal
Redland

Virtuoso Open-Source

Only needed for KDE >= 4.4 and TRUNK

Get virtuoso-opensource >= 6.1.1 here:

http://sourceforge.net/projects/virtuoso/

If you have problems, use the direct link:

http://downloads.sourceforge.net/project/virtuoso/virtuoso/6.1.1/virtuoso-opensource-6.1.1.tar.gz

and the current release of the dependency iODBC here:

http://www.iodbc.org/dataspace/iodbc/wiki/iODBC/Downloads

If building iODBC only for KDE, use configure parameter:

--disable-gui

For building Virtuoso, these configure parameters are useful:

--with-jdk4=
--without-internal-zlib
--with-pthreads
--with-readline
--with-iodbc=

If building Virtuoso only for KDE, (to save disk space) use configure parameter:

--disable-all-vads

KDE Supporting dependencies

TRUNK

use KDESupport:

svn co svn://anonsvn.kde.org/home/kde/trunk/kdesupport

If you don't want to install all the small SVN icons:

cd kdesupport/oxygen-icons
svn rm `find -name "small"`
KDE 4.6

There is no KDESupport-4.6 so, you need to install these packages with:

CMAKE_INSTALL_PREFIX:PATH=/opt/KDE-4.6 for the BRANCH.

Or:

CMAKE_INSTALL_PREFIX:PATH=/opt/KDE-4.6.x for a release.
Automoc4

Available here:

ftp://ftp.kde.org/pub/kde/stable/automoc4/<version>
Attica

Available here:

ftp://ftp.kde.org/pub/kde/stable/attica
Polkit-Qt-1

Available here:

ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin
Soprano
KDE 4.4 & 4.5

Use KDESupport:

svn co svn://anonsvn.kde.org/home/kde/tags/kdesupport-for-<version>

This does not include: Ontologies. See below.

BRANCH up to 4.3 or a release up to 4.3.x

Use the KDESupport SVN tag that matches your KDE version. E.G. for 4.3:

svn co svn://anonsvn.kde.org/home/kde/tags/kdesupport-for-4.3/kdesupport
TagLib

Since TagLib is also a dependency for GStreamer (gst-plugins-good), you probably don't want to have a redundant installation for the KDE-4 version that will be your 'production' version. Remove it from KDESupport SVN:

svn rm taglib

And install the current release from:

http://developer.kde.org/~wheeler/taglib.html

NOTE: To get GST Plugins Good to build the plugin for TagLib you need to set the environment variable:

HAVE_CXX="yes"

before you run: "configure".

QCA

The QCA in KDESupport is not currently used (see QCA-2.0.2 above) so:

svn rm qca
Phonon

For KDE Support 4.5 and TRUNK:

Do not use the version in KDE Support. Remove if from KDE Support:

svn rm phonon

See below

Build

The current KDESupport may not be compatible with LFS installed FFmpeg. Use this patch:

------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------ Index: strigi/src/streamanalyzer/endplugins/CMakeLists.txt

=======================================================

--- strigi/src/streamanalyzer/endplugins/CMakeLists.txt (revision 1096146) +++ strigi/src/streamanalyzer/endplugins/CMakeLists.txt (working copy) @@ -34,9 +34,3 @@

  target_link_libraries(xine ${XINE_LIBRARY})
endif(XINE_FOUND)

-if(FFMPEG_FOUND) - include_directories(${FFMPEG_INCLUDE_DIRS}) - ADD_STRIGIEA(ffmpeg ffmpegendanalyzer.cpp) - #set_target_properties( ffmpeg PROPERTIES COMPILE_FLAGS "${FFMPEG_DEFINITIONS}" ) - target_link_libraries(ffmpeg ${FFMPEG_LIBRARIES}) -endif(FFMPEG_FOUND) ------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------

Or, use the FFmpeg snapshot on the CBLFS page:

http://cblfs.cross-lfs.org/index.php/FFmpeg

This more recent snapshot requires: "libx264.so.83". The x264 snapshot on CBFLS is too old. This Source RPM worked:

x264-0.83.2245-1plf2010.1.src.rpm

Google is your friend.

NOTE: You may need to add these parameters to the CMake command line:

-DENABLE_FAM:BOOL=ON
-DENABLE_EXPAT:BOOL=ON
-DENABLE_INOTIFY:BOOL=ON
-DGAIM_LIBS:STRING=<path>/lib
-DGAMIN_LIBRARIES:STRING=<path>/lib

You must build with the same CMake parameters as the KDE-4 modules; specifically:

-DCMAKE_INSTALL_PREFIX:PATH=/opt/KDE-<version>
-DSYSCONF_INSTALL_DIR=/etc/kde-<version>

Ontologies

Required for KDE >= 4.4 and TRUNK.

If you checked out KDESupport from TRUNK, you have the package. Otherwise, get TRUNK here:

svn co https://oscaf.svn.sourceforge.net/svnroot/oscaf/trunk/ontologies

Or the release from Source Forge:

http://sourceforge.net/projects/oscaf/files/shared-desktop-ontologies/

and install with CMake with:

CMAKE_INSTALL_PREFIX:PATH=/usr

Phonon

TRUNK

Phonon has been moved to

http://gitorious.org/phonon

Get it with the command:

git clone git://gitorious.org/phonon/phonon.git
KDE >= 4.5

The current release of Phonon is available here:

ftp://ftp.kde.org/pub/kde/stable/phonon/<version>/src

Also install back ends as needed. You must have either the GStreamer or Xine back end. They are available here:

ftp://ftp.kde.org/pub/kde/stable/phonon/phonon-backend-<name>/4.4.4/<version>/src

Where <name> is one of:

directshow
gstreamer
vlc
xine
KDE-4.4

KDEBindings-4.4.x will not build against Phonon from the GIT repository.

Use the version in KDESupport-4.4.

Build

Install with:

CMAKE_INSTALL_PREFIX=$QTDIR

and the rest of the CMake parameters the same as KDESupport or Supporting dependencies.

PolKit-KDE-1

KDE >= 4.4 and TRUNK

Use:

ftp://ftp.kde.org/pub/kde/stable/apps/KDE4.x/admin/polkit-kde-1-0.95.1.tar.bz2
Build

The 0.95.1 tarball from the KDE FTP site will not install correctly. You need to apply this patch:

------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------ diff -Naur polkit-kde-1-0.95.1.old/agent/CMakeLists.txt polkit-kde-1-0.95.1/agent/CMakeLists.txt --- polkit-kde-1-0.95.1.old/agent/CMakeLists.txt 2009-12-23 04:31:29.000000000 -0700 +++ polkit-kde-1-0.95.1/agent/CMakeLists.txt 2010-03-25 15:54:12.000000000 -0700 @@ -11,7 +11,7 @@

target_link_libraries(polkit-kde-authentication-agent-1
                                         ${KDE4_KDEUI_LIBS}

- ${POLKITQT-1_AGENT_LIBRARY} + ${POLKITQT-1_LIBRARIES}

)

configure_file(polkit-kde-authentication-agent-1.desktop.in ${CMAKE_BINARY_DIR}/polkit-kde-authentication-agent-1.desktop)

@@ -25,4 +25,4 @@

  set (DESKTOP_INSTALL_DIR /etc/xdg/autostart)
endif (DESKTOP_INSTALL_DIR)

-install(FILES ${CMAKE_BINARY_DIR}/polkit-kde-authentication-agent-1.desktop DESTINATION ${DESKTOP_INSTALL_DIR}) +install(FILES ${CMAKE_BINARY_DIR}/polkit-kde-authentication-agent-1.desktop DESTINATION ${KDE4_AUTOSTART_INSTALL_DIR}) ------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------8<------

You must build with the same CMake parameters as the KDE-4 modules; specifically:

-DCMAKE_INSTALL_PREFIX:PATH=/opt/KDE-<version>
-DSYSCONF_INSTALL_DIR=/etc/kde-<version>
-DKDE4_AUTH_POLICY_FILES_INSTALL_DIR:STRING=/usr/share/PolicyKit/policy

shared-mime-info

You should have this installed with a prefix: "/usr". All you need to do is build KDE-4 with:

-DUPDATE_MIME_DATABASE_EXECUTABLE:FILEPATH=/usr/bin/update-mime-database

However there appears to be a problem for KDE < 4.5

Get the current release from:

http://www.freedesktop.org/wiki/Software/shared-mime-info

You need to install this with the same prefix as KDE4 (even if you already have it installed in "/usr") to eliminate missing MIME type errors. Currently, KDELibs won't build unless you do this. And, even if it does, you will get run time errors -- popup windows saying that certain MIME types can not be found.

This appears to be a bug that was fixed with KDE-4.5; for ealier versions this workaround does seem to work.

KIPI Plugins

Get the current release from:

http://sourceforge.net/projects/kipi/

This package is dependent on KDEGraphics. The package has a lot of optional dependencies which you need to satisfy only if you want the corresponding plugins built. You should install it in the same directory where you installed KDE-4.x.y.

Be sure that you updated your: "PKG_CONFIG_PATH" to include $CMAKE_INSTALL_PREFIX/lib/pkgconfig (for example):

/opt/KDE-4/lib/pkgconfig

Oxygen Icons

If you checked out KDESupport from TRUNK or the TAG: "kdesupport-for-<version>", you have them.

If you checked out KDESupport from a tag "kdesupport-<version>" up to 4.3, you need to get them. If you are using SVN, that would be:

svn co svn://anonsvn.kde.org/home/kde/tags/KDE/<version>/oxygen-icons

{where <version> is the latest release for the branch you are using (e.g. 4.3.4 for the 4.3 branch)}

Or, you can simply use TRUNK:

svn co svn://anonsvn.kde.org/home/kde/trunk/kdesupportsvn/oxygen-icons

LibSSH

TRUNK and KDE-4.4 require libssh. Get the current release >= 0.4.0 from:

http://www.libssh.org/

Dependencies for specific KDE modules

KDEBindings

SIP and PyQt

To build the Python bindings for KDE, you need the current releases of SIP and PyQt from here:

http://www.riverbankcomputing.com/software/sip/download
http://www.riverbankcomputing.com/software/pyqt/download

Install: "SIP" first and then: "PyQt". These are both Python add-ons so they install with:

python configure.py
make
make install
Build Notes for PyQt

Unless you want to get into serious complications, you should only build PyQt against one version of Qt and you should only install one version of KDEBindings. If you try to build against multiple versions of Qt or install multiple versions of KDEBindings, with a single instance of Python (or other languages), you will install two versions of the same file in the same place.

PyQt will find Qt based on your environment variables. So, if you want to install for a version of KDE other than the one that you are currently using, be sure that these are set correctly:

QTDIR
QT_PLUGIN_PATH

KDEBindings is dependent on KDEGraphics (specifically Okular).

Other language dependencies are optional. If you have other supported languages installed on your system, installing KDEBindings will build bindings for them.

QScintilla2

QScintilla2 is optional. If you are installing it, get it here:

http://www.riverbankcomputing.com/software/qscintilla/download

Install it after SIP & PyQt. It has a Qt build system, so install for Qt4 it with:

cd Qt4
qmake qscintilla.pro
make
make install

KDEEdu

KDEEdu might be dependent on KDEBindings.

KDENetwork

LibV4l

Only required for KDE >= 4.4 and TRUNK

Get the current release here:

http://people.fedoraproject.org/~jwrdegoede/

and follow the build instructions in the README file.

Optional Dependencies

Telepathy-Qt4 is the Qt bindings for Telepathy. Since this has general usage, you should probably install it along with its semi-optional dependency telepathy-glib.

Get the current releases here:

http://telepathy.freedesktop.org/releases/telepathy-glib/
http://telepathy.freedesktop.org/releases/telepathy-qt4/

Install: "telepathy-glib" first and then: 'telepathy-qt4".

The output from CMake lists several other optional dependencies. It appears that these are needed to support specific functions in KDENetwork. So, if you need those functions, you need to install them. You will probably also need to install the corresponding Telepathy addons from here:

http://telepathy.freedesktop.org/releases/

TO DO: more information needed.


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal