carbon-lang
carbon-lang copied to clipboard
Can't build: The include path is not normalized
I get this error when running
$ bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
ERROR: /home/unai/.cache/bazel/_bazel_unai/c979266a4479bde9c9b8c348f74cbcfb/external/bazel_cc_toolchain/BUILD:20:19: in cc_toolchain_suite rule @bazel_cc_toolchain//:bazel_cc_toolchain: The include path '/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.4/share' is not normalized.
In fact, when I run
clang -no-canonical-prefixes -v -fsyntax-only -x c++ /dev/null -stdlib=libc++
I get these paths:
/usr/lib/llvm/14/bin/../../../../lib/clang/14.0.4/include
/usr/include
But repository_ctx.path() is normalizing it here...
Could you try changing the include path /usr/lib/llvm/14/bin/../../../../lib/clang/14.0.4/share to /usr/lib/clang/14.0.4/share?
@robiot how?
Edit: I mean, how do I do so?
Edit 2: I have already tried setting C_INCLUDE_PATH and CPLUS_INCLUDE_PATH environment variables
Have you tried using homebrew to install llvm?
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please comment or remove the inactive label. The long term label can also be added for issues which are expected to take time.
This issue is labeled inactive because the last activity was over 90 days ago.
Closing due to lack of updates. Note, things have been adjusted for a bit, and we no longer recommend homebrew on linux: https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/contribution_tools.md