Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bazel: Using WSL's bash instead of MSYS64

I am having problems using Bazel on Windows because of MSYS64:

ERROR: C:/users/ximo.hi/_bazel_ximo/4qw2ezwb/external/java_image_base/image/BUILD:6:1: error executing shell command: 'bazel-out/host/bin/external/gzip/gzip.exe -d < external/java_image_base/image/000.tar.gz > bazel-out/x64_windows-fastbuild/bin/external/java_image_base/image/000.tar.gz.nogz' failed (Exit 127): bash.exe failed: error executing command
  cd C:/users/ximo.hi/_bazel_ximo/4qw2ezwb/execroot/com_telefonica_baikal
C:/msys64/usr/bin/bash.exe -c bazel-out/host/bin/external/gzip/gzip.exe -d < external/java_image_base/image/000.tar.gz > bazel-out/x64_windows-fastbuild/bin/external/java_image_base/image/000.tar.gz.nogz
C:/users/ximo.hi/_bazel_ximo/4qw2ezwb/execroot/com_telefonica_baikal/bazel-out/host/bin/external/gzip/gzip: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

I have tried running the same commands using WSL's bash and gzip and it works perfectly fine. Is there any easy way to tell Bazel to use the built-in WSL bash instead of MSYS64?

like image 985
edrevo Avatar asked Jun 25 '18 10:06

edrevo


1 Answers

Sorry, Bazel doesn't support WSL yet. See https://github.com/bazelbuild/bazel/issues/1608

If there are enough interest, we can dump up the priority of this issue.

like image 103
Yun Peng Avatar answered Oct 29 '22 22:10

Yun Peng