Building RKWard From Source
The purpose of this page is to give you step-by-step instructions to compile and install RKWard from sources.
- Available source packages
- Distribution specific instructions and ready-made binary packages
Picking the right version of RKWard
Currently, RKWard is published in two different versions, one for KDE 3 based systems (RKWard versions numbered up to 0.4.9x), one for KDE 4 based systems (RKWard versions numbered 0.5.0 and above).
KDE 4 based system, here, means that you have only version 4 of the KDE libraries. You do not necessarily have to run a full KDE 4 desktop. In fact, on systems with both versions of kdelibs, either version of RKWard can be used.
Note that active development is focused on the KDE 4 series of RKWard. For the KDE 3 series, we only publish the most important bug fixes from time to time. Therefore, if you want the latest and greatest RKWard, use the most recent version above 0.5.0.
Building RKWard 0.5.0 and above
- KDE-libraries and headers (>= 4.0) (http://www.kde.org)
- The names of the required packages differ from distribution to distribution. Some are called "kdelibs4", some "libkde4", on Debian and Ubuntu the name is "kdelibs5". For the headers you will generally need packages called "kdelibs4-dev", "libkde4-devel" or similar.
- Qt-libraries and headers (>= 4.3) (http://www.trolltech.com)
- On most systems these should be installed automatically, when you install the KDE-libraries, above.
- R and headers (http://www.r-project.org)
- Common package names are "r", "r-base", etc. Note that some distributions package the HTML-documentation in a separate package, so look out for "r-base-html" or similar package names.
- PHP with commandline-interface (Version 4.x or 5.x) (http://www.php.net)
- Common package names include "php4", "php5", "php4-cli", "php5-cli".
- CMake (http://cmake.org)
- Generally this package is called "cmake".
IMPORTANT: You will need to have the R shared library installed. This is typically located in a place like /usr/lib/R/lib/libR.so. Unfortunately, some distributions do not yet ship their R binary with the shared library. In those (rare) cases, you'll have to compile and install R on your own with the option --enable-R-shlib.
The recommended way to build from source is:
> mkdir build; cd build > cmake path_to_rkward_sources [options] # see below > make > sudo make install
CMake options (configuring)
The cmake command offers a number of parameters to control the build process. Some commonly needed are:
- set the installation base directory. Generally -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` should be correct.
- type of build. Useful settings include -DCMAKE_BUILD_TYPE=Release and -DCMAKE_BUILD_TYPE=debugfull
In some cases you may want to set the following options:
- path to the R executable. You may want to set this, if you have multiple versions of R installed, or R is not in your path. Example: -DR_EXECUTABLE=/usr/bin/R
- directory where R packages should be installed. Generally, this option is only of interest to packagers.
- R home directory. Almost certainly this option is not needed.
- path to R include files. Almost certainly this option is not needed.
Further generic options are listed on http://www.cmake.org/Wiki/CMake_Useful_Variables .
As a last step, you _have to_ run 'make install'. Otherwise RKWard will be missing important menu-options, may behave strangely, or may not run at all. As root run:
> make install
Make sure you have set the correct path in cmake (the -DCMAKE_INSTALL_PREFIX option).
For now it's recommended to run RKWard from the command-line for debug-output. For the few available command-line options see
> rkward --help