carbon-lang
carbon-lang copied to clipboard
Brew build on ubuntu fails when environment variable CC is set
Steps to reproduce:
export CC=clang
Then follow the tutorial
# Install bazelisk using Homebrew.
$ brew install bazelisk
# Install Clang/LLVM using Homebrew.
# Many Clang/LLVM releases aren't built with options we rely on.
$ brew install llvm
$ export PATH="$(brew --prefix llvm)/bin:${PATH}"
# Download Carbon's code.
$ git clone https://github.com/carbon-language/carbon-lang
[error.log](https://github.com/carbon-language/carbon-lang/files/9184539/error.log)
$ cd carbon-lang
# Build and run the explorer.
$ bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
Output error.log
It seems like this issue is in this part of the code:
https://github.com/carbon-language/carbon-lang/blob/25b6a36b0d323fc81f0afe149552b5b0f6fc1350/bazel/cc_toolchains/clang_configuration.bzl#L29-L33
Can you provide the following:
echo $CC
$CC --version
This would not have been the original output, since I installed homebrew after my first attempt. However, I'm still able to replicate the error
> echo $CC
clang
> $CC --version
Homebrew clang version 14.0.6
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/linuxbrew/.linuxbrew/opt/llvm/bin
Also, it's definitely CC since the following works
unset CC
bazel run //explorer -- ./explorer/testdata/print/format_only.carbon
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.
I think this was addressed by #1724