Hi everyone,
First I thank you deeply for giving us free access to cutting edge technology like the one in this github repository. That issue is minor, and just a small change in the readme. In that readme telling how to install SyntaxNet, in the part describing bazel, the user is told to follow the bazel installation page directions, however, this page tells how to install bazel 0.4.0 which is incompatible with SyntaxNet.
You've been really wise to precise the compatibility a.k.a 0.3.0 - 0.3.1, so the user can figure that out, however I think that the first reflex of a developper would be to follow the instructions in the bazel installation page. So i think it would save people's time if you could write in the readme something like "don't use brew or apt as it would install the 0.4.0 version which is incompatible with syntaxnet, install the 0.3.1 version instead"
@calberti It would be best to have bazel error out with the wrong version, though I'm not sure how to do that.
you're deeply right, but neither do I (btw thanks for having replied so fast)
if it can help, the error I get when I build with 0.4.0-homebrew version is
ERROR: /private/var/tmp/_bazel_Arnaud/3f0076c4bfcf5a19ab7822fe651f7deb/external/org_tensorflow/tensorflow/python/BUILD:1748:1: in cc_library rule @org_tensorflow//tensorflow/python:tf_session_helper: non-test target '@org_tensorflow//tensorflow/python:tf_session_helper' depends on testonly target '@org_tensorflow//tensorflow/python:construction_fails_op' and doesn't have testonly attribute set.
ERROR: Analysis of target '//syntaxnet:graph_builder' failed; build aborted.
INFO: Elapsed time: 8,440s
ERROR: Couldn't start the build. Unable to run tests.
I might have found one way, you could create that python test script
import os
import unittest
class TestBazelVersion(unittest.TestCase):
def test_bazel_version(self):
version_0_3_1 =\
os.popen('bazel version |grep \'Build label: 0.3.1\'').read() != ''
version_0_3_0 =\
os.popen('bazel version |grep \'Build label: 0.3.0\'').read() != ''
if not (version_0_3_0 or version_0_3_1):
self.fail('Your version of bazel is not 0.3.0 - 0.3.1, ' +
'please install a correct version ' +
'(follow instructions here ' +
'https://bazel.build/versions/master/docs/install.html)')
if __name__ == '__main__':
unittest.main()
And execute the tests with the --test_output=errors parameter to bazel test, it seems to work fine with 0.3.0 and 0.4.0 in a really basic BUILD file on an osx environment. Maybe it could be adaptable to the project
I ran into this exact same problem. I did see the note about using version 0.3.0 or 0.3.1 but I assumed "latest" would just work.
@calberti @andorardo Does syntaxnet actually require Bazel 0.3.0 – 0.3.1 specifically? Or has the README file just drifted out of date?
I've sent out PR #905 to remove the old install documentation so users don't get the wrong impression. If syntaxnet doesn't work with the latest Bazel release, it's probably something that needs to be fixed.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:17:3: //external:eigen_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:17:3: //external:eigen_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:28:3: //external:libxsmm_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:28:3: //external:libxsmm_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:44:3: //external:com_googlesource_code_re2: no such attribute 'urls' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:44:3: //external:com_googlesource_code_re2: missing value for mandatory attribute 'url' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:54:3: //external:gemmlowp: no such attribute 'urls' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:54:3: //external:gemmlowp: missing value for mandatory attribute 'url' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:64:3: //external:farmhash_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:64:3: //external:farmhash_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:80:3: //external:highwayhash: no such attribute 'urls' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:80:3: //external:highwayhash: missing value for mandatory attribute 'url' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:90:3: //external:nasm: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:90:3: //external:nasm: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:101:3: //external:jpeg: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:101:3: //external:jpeg: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:112:3: //external:png_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:112:3: //external:png_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:123:3: //external:gif_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:123:3: //external:gif_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:135:3: //external:six_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:135:3: //external:six_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:151:3: //external:protobuf: no such attribute 'urls' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:151:3: //external:protobuf: missing value for mandatory attribute 'url' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:161:3: //external:gmock_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:161:3: //external:gmock_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:187:3: //external:pcre: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:187:3: //external:pcre: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:198:3: //external:swig: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:198:3: //external:swig: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:210:3: //external:curl: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:210:3: //external:curl: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:233:3: //external:grpc: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:233:3: //external:grpc: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:256:3: //external:linenoise: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:256:3: //external:linenoise: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:269:3: //external:llvm: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:269:3: //external:llvm: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:280:3: //external:jsoncpp_git: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:280:3: //external:jsoncpp_git: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:296:3: //external:boringssl: no such attribute 'urls' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:296:3: //external:boringssl: missing value for mandatory attribute 'url' in 'http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:306:3: //external:nanopb_git: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:306:3: //external:nanopb_git: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:322:3: //external:zlib_archive: no such attribute 'urls' in 'new_http_archive' rule.
ERROR: /Users/user/git/models/syntaxnet/tensorflow/tensorflow/workspace.bzl:322:3: //external:zlib_archive: missing value for mandatory attribute 'url' in 'new_http_archive' rule.
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': error loading package 'external': Could not load //external package.
ERROR: missing fetch expression. Type 'bazel help fetch' for syntax and help.
Most helpful comment
I ran into this exact same problem. I did see the note about using version
0.3.0or0.3.1but I assumed "latest" would just work.