<commit_before># Compiling a Heron Release

Heron is currently available for Mac OS X and CentOS 5.

You can build Heron either [as an entirety](#building-a-full-release) or on a
[component-by-component basis](#building-specific-components).

## Requirements

* [Bazel](http://bazel.io/docs/install.html) >= {{book.bazel_version}}
* [Java
  8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
* [Autoconf](http://www.gnu.org/software/autoconf/autoconf.html) >= 2.6.3
* [Automake](https://www.gnu.org/software/automake/) >= 1.11.1
* [GNU Make](https://www.gnu.org/software/make/) >= 3.81
* [gcc/g++](https://gcc.gnu.org/) >= 4.8.2 (Linux platforms)
* [CMake](https://cmake.org/) >= 2.6-patch 4
* [Python](https://www.python.org/) >= 2.7
* [Perl](https://www.perl.org/) >= 5.8.8

## Configuring Bazel

[Bazel](http://bazel.io) is the build tool used by Heron. There is a Python
script that you can use to set up Bazel:

```bash
$ cd /path/to/heron/repo
$ ./bazel_configure.py
```

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 {{book.bazel_version}} or later.

## Building a Full Release

You can build a full Heron release using the `release:packages` [Bazel
target](http://bazel.io/docs/build-ref.html#targets). This will package all
Heron executables into `.tar` and `.tar.gz` files at once. You must specify the
following when building:

* A release name using the `RELEASE` parameter. For Bazel, this takes the form
  of `--define RELEASE={name}`.
* An OS-specific configuration using the `--config` flag, depending on the
  operating system. This can take one of the following values: `darwin` (Mac OS
  X), `centos5` (CentOS 5).

Here's an example build command:<commit_msg>add bazel installation instructions<commit_after># Compiling a Heron Release

Heron is currently available for Mac OS X 10.10, Ubuntu 12.04, and CentOS 5.

You can build Heron either [as an entirety](#building-a-full-release) or on a
[component-by-component basis](#building-specific-components).

## Requirements

* [Bazel](http://bazel.io/docs/install.html) >= {{book.bazel_version}}
* [Java
  8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
* [Autoconf](http://www.gnu.org/software/autoconf/autoconf.html) >= 2.6.3
* [Automake](https://www.gnu.org/software/automake/) >= 1.11.1
* [GNU Make](https://www.gnu.org/software/make/) >= 3.81
* [gcc/g++](https://gcc.gnu.org/) >= 4.8.2 (Linux platforms)
* [CMake](https://cmake.org/) >= 2.6-patch 4
* [Python](https://www.python.org/) >= 2.7
* [Perl](https://www.perl.org/) >= 5.8.8

## Installing Bazel

[Bazel](http://bazel.io) is the build tool used by Heron. The releases page for
Bazel {{book.bazel_version}} can be found
[here](https://github.com/bazelbuild/bazel/releases), while installation
instructions can be found [here](http://bazel.io/docs/install.html).

## Configuring Bazel

There is a Python script that you can run to configure Bazel on supported
platforms:

```bash
$ cd /path/to/heron/repo
$ ./bazel_configure.py
```

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 {{book.bazel_version}} or later.

## Building a Full Release

You can build a full Heron release using the `release:packages` [Bazel
target](http://bazel.io/docs/build-ref.html#targets). This will package all
Heron executables into `.tar` and `.tar.gz` files at once. You must specify the
following when building:

* A release name using the `RELEASE` parameter. For Bazel, this takes the form
  of `--define RELEASE={name}`.
* An OS-specific configuration using the `--config` flag, depending on the
  operating system. This can take one of the following values: `darwin` (Mac OS
  X), `centos5` (CentOS 5).

Here's an example build command:
{'fraction_non_alphanumeric': 0.14940791131267323, 'fraction_numerical': 0.018644494834971024, 'mean_word_length': 4.244385733157199, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 13, 'lorem ipsum': 0, 'www.': 12, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4308166', 'n_tokens_mistral': 1431, 'n_tokens_neox': 1327, 'n_words': 416}