diff options
author | 2016-12-02 15:08:25 +0000 | |
---|---|---|
committer | 2016-12-02 19:08:46 +0000 | |
commit | 967a0a338e05fca60b437c36a52b31eaf706bea8 (patch) | |
tree | a1ba96c84a9df77060c3e4b8683d111ceb1d5a26 /scripts/bootstrap | |
parent | 40d8f92267c3fc1bd1ab402d22d2f892b3d5b884 (diff) |
Improve compile.sh error message further
In the error message about not being able to ./compile.sh from
a plain checkout, add full instructions on how to build bazel.
This will hopefully reduce the need for questions about this
error message.
--
Change-Id: I79c280c4c8522cf6f38ec731947365178aef9d58
Reviewed-on: https://cr.bazel.build/7594
PiperOrigin-RevId: 140846434
MOS_MIGRATED_REVID=140846434
Diffstat (limited to 'scripts/bootstrap')
-rwxr-xr-x | scripts/bootstrap/compile.sh | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh index 0ecdcff768..1cc59750a9 100755 --- a/scripts/bootstrap/compile.sh +++ b/scripts/bootstrap/compile.sh @@ -163,6 +163,29 @@ function create_deploy_jar() { run "$JAR" cmf $output/MANIFEST.MF $output/$name.jar $packages "$@" } +HOW_TO_BOOTSTRAP=' + +-------------------------------------------------------------------------------- +NOTE: This failure is likely occuring if you are trying to bootstrap bazel from +a developer checkout. Those checkouts do not include the generated output of +the protoc compiler (as we prefer not to version generated files). + +* To build a developer version of bazel, do + + bazel build //src:bazel + +* To bootstrap your first bazel binary, please download a dist archive from our + release page at https://github.com/bazelbuild/bazel/releases and run + compile.sh on the unpacked archive. + +The full install instructions to install a release version of bazel can be found +at https://bazel.build/versions/master/docs/install.html#compiling-from-source +For a rationale, why the bootstrap process is organized in this way, see +https://bazel.build/designs/2016/10/11/distribution-artifact.html +-------------------------------------------------------------------------------- + +' + if [ -z "${BAZEL_SKIP_JAVA_COMPILATION}" ]; then if [ -d derived/src/java ] @@ -173,12 +196,10 @@ if [ -z "${BAZEL_SKIP_JAVA_COMPILATION}" ]; then else [ -n "${PROTOC}" ] \ - || fail "Must specify PROTOC if not bootstrapping from the distribution artifact;\ - NOTE: development versions are built with 'bazel build //src:bazel'" + || fail "Must specify PROTOC if not bootstrapping from the distribution artifact${HOW_TO_BOOTSTRAP}" [ -n "${GRPC_JAVA_PLUGIN}" ] \ - || fail "Must specify GRPC_JAVA_PLUGIN if not bootstrapping from the distribution artifact;\ - NOTE: development versions are built with 'bazel build //src:bazel'" + || fail "Must specify GRPC_JAVA_PLUGIN if not bootstrapping from the distribution artifact${HOW_TO_BOOTSTRAP}" [[ -x "${PROTOC-}" ]] \ || fail "Protobuf compiler not found in ${PROTOC-}" |