Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote worker cannot build targets when tools are involved (runfiles not found) #2296

Closed
stapelberg opened this issue Dec 25, 2016 · 1 comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug
Milestone

Comments

@stapelberg
Copy link
Contributor

Description of the problem / feature request / question:

I’m trying to use remote workers, but it seems like runfiles for the tools (a py_binary defined in the same workspace) are not shipped to remote workers.

cc @hhclam (thanks for your work on this!)

If possible, provide a minimal example to reproduce the problem:

# mkdir /tmp/repro
# cd /tmp/repro
# touch WORKSPACE
# echo 'print "hello world"' > hello.py
# echo 'py_binary(name="hello",srcs=["hello.py"])' > BUILD
# echo 'genrule(name="gen", outs=["out.txt"], tools=[":hello"], cmd="$(location :hello) > $@")' >> BUILD
# bazel build :gen && cat bazel-genfiles/out.txt
hello world

…so, the BUILD file works as expected.

Now, in a separate terminal, start a remote worker:

# ./bazel-bin/src/tools/remote_worker/remote_worker --work_path=/tmp/test

…then, try to build remotely:

# bazel --host_jvm_args=-Dbazel.DigestFunction=SHA1 build --spawn_strategy=remote --hazelcast_node=127.0.0.1:5701 --remote_worker=127.0.0.1:8080 :gen
INFO: Found 1 target...
ERROR: /tmp/repro/BUILD:2:1: Executing genrule //:gen failed: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Traceback (most recent call last):
  File "bazel-out/host/bin/hello", line 140, in <module>
    Main()
  File "bazel-out/host/bin/hello", line 90, in Main
    module_space = FindModuleSpace()
  File "bazel-out/host/bin/hello", line 71, in FindModuleSpace
    sys.argv[0])
AssertionError: Cannot find .runfiles directory for bazel-out/host/bin/hello
Target //:gen failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.678s, Critical Path: 0.60s

Environment info

  • Operating System:
# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
  • Bazel version (output of bazel info release):
release 0.4.3
@damienmg damienmg modified the milestones: 0.7, 0.6 Dec 27, 2016
@damienmg damienmg added category: performance P2 We'll consider working on this in future. (Assignee optional) type: bug labels Dec 27, 2016
@ulfjack
Copy link
Contributor

ulfjack commented Mar 7, 2017

I think this is very likely a dupe of #1593.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug
Projects
None yet
Development

No branches or pull requests

3 participants