aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/install-compile-source.md
diff options
context:
space:
mode:
authorGravatar dzc <dzc@google.com>2017-05-31 20:37:50 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-06-01 14:07:52 +0200
commit22b85a2a3c79c6f3aef1e0a61e485bb135be4551 (patch)
tree8235e8237b171ced2fa9f39f054f9a7d808c0771 /site/docs/install-compile-source.md
parent40d64293b57f0d62bb15599c730f38484b91d3f0 (diff)
Restructure site/ directory into docs/ which only contains Bazel documentation.
The new docs/ directory in the bazel source tree will only contain the Bazel docs site, which is hosted at docs.bazel.build. This change deletes the marketing site and blog, which have been migrated to the bazel-website and bazel-blog GitHub repositories respectively. This change also updates the serve-docs.sh and ci/build.sh under scripts/ in preparation for publishing the docs site. Note that to help make reviews more manageable, this change is limited to moving files to their new locations. Here are the follow-up changes: * Update all links in docs to remove versions/master in paths and to add correct bazel.build subdomain when linking to pages on the marketing site or the blog. * Set up versioned directories on GCS bucket and add tooling for versioning docs This change is also coordinated with https://bazel-review.googlesource.com/c/11568/ to have the PublishSite job publish to docs.bazel.build rather than www.bazel.build. Issue #2397 RELNOTES: None PiperOrigin-RevId: 157612651
Diffstat (limited to 'site/docs/install-compile-source.md')
-rw-r--r--site/docs/install-compile-source.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/site/docs/install-compile-source.md b/site/docs/install-compile-source.md
new file mode 100644
index 0000000000..453d5658df
--- /dev/null
+++ b/site/docs/install-compile-source.md
@@ -0,0 +1,58 @@
+---
+layout: documentation
+title: Compile Bazel from Source
+---
+
+# <a name="compiling-from-source"></a>Compile Bazel from source
+
+1. Ensure that you have OpenJDK 8 installed on your system.
+ For a system based on debian packages (e.g. Debian, Ubuntu), install
+ OpenJDK 8 by running the command `sudo apt-get install openjdk-8-jdk`.
+
+2. The standard way of compiling a release version of Bazel from source is to
+ use a distribution archive. Download `bazel-<VERSION>-dist.zip` from the
+ [release page](https://github.com/bazelbuild/bazel/releases) for the desired
+ version. We recommend to also verify the signature made by our
+ [release key](https://bazel.build/bazel-release.pub.gpg) 48457EE0.
+ The distribution archive also contains generated files in addition to the
+ versioned sources, so this step _cannot_ be short cut by using a checkout
+ of the source tree.
+
+3. Unzip the archive and call `bash ./compile.sh`; this will create a bazel
+ binary in `output/bazel`. This binary is self-contained, so it can be copied
+ to a directory on the PATH (such as `/usr/local/bin`) or used in-place.
+
+## <a name="compiling-from-source-issues"></a>Known issues when compiling from source
+
+### On Windows:
+
+* version 0.4.4 and below: `compile.sh` may fail right after start with an error
+ like this:
+
+ ```
+ File not found - *.jar
+ no error prone jar
+ ```
+
+ Workaround is to run this (and add it to your `~/.bashrc`):
+
+ ```
+ export PATH="/bin:/usr/bin:$PATH"
+ ```
+
+* version 0.4.3 and below: `compile.sh` may fail fairly early with many Java
+ compilation errors. The errors look similar to:
+
+ ```
+ C:\...\bazel_VR1HFY7x\src\com\google\devtools\build\lib\remote\ExecuteServiceGrpc.java:11: error: package io.grpc.stub does not exist
+ import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+ ^
+ ```
+
+ This is caused by a bug in one of the bootstrap scripts
+ (`scripts/bootstrap/compile.sh`). Manually apply this one-line fix if you
+ want to build Bazel purely from source (without using an existing Bazel
+ binary): [5402993a5e9065984a42eca2132ec56ca3aa456f]( https://github.com/bazelbuild/bazel/commit/5402993a5e9065984a42eca2132ec56ca3aa456f).
+
+* version 0.3.2 and below:
+ [github issue #1919](https://github.com/bazelbuild/bazel/issues/1919)