line / rules_apple_line

LINE's Apple rules for Bazel
Apache License 2.0
207 stars 18 forks source link

xcode_path_wrapper issue when building metal_library #52

Open bpsalomon opened 1 year ago

bpsalomon commented 1 year ago

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: <path>/BUILD.bazel:3:14: in metal_library rule //:example_metallib:
Traceback (most recent call last):
    File "<tmp path>/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: <path>/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