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

Toolchains support: Failed to build on Windows for Linux #909

Closed
siberex opened this issue Jul 12, 2019 · 2 comments · Fixed by #916
Closed

Toolchains support: Failed to build on Windows for Linux #909

siberex opened this issue Jul 12, 2019 · 2 comments · Fixed by #916
Labels

Comments

@siberex
Copy link
Contributor

siberex commented Jul 12, 2019

🐞 bug report

Affected Rule

The issue is caused by the rule: nodejs_binary

Is this a regression?

No

Description

Failed to build nodejs_binary on Windows when using linux_amd64 target.

It looks like nodejs_binary_macro is trying to run @nodejs_linux_amd64//:bin/nodejs/node.exe

🔬 Minimal Reproduction

Use this repo to reproduce:

cd %TEMP%
git clone git@github.com:scalio/bazel-nestjs-starter.git
cd bazel-nestjs-starter
git checkout 92f3ffe573136776d71a1bc42630fe5c1b4700bb
bazel build --platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64 //src:docker

or

bazel build --platforms=@build_bazel_rules_nodejs//toolchains/node:linux_amd64 //src:server

🔥 Exception or Error


INFO: Analyzed target //src:docker (656 packages loaded, 19072 targets configured).
INFO: Found 1 target...
ERROR: missing input file '@nodejs_linux_amd64//:bin/nodejs/node.exe'
ERROR: C:/users/root/appdata/local/temp/bazel-nestjs-starter/src/BUILD.bazel:37:1: //src:docker: missing input file '@nodejs_linux_amd64//:bin/nodejs/node.exe'
Target //src:docker failed to build
ERROR: C:/users/root/appdata/local/temp/bazel-nestjs-starter/src/BUILD.bazel:37:1 1 input file(s) do not exist
INFO: Elapsed time: 560.307s, Critical Path: 0.21s
INFO: 0 processes.
FAILED: Build did NOT complete successfully

🌍 Your Environment

Operating System:

  
Windows 10 Pro version 1903 (build 18362.207)
  

Output of bazel version:

  
0.27.0
  

Rules version (SHA):

  
0.33.0 (937b9f3dd2cc95941d9989e1292656c57912f096a1541d7dc17683622501fe11)
  
@alexeagle
Copy link
Collaborator

/cc @Globegitter

@alexeagle alexeagle added the bug label Jul 12, 2019
@gregmagolan
Copy link
Collaborator

Thanks for the clean repro. I have a fix and will post a PR shortly.

gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this issue Jul 16, 2019
Fixes issue bazel-contrib#909: Toolchains support: Failed to build on Windows for Linux
gregmagolan added a commit to gregmagolan/rules_nodejs that referenced this issue Jul 16, 2019
Fixes issue bazel-contrib#909: Toolchains support: Failed to build on Windows for Linux
alexeagle pushed a commit that referenced this issue Jul 16, 2019
Fixes issue #909: Toolchains support: Failed to build on Windows for Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants