bazel-contrib / bazel-contrib/rules_foreign_cc

cmake rule cannot depend a cc_binary target

Open
#1,009 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
737
Forks
270
PR merge metrics
No merged PRs in 30d

Description

mysql-connector-cpp need protoc to generate some code at compile stage, but cmake rule cannot dep a cc_binary target, how to fix solve this problem?

LOG:
```
'@com_google_protobuf_protoc_linux_x86_64//:protoc' does not have mandatory providers: 'CcInfo'
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the mysql-connector-cpp build case where protoc generates code at compile time, then inspect the CMake rule and the @com_google_protobuf_protoc_linux_x86_64//:protoc target named in the log. Done means the CMake rule can depend on the cc_binary target and the generated code builds without the missing CcInfo error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.