ATTENTION! Please read and follow:
- if this is a _question_ about how to build / test / query / deploy using Bazel, ask it on StackOverflow instead: https://stackoverflow.com/questions/tagged/bazel
- if this is a _discussion starter_, send it to [email protected]
- if this is a _bug_ or _feature request_, fill the form below as best as you can.
When checking for version requirements, Bazel doesn't qualify 0.10.0 as >= 0.4.5
WARNING: ignoring http_proxy in environment.
ERROR: /home/pranay/tensorflow/WORKSPACE:15:1: Traceback (most recent call last):
File "/home/pranay/tensorflow/WORKSPACE", line 15
closure_repositories()
File "/home/pranay/.cache/bazel/_bazel_pranay/3d0247d75aecbc8cc70ab370b28b868d/external/io_bazel_rules_closure/closure/repositories.bzl", line 69, in closure_repositories
_check_bazel_version("Closure Rules", "0.4.5")
File "/home/pranay/.cache/bazel/_bazel_pranay/3d0247d75aecbc8cc70ab370b28b868d/external/io_bazel_rules_closure/closure/repositories.bzl", line 172, in _check_bazel_version
fail(("%s requires Bazel >=%s but was...)))
Closure Rules requires Bazel >=0.4.5 but was 0.10.0
ERROR: Error evaluating WORKSPACE file
ERROR: /home/pranay/tensorflow/WORKSPACE:41:1: Traceback (most recent call last):
File "/home/pranay/tensorflow/WORKSPACE", line 41
tf_workspace()
File "/home/pranay/tensorflow/tensorflow/workspace.bzl", line 48, in tf_workspace
check_version("0.5.4")
File "/home/pranay/tensorflow/tensorflow/workspace.bzl", line 38, in check_version
fail("\nCurrent Bazel version is {}, ...))
Current Bazel version is 0.10.0, expected at least 0.5.4
ERROR: Error evaluating WORKSPACE file
ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': error loading package 'external': Package 'external' contains errors
WARNING: Target pattern parsing failed.
ERROR: error loading package 'external': Package 'external' contains errors
INFO: Elapsed time: 0.056s
FAILED: Build did NOT complete successfully (0 packages loaded)
_check_bazel_version("Closure Rules", "0.4.5")
on Bazel version 0.10.0
ubuntu 16.04
bazel info release?WARNING: ignoring http_proxy in environment.
release 0.10.0
I see exactly the same breakage with rules_closure. The workaround is to upgrade rules_closure
to HEAD, as they removed this check altogether.
@iirina I remember we saw this during the release candidates for 0.10.0, but I'm not sure what the fix was...?
@philwo Have you missed my comment above? I already said what the solution is. The problem was fixed in this commit in rules_closure. TF would need to upgrade to newer version of rules_closure, like I did in gerrit code review recently in this CL.
@davido Yes, but the problem here is not just rules_closure, the TensorFlow that @pranaypratyush is trying to build also seems to use the broken version check:
ERROR: /home/pranay/tensorflow/WORKSPACE:41:1: Traceback (most recent call last):
File "/home/pranay/tensorflow/WORKSPACE", line 41
tf_workspace()
File "/home/pranay/tensorflow/tensorflow/workspace.bzl", line 48, in tf_workspace
check_version("0.5.4")
File "/home/pranay/tensorflow/tensorflow/workspace.bzl", line 38, in check_version
fail("\nCurrent Bazel version is {}, ...))
Current Bazel version is 0.10.0, expected at least 0.5.4
I'm not sure what our recommended fix for that is - is there a TensorFlow release that has the fix for the version check? Maybe it's in the 1.6.0-rc1 release, because the latest stable 1.5.0 still has the broken one. Or would @pranaypratyush have to downgrade Bazel in order to build TensorFlow?
Ah, right, it was addressed in this issue: https://github.com/bazelbuild/bazel/issues/4425. This TF commit has the fix: https://github.com/sb2nov/tensorflow/commit/6fcfab770c2672e2250e0f5686b9545d99eb7b2b. The OP should upgrade and that should fix his problem.
@davido yeah I am not on head but the last stable tag.
@pranaypratyush If you cannot upgrade to TF head, you would need to downgrade Bazel, as pointed out by @philwo in previous comment.
Closing as we can't do anything about it - TensorFlow has to update their version check.
A dirty fix to this is to change the version check in the bazel cache file.