Heron is currently available for Mac OS X 10.10, Ubuntu 14.04, and CentOS 7. This guide describes the basics of the Heron build system. For step-by-step build instructions for a specific platform, the following guides are available:
Instructions on running unit tests for Heron can also be found in Testing Heron.
You must have the following installed to compile Heron:
- Bazel = 0.3.1. Later versions might work but have not been tested. See Installing Bazel below.
- Java 8 is required by Bazel but Heron does not use Java 8 features; Heron topologies can be written in Java 7 or above and all Heron jars are compatible with Java 7.
- Autoconf >= 2.6.3
- Automake >= 1.11.1
- GNU Make >= 3.81
- GNU Libtool >= 2.4.6
- gcc/g++ >= 4.8.1 (Linux platforms)
- CMake >= 2.6.4
- Python >= 2.7 (not including Python 3.x)
- Perl >= 5.8.8
CXX environment variables with a path specific to your
$ export CC=/your-path-to/bin/c_compiler $ export CXX=/your-path-to/bin/c++_compiler $ echo $CC $CXX
To ensure that Bazel has been installed, run
bazel version and check the
version (listed next to
Build label in the script’s output) to ensure that you
have Bazel 0.3.1.
There is a Python script that you can run to configure Bazel on supported platforms:
$ cd /path/to/heron $ ./bazel_configure.py
Bazel OS Environments
Bazel builds are specific to a given OS. When building you must specify an
OS-specific configuration using the
--config flag. The following OS values
darwin(Mac OS X)
For example, on Mac OS X (
darwin), the following command will build all
$ bazel build --config=darwin heron/...
Production release packages include additional performance optimizations
not enabled by default. Enabling these optimizations increases build time.
To enable production optimizations, include the
$ bazel build -c opt --config=PLATFORM heron/...
Building All Components
The Bazel build process can produce either executable install scripts or
bundled tars. To build executables or tars for all Heron components at once,
use the following
bazel build commands, respectively:
$ bazel build --config=PLATFORM scripts/packages:binpkgs $ bazel build --config=PLATFORM scripts/packages:tarpkgs
Resulting artifacts can be found in subdirectories below the
heron-tracker executable, for example, can be found at
Building Specific Components
As an alternative to building a full release, you can build Heron executables
for a single Heron component (such as the Heron
Tracker) by passing a target to the
build command. For example, the following command would build the Heron Tracker:
$ bazel build --config=darwin heron/tools/tracker/src/python:heron-tracker
Instructions for running Heron unit tests can be found at Testing Heron.