Closed andportnoy closed 3 months ago
On Bazel.6.2.1, I met the same issue, but it works on Bazel.7.2.1.
On Bazel.6.2.1, I met the same issue, but it works on Bazel.7.2.1.
Didn't work for me:
$ ./bazel-7.2.1-linux-x86_64 build src/tools/execlog:parser
WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a WORKSPACE file).
Extracting Bazel installation...
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
ERROR: The 'build' command is only supported from within a workspace (below a directory having a WORKSPACE file).
See documentation at https://bazel.build/concepts/build-ref#workspace
@andportnoy It looks like you are running under the wrong directory.
It should work under the bazel's source:
pcloudy@pcloudy-macbookpro3:~/workspace/bazel (master), (bazel 7.2.1)
$ bazel build src/tools/execlog:parser
Starting local Bazel server and connecting to it...
INFO: Invocation ID: 89160548-2d7b-436b-98c1-05c34a2b675b
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=80
INFO: Reading rc options for 'build' from /Users/pcloudy/workspace/bazel/.bazelrc:
Inherited 'common' options: --enable_platform_specific_config --check_direct_dependencies=error --experimental_downloader_config=bazel_downloader.cfg --incompatible_disallow_empty_glob
INFO: Reading rc options for 'build' from /Users/pcloudy/workspace/bazel/.bazelrc:
'build' options: --java_runtime_version=21 --java_language_version=21 --tool_java_language_version=21 --tool_java_runtime_version=21
INFO: Reading rc options for 'build' from /Users/pcloudy/.bazelrc:
'build' options: --verbose_failures --announce_rc --disk_cache=/tmp/bazel_disk_cache --repository_cache=/tmp/bazel_repository_cache
INFO: Found applicable config definition build:macos in file /Users/pcloudy/workspace/bazel/.bazelrc: --macos_minimum_os=10.13 --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
INFO: Analyzed target //src/tools/execlog:parser (122 packages loaded, 2548 targets configured).
INFO: Found 1 target...
Target //src/tools/execlog:parser up-to-date:
bazel-bin/src/tools/execlog/parser
bazel-bin/src/tools/execlog/parser.jar
INFO: Elapsed time: 8.554s, Critical Path: 1.15s
INFO: 7 processes: 5 internal, 2 worker.
INFO: Build completed successfully, 7 total actions
Page link:
https://bazel.build/remote/cache-remote#compare-logs
Problem description (include actual vs expected text, if applicable):
Instructions on the linked page suggest running
bazel build src/tools/execlog:parser
, but that fails with an error:Seems to be related to the removal of the WORKSPACE file: https://github.com/bazelbuild/bazel/pull/22657.
Where do you see this issue? (include link to specific section of the page, if applicable)
No response
Any other information you'd like to share?