Issue with $(location) on macOS
This target fails to build on macOS (Apple Silicon):
genrule(
name = "hello",
srcs = ["@ape//ape:echo"],
outs = ["echo.out"],
cmd = "$(location @ape//ape:echo) world > $@",
)
With this error:
ERROR: /Users/aleter01/Sandbox/ape-bug/BUILD.bazel:1:8: in cmd attribute of genrule rule //:hello: label '@@ape+//ape:echo' in $(location) expression expands to more than one file, please use $(locations @@ape+//ape:echo) instead. Files (at most 5 shown) are: [bazel-out/darwin_arm64-fastbuild/bin/external/ape+/ape/assimilate/echo/echo, bazel-out/darwin_arm64-fastbuild/bin/external/ape+/ape/assimilate/echo/echo.ape]
ERROR: /Users/aleter01/Sandbox/ape-bug/BUILD.bazel:1:8: Analysis of target '//:hello' (config: 7f8856b) failed
ERROR: Analysis of target '//:hello' failed; build aborted
INFO: Elapsed time: 0.157s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: No test targets were found, yet testing was requested