bazel:使用WSL的bash代替MSYS64

时间:2018-06-25 10:10:26

标签: bazel windows-subsystem-for-linux msys

由于MSYS64,我在Windows上使用Bazel遇到问题:

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

我尝试过使用WSL的bash和gzip运行相同的命令,并且效果很好。有什么简单的方法告诉Bazel使用内置的WSL bash代替MSYS64?

1 个答案:

答案 0 :(得分:5)

对不起,Bazel还不支持WSL。参见https://github.com/bazelbuild/bazel/issues/1608

如果有足够的兴趣,我们可以放弃此问题的优先级。