【发布时间】:2018-06-25 10:10:26
【问题描述】:
由于 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?
【问题讨论】:
-
BAZEL_SH环境变量应该允许您根据需要选择 bazel 使用的 shell/bash。但是看看@Biswapriyo 的评论,它可能真的不是你要找的机器人。 -
不幸的是,将
BAZEL_SH指向 WSL bash 不起作用:Auto-Configuration Error: Could not determine MSYS/Cygwin root from BAZEL_SH (c:/windows/system32/bash.exe) -
@edrevo Bazel 正在工作。我已经对其进行了测试,Windows Insider build 17704。这是screenshot。您可以尝试在您的 Windows Spring Creator 更新中。
标签: bazel windows-subsystem-for-linux msys