You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
default builds on windows failing due to outdated dependencies #638
Building a simple project (i.e., a single cc_binary(..) such as the bazelbuild/examples/cpp-tutorial projects) fails on windows with the following error:
ERROR: .../external/rules_swift++non_module_deps+build_bazel_rules_swift_local_config/BUILD:54:58: name 'arch' is not defined
ERROR: package contains errors: : name 'arch' is not defined
Confused as to why rules_swift was getting involved in a simple c++ only project being build with MSVC I did some digging.
Bazel mod graph (with some entries omitted to keep it brief) gives:
Although doing a single_verision_override() to pin rules_swift to a newer version works, rules_swift is only getting included because of the dep that protobuf has on rules_apple. But protobuf dropped that requirement with version 34.0.
so TLDR, rules_cc is pulling in an old version of protobuf which pulls in an old version of rules_swift which doesn't run on windows even if all you want to do is build a simple cc_binary()
I see that rules_cc/MODULE.bazel only specifies protobuf 27.0, so I'm assuming Version 33.4 is coming from somewhere else in the dep graph (there are a number of circular dependencies on protobuf inside the protobuf dep graph).
We are considering to establish a routine to update the dependencies in bazelbuild/examples after releases of rules so that https://buildkite.com/bazel/bazel-bazel-examples should catch these things in the future.
Activity
pzembrod commentedon Sep 11, 2026
We are considering to establish a routine to update the dependencies in bazelbuild/examples after releases of rules so that https://buildkite.com/bazel/bazel-bazel-examples should catch these things in the future.