This is a step-by-step guide to building Heron on Mac OS X (versions 10.10 and 10.11).
If Homebrew isn't yet installed on your system, you can install it using this one-liner:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Bazelisk helps automate the management of Bazel versions
brew install bazelisk
brew install automake brew install cmake brew install libtool brew install ant brew install pkg-config
$ export CC=/usr/bin/clang $ export CXX=/usr/bin/clang++ $ echo $CC $CXX
$ git clone https://github.com/apache/incubator-heron.git && cd incubator-heron
$ ./bazel_configure.py
If this configure script fails with missing dependencies, Homebrew can be used to install those dependencies.
$ bazel build heron/...
This will build in the Bazel default fastbuild
mode. Production release packages include additional performance optimizations not enabled by default. To enable production optimizations, include the opt
flag. This defaults to optimization level -O2
. The second option overrides the setting to bump it to -CO3
.
$ bazel build -c opt heron/...
$ bazel build -c opt --copt=-O3 heron/...
If you wish to add the code syntax style check, add --config=stylecheck
.
$ bazel build scripts/packages:binpkgs $ bazel build scripts/packages:tarpkgs
This will install Heron packages in the bazel-bin/scripts/packages/
directory.