Satisfying Bazel'€™s relative paths requirement in C++ toolchains
pigweed.dev·2h·
Discuss: Hacker News, r/cpp
Flag this post

Published on 2025-11-05 by Armando Montanez

Today’s blog post is an instructive, technical deep-dive into one of Bazel’s most infamous C++ errors:

ERROR: /projects/pigweed/pw_string/BUILD.bazel:67:11: Compiling pw_string/format.cc failed: absolute path inclusion(s) found in rule '//pw_string:format':
the source file 'pw_string/format.cc' includes the following non-builtin files with absolute paths (if these are builtin files, make sure these paths are in your toolchain):
'/private/var/tmp/_bazel_amontanez/e724b21efc8bc19866072fbc72ee5907/external/+_repo_rules6+llvm_toolchain/include/c++/v1/cstdarg'
'/private/var/tmp/_bazel_amontanez/e724b21efc8bc19866072fbc72ee5907/external/+_repo_rules6+llvm_toolchain/include/c++/v1/__config'
...

If you’ve ever tried to put together a cus…

Similar Posts

Loading similar posts...