Fork me on GitHub
<< back to documentation

Apache Celix - Building and Installing

Apache Celix aims to be support a broad range of UNIX platforms.

Currently the continuous integration build server builds and tests Apache Celix for:

  • Ubuntu Trusty Tahr (14.04)
    • GCC
    • CLang
  • OSX
    • GCC
    • CLang
  • Android (cross-compiled on Ubuntu Trusty Tahr)
    • GCC


The following packages (libraries + headers) should be installed on your system:

  • Development Environment
    • build-essentials (gcc/g++ or clang/clang++)
    • git
    • java (for packaging bundles)
    • make (3.2 or higher)
  • Apache Celix Dependencies
    • zlib
    • uuid
    • curl (only initialized in the Celix framework)
    • jansson (for serialization in libdfi)
    • libffi (for libdfi)
    • libxml2 (for remote services and bonjour shell)

For debian based systems (apt), the following command should work:

sudo apt-get install -yq --no-install-recommends \
	build-essential \
  	curl \
  	git \
  	libjansson-dev \
  	libcurl4-openssl-dev \
    java \
  	cmake \
  	libffi-dev \

For Fedora based systems (dnf), the following command should work:

sudo dnf group install -y "C Development Tools and Libraries"
sudo dnf install \
    cmake \
    make \
    git \
    java \
    libcurl-devel \
    jansson-devel \
    libffi-devel \
    libxml2-devel \

For OSX systems with brew installed, the following command should work:

    brew update && \
    brew install lcov libffi cmake && \
    brew link --force libffi

Download the Apache Celix sources

To get started you first have to download the Apache Celix sources. This can be done by cloning the Apache Celix git repository:

#Create a new workspace to work in, e.g:
mkdir ${HOME}/workspace
export WS=${HOME}/workspace
cd ${WS}

#clone the repro
git clone --single-branch --branch master

Building Apache Celix

Apache Celix uses CMake as build system. CMake can generate (among others) makefiles.

Building using CMake and makefiles:

cd ${WS}/celix
mkdir build
cd build
cmake .. 

Editing Build options

With use of CMake, Apache Celix makes it possible to edit build options. This enabled users, among other options, to configure a install location and select additional bundles. To edit the options use ccmake or cmake-gui. For cmake-gui an additional package install can be necessary (Fedora: dnf install cmake-gui).

cd ${WS}/celix/build
ccmake .
#Edit options, e.g. enable BUILD_REMOTE_SHELL to build the remote (telnet) shell
#Edit the CMAKE_INSTALL_PREFIX config to set the install location

For this guide we assume the CMAKE_INSTALL_PREFIX is /usr/local.

Installing Apache Celix

cd ${WS}/celix/build
sudo make install

Running Apache Celix

If Apache Celix is successfully installed running


should give the following output: “Error: invalid or non-existing configuration file: ‘’.No such file or directory”.

For more info how to build your own projects and/or running the Apache Celix examples see Getting Started.