Babeltrace 2 C API  2.0.0
Open-source trace manipulation framework
Build Babeltrace 2 for development

If you are developing a Babeltrace 2 plugin or an application which uses libbabeltrace2, we recommend that:

  • You build Babeltrace 2 from source in developer mode.

    The Babeltrace 2 developer mode enables more precondition and postcondition assertions to detect programming errors.

  • You use TRACE as the minimal logging level at build time to have access to more logging, should you need it to debug your plugin or application.

To build Babeltrace 2 from source in developer mode and using TRACE as the minimal logging level:

  1. Download the Babeltrace 2 tarball and extract it.

    See the project's README for build-time requirements and detailed build instructions.

  2. Configure the build in developer mode and with the TRACE minimal logging level:

    $ BABELTRACE_DEV_MODE=1 BABELTRACE_MINIMAL_LOG_LEVEL=TRACE ./configure
  3. Build and install the project:

    $ make
    # make install

Babeltrace 2 developer mode build configuration command line examples:

$ BABELTRACE_DEV_MODE=1 BABELTRACE_MINIMAL_LOG_LEVEL=TRACE ./configure \
--enable-python-bindings --enable-python-plugins
$ BABELTRACE_DEV_MODE=1 BABELTRACE_MINIMAL_LOG_LEVEL=TRACE ./configure \
--prefix="$PWD/install" --disable-man-pages --disable-debug-info
Note

The development build creates a libbabeltrace2 library which is slower to execute than a production (default) build.

We believe that, during the development process, a less efficient, but more strict library is more desirable than the opposite.