Building RKWard from Source

The purpose of this page is to give you step-by-step instructions to compile and install RKWard from sources.

Note: These are generic instructions, which should work on most systems. However, for many systems, more detailed instructions, or even ready-made binary packages are available. See Binaries_and_Build_Scripts. For building on Windows, see RKWard_on_Windows/Packaging.

Note: For instructions on compiling the KDE 4 versions of RKWard (before RKWard 0.7.0), please refer to an older version of this page.

Contents of this page:

Getting the source code

Building RKWard


RKWard requires:

If you can’t find the required packages for your distribution, take a look at Binaries_and_Build_Scripts for distribution specific information, or contact us for help.

Debian derivatives:

$ apt-get install libkf5webkit-dev libkf5texteditor-dev kdoctools-dev r-base-dev cmake extra-cmake-modules


IMPORTANT: You will need to have the R shared library installed. This is typically located in a place like /usr/lib/R/lib/ 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.

Suppose the source is obtained as (here rkward-0.7.0.tar.gz is used as an example, change it accordingly): $ tar xzf rkward-0.7.0.tar.gz # extracts to rkward-0.7.0 directory $ cd rkward-0.7.0

Then, the recommended way to build from source is: $ mkdir build; cd build $ cmake .. [options] # see Path to sources and CMake options below $ make $ sudo make install

Path to sources

The cmake command needs to know the path to rkward sources. Typically this where the CMakeLists.txt file exists. Since, in the example above, the build directory was created inside the extracted source directory, CMakeLists.txt exists in the directory immediately above; hence ’..’ is the appropriate path.

CMake options (configuring)

The cmake command offers a number of parameters to control the build process. Some commonly needed are:

In some cases you may want to set the following options:

$ R –silent > Sys.getenv (“R_LIBS_USER”).




    For example, on a i386 Debian with R 2.9,
    \~/R/i486-pc-linux-gnu-library/2.9 is the default. Create the
    directory manually, if it doesn't exist: **mkdir -p
    \~/R/i486-pc-linux-gnu-library/2.9** . Then, using
    -DR_LIBDIR=$HOME/R/i486-pc-linux-gnu-library/2.9 should work.

Further generic options are listed on .


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


The most common source of problems are

  1. Missing some of the build requirements
  2. Wrong / missing parameters to cmake

So please re-read the corresponding sections, first. If you’re still in trouble, let us know, we’ll be happy to help you.

For some systems, Binaries_and_Build_Scripts has more information.