The "linked_statically_by" attribute of cc_library errors out when used with relative labels
ERROR: /usr/local/google/home/bmzhao/Code/experimental/BUILD:11:1: in cc_shared_library rule //:a_so:
Traceback (most recent call last):
File "/usr/local/google/home/bmzhao/Code/experimental/BUILD", line 11
cc_shared_library(name = 'a_so')
File "/usr/local/google/home/bmzhao/.cache/bazel/_bazel_bmzhao/346f8c89ce367ab1eaf00095a9f73200/external/rules_cc/examples/expe
rimental_cc_shared_library.bzl", line 216, in _cc_shared_library_impl
_filter_inputs(ctx, <4 more arguments>)
File "/usr/local/google/home/bmzhao/.cache/bazel/_bazel_bmzhao/346f8c89ce367ab1eaf00095a9f73200/external/rules_cc/examples/expe
rimental_cc_shared_library.bzl", line 172, in _filter_inputs
fail(<1 more arguments>)
We can't link //:a either statically or dynamically
ERROR: Analysis of target '//:a_so' failed; build aborted: Analysis of target '//:a_so' failed; build aborted
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Description of the problem / feature request:
The "linked_statically_by" attribute of cc_library errors out when used with relative labels
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I've got a working repro here: https://gist.github.com/bmzhao/02c695048cbd591bd93d9bdfd93e4f78 based on github repo: https://github.com/bmzhao/experimental/tree/f727f572395b2a72e119f9865b05716bcafea54d
If you comment out line 8, and uncomment line 7, things start working: https://github.com/bmzhao/experimental/blob/f727f572395b2a72e119f9865b05716bcafea54d/BUILD#L8
What operating system are you running Bazel on?
What's the output of
bazel info release
?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?
rules_cc is pinned to commit: https://github.com/bazelbuild/rules_cc/commit/01d4a48911d5e7591ecb1c06d3b8af47fe872371