diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/install.md | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/docs/install.md b/docs/install.md index 0574408639..be4bb9c4fc 100644 --- a/docs/install.md +++ b/docs/install.md @@ -27,21 +27,40 @@ Java: To build Bazel on Ubuntu: 1. Install JDK 8: - * On Ubuntu Trusty (14.04LTS), no OpenJDK 8 is available and the + * Ubuntu Trusty (14.04LTS): OpenJDK 8 is not available so the fastest way is to install the Oracle JDK 8: $ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer - * On Ubuntu Utopic (14.10): + * Ubuntu Utopic (14.10): you can install OpenJDK 8 like this: $ sudo apt-get install openjdk-8-jdk -2. Install required packages: +2. Set the `JAVA_HOME` environment variable. + + Check if it's already set: + + $ echo $JAVA_HOME + + If this prints the path to the JDK 8 root, you can proceed to the next step. + + Otherwise you'll need to set this to the root of the JDK. Use `which javac` + to find the path to the JDK's `bin` directory. Use `javac -version` to verify + that you're dealing with the right JDK version. + + For example the path could be `/usr/lib/jvm/jdk1.8.0/bin/javac`. Set the + `JAVA_HOME` variable to `/usr/lib/jvm/jdk1.8.0` then, using: + + $ export JAVA_HOME=/usr/lib/jvm/jdk1.8.0 + + You can also add this line to your `~/.bashrc` file. + +3. Install required packages: $ sudo apt-get install libarchive-dev pkg-config zip g++ zlib1g-dev -3. Build Bazel: +4. Build Bazel: $ cd bazel $ ./compile.sh @@ -55,7 +74,7 @@ Using Bazel on Mac OS X requires: [Apple's developer site](https://developer.apple.com/xcode/downloads/). * MacPorts or Homebrew for installing required packages. * An installation of JDK 8. -* (optional) For objc\_\* and ios\_\* rule support: An installed copy of +* (optional) For `objc_*` and `ios_*` rule support: An installed copy of Xcode 6.1 or later with iOS SDK 8.1. To build Bazel on Mac OS X: |