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 10 / 11

  • Ubuntu 22.04 / 20.04 / 18.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 https://github.com/eclipse-ecal/ecal.git
cd ecal
git submodule init
git submodule update

Building eCAL on Windows#

Windows Dependencies#

  1. Download and install the build-dependencies

    Note

    If you have multiple Versions of Qt installed, eCAL will try to pick the latest match for your Visual Studio Version.

    If this fails (e.g. as you have copied the qt directory without properly installing it) or if you want to use a specific Qt5 Version, you may have to manually set the CMAKE_PREFIX_PATH or Qt5_DIR.

  2. Optional: Install additional dependendencies

    • Python for Windows (64 Bit, Version 3.9): To build the python extensions and the documentation

    • Doxygen: To build the documentation

    • Innosetup: To create an executable Installer

Windows build#

  • To just compile eCAL:

    mkdir _build\complete
    cd _build\complete
    
    cmake ../.. -A x64 -DCMAKE_INSTALL_PREFIX=_install -DBUILD_SHARED_LIBS=OFF
    cmake --build . --parallel --config Release
    

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

  • To build a complete setup:

    1. For creating a setup, you have to also build the documentation and build the debug SDK binaries.

      To build the eCAL QT based applications, you will need to install additionally:

      • Qt5 as msvc2015_64 (Or manually override it by setting Qt5_DIR)

      Execute the following batch files to create the Visual Studio 2019 solution and build it.

      build_win\win_make_cmake.bat
      build_win\win_make_build.bat
      

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

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

      build_win\win_make_setup.bat
      

      You will find the .exe installer in the _build\complete\_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 wheel by calling

      build_win\win_make_python_wheel.bat
      

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

      pip install ecal-...-win_amd64.whl
      

Building eCAL on Ubuntu#

We support building on currently supported Ubuntu LTS releases.

See also

The build described here is a very simple (yet complete and fully functional) build that differs from our “official” binaries, e.g. in regards of the library install directory and the ecal.ini location-. If your goal is to replicate the official build, you should apply the CMake Options exactly as we do. You can grab those from our GitHub Action build scripts:

Build dependencies#

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

    sudo apt-get install git cmake doxygen graphviz build-essential zlib1g-dev qtbase5-dev libhdf5-dev libprotobuf-dev libprotoc-dev protobuf-compiler libcurl4-openssl-dev libqwt-qt5-dev libyaml-cpp-dev
    
  2. If you plan to create the eCAL python language extension:

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

Ubuntu 22/20/18 build#

  1. Compile eCAL with the following options (additional set BUILD_PY_BINDING to ON if plan to build the python extension):

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

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

    cmake --build . --target create_python_wheel --config Release
    sudo pip3 install _deploy/ecal5-*