models icon indicating copy to clipboard operation
models copied to clipboard

MacOS - error running bazel build //scripts:bazel-complete.bash

Open lavelli opened this issue 10 years ago • 7 comments

I'm trying to install bazel 0.2.2 on a MacOS 10.9.5 with JDK 8. I downloaded the installer, ran it and set up the environment as written in http://bazel.io/docs/install.html

Then I want to install the bash completion. When I'm in models/syntaxnet

bazel build //scripts:bazel-complete.bash ERROR: no such package 'scripts': BUILD file not found on package path.

If I am in ~/.bazel, the result is:

bazel build //scripts:bazel-complete.bash The 'build' command is only supported from within a workspace.

Surely I'm doing some silly error but I cannot understand what's wrong.

thanks alberto

lavelli avatar May 19 '16 12:05 lavelli

You have to refer to Getting Started with Bazel

TowerZhang avatar May 24 '16 05:05 TowerZhang

Thanks for the suggestion. To be honest, I find "Getting Started with Bazel" quite obscure. It describes what to do for creating a small Java project but it's not clear what to do for my much simpler problem (i.e. getting bash completion after installing bazel). In the installation instructions for "Getting bash completion" it is simply said to run 'bazel build //scripts:bazel-complete.bash' and so I had assumed that it would have worked without any additional complication. I'll read "Getting Started with Bazel" again and I'll try to figure out what to do. Thanks

lavelli avatar May 24 '16 11:05 lavelli

hello I have the same problem in ubuntu16.04。 yl@ubuntu:~/models/syntaxnet$ bazel build //scripts:bazel-complete.bash ........................ ERROR: no such package 'scripts': BUILD file not found on package path. INFO: Elapsed time: 0.952s and bazel test also have some error

yl5006 avatar May 26 '16 00:05 yl5006

what was the solution?

trsonderm avatar Sep 11 '16 16:09 trsonderm

$ touch WORKSPACE is the solution

d0znpp avatar Oct 15 '16 22:10 d0znpp

I followed the install instructions at https://bazel.io/versions/master/docs/install.html#install-on-ubuntu but still got the below errors:

$ touch WORKSPACE $ bazel build //scripts:bazel-complete.bash .......... ERROR: no such package 'scripts': BUILD file not found on package path. INFO: Elapsed time: 0.391s

$ bazel version Build label: 0.3.2 Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Fri Oct 7 17:25:10 2016 (1475861110) Build timestamp: 1475861110 Build timestamp as int: 1475861110

ghost avatar Oct 15 '16 23:10 ghost

Make sure you have cd inside the tensorflow folder containing the WORKSPACE file (the root of the cloned tensorflow).

ronny3050 avatar Apr 25 '17 18:04 ronny3050