22

I am trying to find out which version of Bazel I currently have on my computer to install TensorFlow from source (it requires version 0.1.4)

evan@evan-box:~/Apps/tensorflow$ bazel --version
Unknown Bazel startup option: '--version'.
  For more info, run 'blaze help startup_options'.
evan@evan-box:~/Apps/tensorflow$ bazel version
Build label: head (@125b349)
Build target: bazel-out/local_linux-fastbuild/bin/src/main/java/bazel-main_deploy.jar
Build time: Fri Nov 13 01:23:30 2015 (1447377810)
Build timestamp: 1447377810
Build timestamp as int: 1447377810

So where is the version actually?

Guy Coder
  • 24,501
  • 8
  • 71
  • 136
Evan Pu
  • 2,099
  • 5
  • 21
  • 36

2 Answers2

26

See Bazel users manual

From the command line:

$ bazel version 
Build label: 0.1.1
Guy Coder
  • 24,501
  • 8
  • 71
  • 136
  • The result `head (@125b349)` looks like a `Git` commit. You should be able to get the version from the commit [pages](https://github.com/bazelbuild/bazel/commits/master?page=1) using the head. I looked for it on a few pages but could not find it. – Guy Coder Feb 09 '16 at 15:01
  • head version means that you built it yourself from head at commit @125b349. – Damien Martin-Guillerez Feb 09 '16 at 16:04
  • I get the same versionless output, only without the git hash and the build timestamp in the output is zero. This is after following [the official apt-get laden Ubuntu installation instructions from here](https://www.bazel.io/versions/master/docs/install.html#install-on-ubuntu) on Ubuntu 14.04. Maybe the APT provided is outdated for 14.04 or something like that. – matanster Aug 31 '16 at 07:01
4

Since bazel version 0.27.0 there is bazel --version available, without the side-effect of starting the server daemon.

Samuel
  • 346
  • 1
  • 9