line / line/rules_apple_line

xcode_path_wrapper issue when building metal_library

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Starlark
Stars
209
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Hi! I found this project because I was looking for a way to build metal libraries using Bazel. I'm pretty new to Bazel so I may just be holding this wrong, but I'm having trouble with the `metal_library` rule at tip of tree (currently 63f50b29616e7a439c47a140cadd59c3ccf4066f).

When I try to build a `metal_library` I get:

```
$ bazel build //:example_metallib
ERROR: /BUILD.bazel:3:14: in metal_library rule //:example_metallib:
Traceback (most recent call last):
File "/external/rules_apple_line/apple/metal_library.bzl", line 64, column 44, in _metal_library_impl
xcode_path_wrapper = ctx.executable._xcode_path_wrapper,
Error: No attribute '_xcode_path_wrapper' in executable. Make sure there is a label type attribute marked as 'executable' with this name
Available attributes:
ERROR: /BUILD.bazel:3:14: Analysis of target '//:example_metallib' failed
ERROR: Analysis of target '//:example_metallib' failed; build aborted:
```

I suspected it could be a version compatibility issue with Bazel or rules_apple so I've played around with various versions of each to no avail.

I attached a zip of my minimal bazel project. I'd really appreciate knowing if this is my mistake or if I found a bug.

[metallib.zip](https://github.com/line/rules_apple_line/files/11400031/metallib.zip)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the attached minimal project using `bazel build //:example_metallib`. Then inspect `apple/metal_library.bzl` at line 64 and the target declaration in `BUILD.bazel` at line 3 to trace the missing `_xcode_path_wrapper` attribute. Done means the example target completes analysis and builds without this error.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.