bazelbuild / bazelbuild/rules_apple
apple_dynamic_framework_import doesn't work as a dependency of cc_library
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
I am attempting to import a package that is available only as a framework ([MuJoCo](https://github.com/google-deepmind/mujoco). When I finally attempt to run a test `cc_binary`, compilation succeeds and linking fails (there's nothing in the linkopts that pull in the framework, so symbols are not resolved).
The import lines look like this:
```
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_dynamic_framework_import")
apple_dynamic_framework_import(
name = "mujoco_framework",
framework_imports = glob(["mujoco.framework/**"]),
)
```
and the binary rule looks like this:
```
cc.binary(
name = "test_mujoco",
srcs = ["test_mujoco.cpp"],
deps = [
"//external/MuJoCo:mujoco",
],
)
```
Is there some other way to do this?
Contributor guide
Research direction
Start by reproducing the failure with the shown apple_dynamic_framework_import in apple.bzl and the test_mujoco.cpp cc.binary example. Trace how the framework dependency reaches the binary's link options, then verify that the MuJoCo symbols resolve when the test binary links successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100