Bazel: `bazel version` does not provide the version

Created on 14 Sep 2016  Â·  10Comments  Â·  Source: bazelbuild/bazel

Tested on a freshly installed Bazel 0.3.1 using the recommended Bazel custom API repository.

When executing:
bazel version

It outputs:
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar

Build time: Thu Jan 01 00:00:00 1970 (0)

Build timestamp: Thu Jan 01 00:00:00 1970 (0)

Build timestamp as int: 0

It does not show the version number, or the label value as noted in the documentation.
Any ideas?

P1 bug

Most helpful comment

Getting the same issue when using the
$ echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list $ curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install bazel
to install bazel.

All 10 comments

Getting the same issue when using the
$ echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list $ curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install bazel
to install bazel.

Is installing bazel with the installer rather than apt-get solves this issue?

I bet we build the deb without --stamp.

On Fri, Sep 16, 2016, 10:45 PM Israel Gilyadov [email protected]
wrote:

Is installing bazel with the installer rather than apt-get solves this
issue?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bazelbuild/bazel/issues/1770#issuecomment-247751191,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADjHfwzIgmTRyL7mfLhmxpdRSEhiPmcyks5qq359gaJpZM4J8jw-
.

The 0.3.1 deb from the github release page contains the stamping information

With archive from github:

[dmarting@trantor] ~$ ar p bazel_0.3.1-linux-x86_64.deb data.tar.gz | tar xz ./usr/bin/bazel-real
[dmarting@trantor] ~$ ./usr/bin/bazel-real version
INFO: Reading 'startup' options from .bazelrc: --watchfs
Build label: 0.3.1
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jul 29 09:09:52 2016 (1469783392)
Build timestamp: 1469783392
Build timestamp as int: 1469783392

With archive from the repository:

[dmarting@trantor] ~$ wget https://storage.googleapis.com/bazel-apt/pool/jdk1.8/b/bazel/bazel_0.3.1_amd64.deb
--2016-09-17 19:12:51--  https://storage.googleapis.com/bazel-apt/pool/jdk1.8/b/bazel/bazel_0.3.1_amd64.deb
Resolving storage.googleapis.com (storage.googleapis.com)... 2a00:1450:4001:817::2010, 172.217.16.208
Connecting to storage.googleapis.com (storage.googleapis.com)|2a00:1450:4001:817::2010|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 84155036 (80M) [application/x-debian-package]
Saving to: ‘bazel_0.3.1_amd64.deb’

100%[=====================================================================================================================>] 84,155,036  91.5MB/s   in 0.9s   

2016-09-17 19:12:52 (91.5 MB/s) - ‘bazel_0.3.1_amd64.deb’ saved [84155036/84155036]

[dmarting@trantor] ~$ ar p bazel_0.3.1_amd64.deb data.tar.gz | tar xz ./usr/bin/bazel-real
[dmarting@trantor] ~$ ./usr/bin/bazel-real version
INFO: Reading 'startup' options from .bazelrc: --watchfs
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Jan 01 00:00:00 1970 (0)
Build timestamp: Thu Jan 01 00:00:00 1970 (0)
Build timestamp as int: 0

Assigning to @meteorcloudy because it is on the APT repository, this is a release blocker.

ping @meteorcloudy: can you have a look at this, we need to fix all release blocker now.

Yes, I am on it!

As you can see here, we did build the deb package with --stamp.
But after the release of 0.3.1, I made a change to support google-jdk. So I had to build and update the deb package manually. That's when I forgot to add --stamp. Sorry for that~ :(
There is nothing in the code to be fixed, everything will be all right after the next release.

Can you also build with -c opt while you are at it?

This was done. Closing because it will be fixed by the release

Was this page helpful?
0 / 5 - 0 ratings