-
Notifications
You must be signed in to change notification settings - Fork 84
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
go_tool_binary fails under remote execution (mktemp: command not found) #439
Comments
I think I fully understand the problem now and can offer a solution. This behavior only occurs when the local Bazel is coming from nixpkgs. More specifically, there is this issue: NixOS/nixpkgs#94222 And this set of patches that are relevant:
What happens?When using this patched Bazel locally with BuildBarn runners remotely, the following happens (to the best of my understanding): Analysis phaseDuring the analysis phase, the patched Bazel evaluates this rule and sets the shell to (When using vanilla Bazel, the shell is instead set to Execution phase (local)When performing a local build, both store paths (bash and mktemp) are in the local nix store. Execution phase (RBE)During a remote build, How to fix this?Short term, I found that I can set We could change this patch to point to a bash that includes coreutils in it's embedded In any case, we also need to upload bazel with its dependencies to the NFS server. Footnotes
|
Thank you for raising this issue! I haven't gone through all the details, yet, but a Go related |
Thank you for taking a look. While both issues are related to Go and mktemp, they have different root causes. |
Fixed in nixpkgs NixOS/nixpkgs#349589 |
Describe the bug
When using remote execution as described in the tutorial, go builds fail with the following message:
This is a similar (working) action when using Ubuntu and vanilla Bazel locally:
This seems to be related to the following code in
rules_go
:https://github.com/bazelbuild/rules_go/blob/4211c6d32ee475a8fde1cfc91571e7c0bed67af4/go/private/rules/binary.bzl#L462
To Reproduce
Expected behavior
The go binary should build successfully
Environment
Additional context
Maybe we can install mktemp via nixpkgs?
The text was updated successfully, but these errors were encountered: