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?
BAZEL_SH
environmental variable should allow you to pick shell/bash used by bazel as/where needed. But see the comment from @Biswapriyo, it really may not be the droid you are looking for. – MontymonumentBAZEL_SH
to the WSL bash doesn't work:Auto-Configuration Error: Could not determine MSYS/Cygwin root from BAZEL_SH (c:/windows/system32/bash.exe)
– Resurge