Build failed with /bin/bash: $'\r': command not found WSL Ubuntu 20.04
See original GitHub issueSystem information
- OS Platform and Distribution (e.g., Linux Ubuntu 20.04, WSL2):Linux Ubuntu 20.04, WSL2
- Target (e.g. desktop cpu, android arm64): python3.9 build.py build --desktop gpu -v
- Bazel version: 4.0.0
- Python version: 3.9.5
- GCC/G++ version: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
- Unity version:
- Android NDK version (if building for Android):
- Xcode version (if building for iOS):
Describe the problem Build failed
Steps to reproduce the issue -Install WSL 2 with Ubuntu 20.04 distribution -installed required library (python 3.9, pip, numpy, bazel, nuget, gcc) -run python3.9 build.py build --desktop gpu -v
Full logs
nolkeg@DESKTOP-71OR9NF:/mnt/d/UnityProjects/MediaPipeUnityPlugin$ python3.9 build.py build --desktop gpu -v
INFO (build.py): Building protobuf sources…
DEBUG (build.py): Running bazel build -c opt //mediapipe_api:mediapipe_proto_srcs
Starting local Bazel server and connecting to it…
WARNING: Download from http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘com_google_absl’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘com_google_protobuf’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘com_google_googletest’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘com_github_gflags_gflags’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘rules_cc’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘rules_python’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘build_bazel_rules_apple’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘build_bazel_rules_swift’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘build_bazel_apple_support’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘bazel_skylib’ because it already exists.
DEBUG: /home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/org_tensorflow/third_party/repo.bzl:108:14:
Warning: skipping import of repository ‘pybind11’ because it already exists.
DEBUG: Rule ‘rules_python’ indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = “1564776078 -0400”
DEBUG: Repository rules_python instantiated at:
/mnt/d/UnityProjects/MediaPipeUnityPlugin/WORKSPACE:34:23: in <toplevel>
/home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies
/home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule git_repository defined at:
/home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
INFO: SHA256 (https://github.com/bazelbuild/rules_cc/archive/master.zip) = 1a42099a527cbef96f5148f4a11d95ddb2d7d8781dd68a664430c1c36b2221cb
DEBUG: Rule ‘rules_cc’ indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = “1a42099a527cbef96f5148f4a11d95ddb2d7d8781dd68a664430c1c36b2221cb”
DEBUG: Repository rules_cc instantiated at:
/mnt/d/UnityProjects/MediaPipeUnityPlugin/WORKSPACE:78:13: in <toplevel>
Repository rule http_archive defined at:
/home/nolkeg/.cache/bazel/_bazel_nolkeg/2c6909a90362eaccd06b96ea6b50d910/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (43 packages loaded, 666 targets configured).
INFO: Found 1 target…
ERROR: /mnt/d/UnityProjects/MediaPipeUnityPlugin/mediapipe_api/framework/formats/BUILD:98:17: Executing genrule //mediapipe_api/framework/formats:location_data_cs failed: (Exit 127): bash failed: error executing command /bin/bash -c … (remaining 1 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox bash failed: error executing command /bin/bash -c … (remaining 1 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox /bin/bash: $‘\r’: command not found Target //mediapipe_api:mediapipe_proto_srcs failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 319.508s, Critical Path: 79.02s INFO: 202 processes: 25 internal, 177 linux-sandbox. FAILED: Build did NOT complete successfully Traceback (most recent call last): File “/mnt/d/UnityProjects/MediaPipeUnityPlugin/build.py”, line 392, in <module> Argument().command().run() File “/mnt/d/UnityProjects/MediaPipeUnityPlugin/build.py”, line 109, in run self._run_command(self._build_proto_srcs_commands()) File “/mnt/d/UnityProjects/MediaPipeUnityPlugin/build.py”, line 51, in _run_command return subprocess.run(command_list, check=True) File “/usr/lib/python3.9/subprocess.py”, line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command ‘[‘bazel’, ‘build’, ‘-c’, ‘opt’, ‘//mediapipe_api:mediapipe_proto_srcs’]’ returned non-zero exit status 1.
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
You can use Docker if your OS is Windows 10 Home, because WSL2 backend is supported (see https://docs.docker.com/docker-for-windows/install/).
You cant’ use Docker only when you need to run it with Hyper-V backend (e.g. to build native libraries for Windows).
Unfotunately, I can’t use docker because I have windows10 home.