bazel-contrib / bazel-contrib/rules_foreign_cc
MacOS Apple Silicone (M1) Mac Build Failure
- Dominant language
- Starlark
- Stars
- 737
- Forks
- 270
- PR merge metrics
- No merged PRs in 30d
Description
# Problem
When building with the `0.9.0` release of this library on an Apple Silicone (M1) Mac the following error occurs:
```
ERROR: /external/rules_foreign_cc/toolchains/BUILD.bazel:192:11: in ninja_tool rule @rules_foreign_cc//toolchains:ninja_tool:
Traceback (most recent call last):
File "/external/rules_foreign_cc/foreign_cc/built_tools/ninja_build.bzl", line 16, column 30, in _ninja_tool_impl
additional_tools = depset(
Error in depset: at index 0 of transitive, got element of type NoneType, want depset
ERROR: /external/rules_foreign_cc/toolchains/BUILD.bazel:192:11: Analysis of target '@rules_foreign_cc//toolchains:ninja_tool' failed
```
This error is not present in version `0.8.0` of the library. I suspect the issue was introduce by this [PR](https://github.com/bazelbuild/rules_foreign_cc/pull/900/files) or this [PR](https://github.com/bazelbuild/rules_foreign_cc/pull/935/files).
# Solution
Revert to version `0.8.0` until a fix is determined.
Contributor guide
Research direction
Reproduce the M1 build failure, then compare version 0.8.0 with 0.9.0 around external/rules_foreign_cc/toolchains/BUILD.bazel and foreign_cc/built_tools/ninja_build.bzl. Review the referenced PRs and identify why ninja_tool receives NoneType; done means the 0.9.0 build succeeds on Apple Silicon without reverting to 0.8.0.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100