-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Open
Labels
awaiting-user-responseAwaiting a response from the authorAwaiting a response from the authorteam-DocumentationDocumentation improvements that cannot be directly linked to other team labelsDocumentation improvements that cannot be directly linked to other team labelsteam-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: documentation (cleanup)untriaged
Description
Page link:
Problem description (include actual vs expected text, if applicable):
The tutorial doesn't run as expected with the current examples repo.
bazel build //main:hello-world
produces the response
ERROR: The 'build' command is only supported from within a workspace (below a directory having a WORKSPACE file).
See documentation at https://docs.bazel.build/versions/master/build-ref.html#workspace
After adding an empty WORKSPACE in cpp-tutorial/stage1 it gives
me:~/Documents/repos/examples/cpp-tutorial/stage1$ bazel build //main:hello-world
Starting local Bazel server and connecting to it...
ERROR: Skipping '//main:hello-world': error loading package 'main': cannot load '@rules_cc//cc:cc_binary.bzl': no such file
WARNING: Target pattern parsing failed.
ERROR: error loading package 'main': cannot load '@rules_cc//cc:cc_binary.bzl': no such file
Editing the BUILD file to be identical to the one in the tutorial fixed it
Where do you see this issue? (include link to specific section of the page, if applicable)
https://bazel.build/start/cpp#stage-1
Any other information you'd like to share?
No response
Metadata
Metadata
Assignees
Labels
awaiting-user-responseAwaiting a response from the authorAwaiting a response from the authorteam-DocumentationDocumentation improvements that cannot be directly linked to other team labelsDocumentation improvements that cannot be directly linked to other team labelsteam-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: documentation (cleanup)untriaged