Skip to content

Bazel tips and tricks

Sayantan Sarkar edited this page Aug 23, 2019 · 6 revisions

Checking if bazel exists

  1. Check if machine has bazel by running which bazel
  2. Run bazel version. If it complains "somedir not found" try mkdir somedir

Installing bazel on a brand new machine

  1. Get the recommended bazel (see README.md). It will be some command like wget https://github.com/bazelbuild/bazel/releases/download/0.25.2/bazel-0.25.2-installer-linux-x86_64.sh
  2. mkdir ~/.cache/bazel/
  3. Make a directory/localdisk/<username>/bazel_cache/_bazel_<username> Then, use it for caching: ln -sf /localdisk/<username>/bazel_cache/_bazel_<username> ~/.cache/bazel/_bazel_<username>
  4. Install bazel bash bazel-0.25.2-installer-linux-x86_64.sh --user
  5. ls /localdisk/<username>/bazel_cache/_bazel_<username>/ should show 2 items, one names install
Clone this wiki locally