[bazel.build] Problem with Bazel Tutorial: Configure C++ Toolchains #18739
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
stale
Issues or PRs that are stale (no activity for 30 days)
team-Documentation
Documentation improvements that cannot be directly linked to other team labels
team-Rules-CPP
Issues for C++ rules
type: support / not a bug (process)
Page link:
https://bazel.build/tutorials/ccp-toolchain-config?hl=en
example link: https://github.com/bazelbuild/examples/tree/main/cpp-tutorial/stage3
Problem description (include actual vs expected text, if applicable):
I followed the instructions of the documentation on my macOS Monterey(12.3) with Apple M1 Pro chipset and failed to build:
$ bazel build --config=clang_config --verbose_failures //main:hello-world
INFO: Analyzed target //main:hello-world (1 packages loaded, 10 targets configured).
INFO: Found 1 target...
ERROR: /Users/carlzhu/github/fun_algs/bazel/cpp-tutorial/stage5/main/BUILD:3:11: Compiling main/hello-greet.cc failed: undeclared inclusion(s) in rule '//main:hello-greet':
this rule is missing dependency declarations for the following files included by 'main/hello-greet.cc':
'/opt/homebrew/opt/llvm/include/c++/v1/string'
'/opt/homebrew/opt/llvm/include/c++/v1/__algorithm/max.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__algorithm/comp.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__config'
'/opt/homebrew/opt/llvm/include/c++/v1/__config_site'
'/opt/homebrew/opt/llvm/include/c++/v1/__algorithm/comp_ref_type.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__debug'
'/opt/homebrew/opt/llvm/include/c++/v1/__assert'
'/opt/homebrew/opt/llvm/include/c++/v1/__verbose_abort'
'/opt/homebrew/opt/llvm/include/c++/v1/__availability'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/is_constant_evaluated.h'
'/opt/homebrew/opt/llvm/include/c++/v1/cstddef'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/enable_if.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/integral_constant.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/is_integral.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/remove_cv.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/remove_const.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/remove_volatile.h'
'/opt/homebrew/opt/llvm/include/c++/v1/version'
'/opt/homebrew/opt/llvm/include/c++/v1/stddef.h'
'/opt/homebrew/Cellar/llvm/16.0.6/lib/clang/16/include/stddef.h'
'/opt/homebrew/Cellar/llvm/16.0.6/lib/clang/16/include/__stddef_max_align_t.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__utility/declval.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__algorithm/max_element.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__iterator/iterator_traits.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__concepts/arithmetic.h'
'/opt/homebrew/opt/llvm/include/c++/v1/__type_traits/is_floating_point.h'
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?
.bazelrc file content:
toolchain/BUILD file content:
toolchain/cc_toolchain_config file content:
The text was updated successfully, but these errors were encountered: