-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build cc_proto_library targets because of missing google::protobuf
symbols
#228
Comments
I think the issue is unique to building For my |
Thank you for reporting this error. I will look into this. |
One more data point: as far as I can tell, the default bazel toolchain does not build a dylib at all; here's the final section when I run
Note that no dylib is built (or is present in the resulting directory), and the |
This seems to be a regression from #189 and was not completely documented there. The fix for this (until Bazel 7 is released) will be to add |
#230 is the best we can do at this moment. |
Confirming that |
I'm unable to build
cc_proto_library
targets directly or use them ingoogletest
unit tests, though oddly they do work when used in acc_binary
target.Steps to reproduce:
bazel build //src/main/protobuf:test_cc_proto
Result:
My setup:
Apple M1 Ultra
macOS Ventura 13.6
Xcode 15.0
bazel 6.2.1
There's nothing in my
~/.bazelrc
file, the only project.bazelrc
settings are the ones recommended forbazel-toolchain
.Notes:
bazel run //src/main/cpp:main
builds and runs just fine, even though it has a dep on the target that I can't build directly. This matches my experience in a larger project, where I can build and run the main executable but not the individual proto targets. More importantly,cc_test
targets fail to build because of thecc_proto_library
failures.If I comment out
build --incompatible_enable_cc_toolchain_resolution
in.bazelrc
, thecc_proto_library
target builds correctly.The text was updated successfully, but these errors were encountered: