Building eCAL from source

If you want to build eCAL yourself, this tutorial may help you with that. To build eCAL, you will need a C++14 compliant compiler, such as Visual Studio 2015 or newer, or GCC 5 or newer.

Currently, we support:

  • Windows 7 / 10

  • Ubuntu 16.04 / 18.04 / 20.04

See also

To learn more about the available CMake options, please check out the “CMake options” section!

Repository checkout

First check out the eCAL repository and all of the submodules:

git clone git://github.com/continental/ecal.git
cd ecal
git submodule init
git submodule update

Building eCAL on Windows

Windows Dependencies

  1. Download and install the build-dependencies

  2. Install Qt5 by starting the installer and selecting msvc2015 32-bit or msvc2015 64-bit (VS2015) or msvc2017 32-bit and msvc2017 64-bit (VS2017) from the latest Qt5 version. Create an environment variable QT5_ROOT_DIRECTORY that points to the directory containing the architecture-specific folders. It should look like this:

    %QT5_ROOT_DIRECTORY%
       ├ msvc2015
       ├ msvc2015_64
       ├ msvc2017
       └ msvc2017_64
    

    e.g.: QT5_ROOT_DIRECTORY = C:\Qt\5.11.1

  1. If you plan to build the eCAL python language extension: Install Python for Windows (64 Bit, Version 3.x)

Windows build

  1. Execute the following batch files with the appropriate parameter to create the Visual Studio 2015 (v140) / 2017 (v141) / 2019 (v142) solution and build it:

    build_win\win_make_cmake.bat v140 ( / v141 / v142)
    build_win\win_make_build.bat
    

    This will create a _build\ directory in your eCAL root folder and build eCAL there.

  2. Run the following batch files to create an eCAL setup as .msi installer:

    build_win\win_make_setup.bat
    

    You will find the .msi installer in the _build\_deploy\ directory.

  3. Optional: If you configured CMake to build the python extension by setting BUILD_PY_BINDING to ON you can create the eCAL python egg by calling

    build_win\win_make_python_egg.bat
    

    Afterwards you will find the python eCAL egg in the _build\_deploy\ directory. Install the extension by

    python -m easy_install ecal-X.Y.Z-pyX.Y.egg
    

Building eCAL on Ubuntu

Ubuntu 16.04 dependencies

  1. Add the official cmake repository, as eCAL needs cmake >= 3.13:

    wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
    sudo apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ xenial main'
    sudo apt-get -y update
    sudo apt-get install kitware-archive-keyring
    sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
    
  2. Add a ppa for protobuf >= 3.0. The following (unofficial) ppa will be sufficient:

    sudo add-apt-repository -y ppa:maarten-fonville/protobuf
    sudo apt-get -y update
    
  3. Install the dependencies from the ordinary Ubuntu 16.04 repositories and the ppa we just added:

    sudo apt-get install git cmake doxygen graphviz build-essential zlib1g-dev qt5-default libhdf5-dev libprotobuf-dev libprotoc-dev protobuf-compiler libcurl4-openssl-dev
    

Ubuntu 18.04 dependencies

  1. Add the official CMake repository, as eCAL needs CMake >= 3.13:

    wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
    sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
    sudo apt-get -y update
    sudo apt-get install kitware-archive-keyring
    sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
    
  2. Install the dependencies from the ordinary Ubuntu 18.04 repositories:

    sudo apt-get install git cmake doxygen graphviz build-essential zlib1g-dev qt5-default libhdf5-dev libprotobuf-dev libprotoc-dev protobuf-compiler libcurl4-openssl-dev
    
  3. If you plan to create the eCAL python language extension (here as an example for the python 3.6 version):

    sudo apt-get install python3.6-dev python3-pip
    python3 -m pip install setuptools
    

Ubuntu 20.04 dependencies

  1. Install the dependencies from the ordinary Ubuntu 20.04 repositories:

    sudo apt-get install git cmake doxygen graphviz build-essential zlib1g-dev qt5-default libhdf5-dev libprotobuf-dev libprotoc-dev protobuf-compiler libcurl4-openssl-dev
    

Ubuntu 16/18/20 build

  1. Compile eCAL with the following options:

    mkdir _build
    cd _build
    cmake .. -DCMAKE_BUILD_TYPE=Release -DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF -DECAL_THIRDPARTY_BUILD_CURL=OFF -DECAL_THIRDPARTY_BUILD_HDF5=OFF
    make -j4
    
  2. Create a debian package and install it:

    cpack -G DEB
    sudo dpkg -i _deploy/eCAL-*
    
  3. Optional: Create and install the eCAL python egg (Only available if you enabled the BUILD_PY_BINDING CMake option in step 2):

    cmake --build . --target create_python_egg --config Release
    sudo python3 -m easy_install _deploy/ecal-*