Skip to content

Instantly share code, notes, and snippets.

@iamcaleberic
Last active May 12, 2017 09:46
Show Gist options
  • Save iamcaleberic/9f5af489f14cc43f616cc5f11e1bfb94 to your computer and use it in GitHub Desktop.
Save iamcaleberic/9f5af489f14cc43f616cc5f11e1bfb94 to your computer and use it in GitHub Desktop.
Building bazel on Arch
  • Ensure that you have OpenJDK 8 installed on your system.

    • You can check this by running

            which javac 
      
  • if output is which: no javac Install OpenJDK 8 by running the command

    sudo pacman -S jdk8-openjdk
    

Please not this is jdk not jre else you'll into the error $JAVA_HOME not set

  • Download bazel--dist.zip from the release page for the desired version.

  • Ensure you have zip installed on your system else the build will fail

    • You can check this by running

        zip
      
  • if output is bash: command not found Install zip by running the command

     sudo pacman -S zip
    
  • Unzip the archive and call ./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/bin)

  • Test drive

      which bazel 
    

output should be /usr/bin/bazel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment