$(QEMU_IMG) runfiles are missing
When I tried to use my new toolchain: //labgrid/toolchain/qemu-img:resolved
with the $(QEMU_IMG) variable - I got the following error:
realpath: missing operand
Try 'realpath --help' for more information.
Unable to find runfiles directory for bazel-out/k8-opt-exec-ST-d0c1afcb141c/bin/external/rules_labgrid~/debian/amd64/qemu-utils/qemu-img
Target //qemu:run failed to build
This is how I tried to use the $(QEMU_IMG) variable:
genrule(
name = "resize",
srcs = [":cloudvm"],
outs = ["resized.qcow2"],
cmd = "$(CP) $(location :cloudvm) $@ && $(QEMU_IMG) resize $@ +2G",
toolchains = [
"//labgrid/toolchain/qemu-img:resolved",
"@rules_coreutils//coreutils/toolchain/cp:resolved",
],
visibility = ["//visibility:private"],
)
but when I'm using the toolchain directly it's working:
genrule(
name = "resize",
srcs = [":cloudvm"],
outs = ["resized.qcow2"],
cmd = "$(CP) $(location :cloudvm) $@ && $(location //labgrid/toolchain/qemu-img:resolved) resize $@ +2G",
toolchains = [
"//labgrid/toolchain/qemu-img:resolved",
"@rules_coreutils//coreutils/toolchain/cp:resolved",
],
visibility = ["//visibility:private"],
)