bazelbuild / bazelbuild/rules_cc
bazel coverage not working for 0.0.9
- Dominant language
- Starlark
- Stars
- 247
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
### Description of the problem / feature request:
Bazel Coverage failing with rules_cc 0.0.9
### Feature requests: what underlying problem are you trying to solve with this feature?
We're trying to uprev our rules_cc from ancient 0.0.1 to latest version as we prepare to migrate to bazel 7.0.0
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
test.cpp
```
#include
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
```
BUILD
```
cc_library(
name = "test_lib",
srcs = ["test.cpp"],
)
cc_test(
name = "test",
srcs = [":test_lib"],
)
```
### What operating system are you running Bazel on?
ubuntu 20.04
### What's the output of `bazel info release`?
release 6.3.2
### What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?
0.0.9
### What Bazel options do you use to trigger the issue? What C++ toolchain do you use?
I ran this with bazel 6.3.2 in the rules cc example section by adding the following section above. I'm using the cc toolchain configured by rules_cc.
System gcc is 9.0.0
### Have you found anything relevant by searching the web?
https://groups.google.com/d/topic/bazel-discuss/dtduJBlb-nw (doesn't seem relevant)
### Any other information, logs, or outputs that you want to share?
```
bazelisk coverage //examples/my_c_archive/...
ERROR: /home/ryang/repos/rules_cc/examples/my_c_archive/BUILD:36:13: in my_c_compile rule //examples/my_c_archive:object:
Traceback (most recent call last):
File "/home/ryang/repos/rules_cc/examples/my_c_compile/my_c_compile.bzl", line 30, column 57, in _my_c_compile_impl
feature_configuration = cc_common.configure_features(
Error in configure_features: Symbol profile is provided by all of the following features: coverage gcc_coverage_map_format
ERROR: /home/ryang/repos/rules_cc/examples/my_c_archive/BUILD:36:13: Analysis of target '//examples/my_c_archive:object' failed
ERROR: Analysis of target '//examples/my_c_archive:object' failed; build aborted:
INFO: Elapsed time: 0.090s
```
Contributor guide
Research direction
Start with examples/my_c_archive/BUILD at line 36 and examples/my_c_compile/my_c_compile.bzl at line 30, then reproduce with bazelisk coverage //examples/my_c_archive/.... Investigate the configure_features failure involving coverage, gcc_coverage_map_format, and the profile feature. Done means the example coverage command completes without the reported analysis error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100