carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Can't build: The include path is not normalized

Open uninhm opened this issue 3 years ago • 3 comments

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...

uninhm avatar Jul 25 '22 02:07 uninhm

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 avatar Jul 25 '22 09:07 robiot

@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

uninhm avatar Jul 25 '22 11:07 uninhm

Have you tried using homebrew to install llvm?

geoffromer avatar Jul 26 '22 00:07 geoffromer

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.

github-actions[bot] avatar Oct 24 '22 02:10 github-actions[bot]

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

jonmeow avatar Oct 24 '22 15:10 jonmeow