This is pretty surprising if cc_library works. Are you setting the "-incompatible_enable_cc_toolchain_resolution" flag that would turn on the use of cc toolchain type in the first place?
I don't know much about the coverage system: my guess is that it's trying to build a tool for the host configuration, and for some reason the host configuration can't find a valid cc toolchain.
A quick test to validate this would be to try the following:
```
touch WORKSPACE
cat >>hello.cc <<EOF
#include <iostream>
int main(int argc, char* argv[]) {
std::cout << "Hello!" << std::endl;
return 0;
}
EOF
cat >>BUILD.bazel <<EOF
cc_binary(
name = "tool",
srcs = ["hello.cc"],
)
genrule(
name = "demo",
outs = ["demo.out"],
cmd = "\$(location :tool) > \$@",
tools = [":tool"],
)
EOF
bazel build //:demo
```
This creates a simple cc binary, then uses it as the tool in a genrule, so it will be built in the host configuration. If this builds properly, then that isn't your problem, and if it gives a similar error to the coverage problem, it helps to pinpoint your cc toolchain configuration as the problem.
John C