bazel: Using WSL's bash instead of MSYS64
Asked Answered
R

1

6

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?

Resurge answered 25/6, 2018 at 10:10 Comment(3)
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.Montymonument
Unfortunately, pointing BAZEL_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
@Resurge Bazel is working. I've tested it Windows Insider build 17704. Here is a screenshot. You may try in your Windows Spring Creator Update.Selaginella
A
6

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.

Anticlinal answered 28/6, 2018 at 7:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.