bazelbuild / bazelbuild/bazel-toolchains
Unable to build cc toolchains using rbe_configs_gen
- Dominant language
- Go
- Stars
- 202
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to use `rbe_configs_gen` to create toolchains for ubuntu18.04 and bazel v4.1.0, but running into this error message that I'm having trouble figuring out - wouldn't gcc be auto-installed as part of the bazelisk installation?
```
Downloading https://releases.bazel.build/4.1.0/release/bazel-4.1.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
INFO: Repository local_config_cc instantiated at:
/DEFAULT.WORKSPACE.SUFFIX:368:13: in
/root/.cache/bazel/_bazel_root/7c1760e52541f6b33fa1f4793e4219f3/external/bazel_tools/tools/cpp/cc_configure.bzl:184:16: in cc_configure
Repository rule cc_autoconf defined at:
/root/.cache/bazel/_bazel_root/7c1760e52541f6b33fa1f4793e4219f3/external/bazel_tools/tools/cpp/cc_configure.bzl:145:30: in
ERROR: An error occurred during the fetch of repository 'local_config_cc':
Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/7c1760e52541f6b33fa1f4793e4219f3/external/bazel_tools/tools/cpp/cc_configure.bzl", line 127, column 33, in cc_autoconf_impl
configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools)
File "/root/.cache/bazel/_bazel_root/7c1760e52541f6b33fa1f4793e4219f3/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 340, column 23, in configure_unix_toolchain
cc = _find_generic(repository_ctx, "gcc", "CC", overriden_tools)
File "/root/.cache/bazel/_bazel_root/7c1760e52541f6b33fa1f4793e4219f3/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 310, column 32, in _find_generic
auto_configure_fail(msg)
File "/root/.cache/bazel/_bazel_root/7c1760e52541f6b33fa1f4793e4219f3/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 112, column 9, in auto_configure_fail
fail("\n%sAuto-Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail:
Auto-Configuration Error: Cannot find gcc or CC (clang); either correct your path or set the CC environment variable
```
Contributor guide
Research direction
Start by reproducing the `rbe_configs_gen` invocation for Ubuntu 18.04 with Bazel 4.1.0 and inspect the reported `local_config_cc` failure. Determine whether the documented setup expects GCC or CC to be installed separately; done means the prerequisite or tool behavior is clarified and the failing setup has a documented or verified resolution.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100