question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error executing command: /bin/bash: line 1: $'\r': command not found

See original GitHub issue

System information

  • OS Linux Ubuntu 20.04, WSL2 win10
  • Target android arm64

Describe the problem

After succesfully building the docker image and then running it ive started the process of building the android plugin but got error on step : ERROR: /home/mediapipe/mediapipe_api/framework/formats/BUILD:123:17: Executing genrule //mediapipe_api/framework/formats:rasterization_cs failed: (Exit 127): bash failed: error executing command /bin/bash -c … (remaining 1 argument(s) skipped)

Steps to reproduce the issue

  • build docker container
  • run docker container
  • run python script for building android 64 lib

Full logs C:\Users\Student\Documents\GitHub\MediapipeUnityPlugin>docker run --cpus=3 --memory=8192m --mount type=bind,src=%CD%\Packages,dst=/home/mediapipe/Packages -it mediapipe_unity:linux [mediapipe@a6488514b249 ~]$ python build.py build --android arm64 -v INFO (build.py): Building protobuf sources… DEBUG (build.py): Running bazel build -c opt //mediapipe_api:mediapipe_proto_srcs Extracting Bazel installation… 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/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘com_google_absl’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘com_google_protobuf’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘com_google_googletest’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘com_github_gflags_gflags’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘rules_python’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘build_bazel_rules_apple’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘build_bazel_rules_swift’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘build_bazel_apple_support’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘bazel_skylib’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/org_tensorflow/third_party/repo.bzl:108:14: Warning: skipping import of repository ‘pybind11’ because it already exists. DEBUG: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement, do not use the software. 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: /home/mediapipe/WORKSPACE:34:23: in <toplevel> /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/rules_pkg/deps.bzl:33:10: in rules_pkg_dependencies /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe Repository rule git_repository defined at: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel> INFO: SHA256 (https://github.com/bazelbuild/rules_cc/archive/master.zip) = b1788ea6d99fed9bdd32a0fb15badf8a1dd0e26eb60cc58ea845571b5e4ca54b DEBUG: Rule ‘rules_cc’ indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = “b1788ea6d99fed9bdd32a0fb15badf8a1dd0e26eb60cc58ea845571b5e4ca54b” DEBUG: Repository rules_cc instantiated at: /home/mediapipe/WORKSPACE:78:13: in <toplevel> Repository rule http_archive defined at: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel> INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (44 packages loaded, 674 targets configured). INFO: Found 1 target… INFO: From Compiling src/google/protobuf/message_lite.cc [for host]: In file included from /usr/include/string.h:519, from external/com_google_protobuf/src/google/protobuf/stubs/port.h:39, from external/com_google_protobuf/src/google/protobuf/stubs/common.h:46, from external/com_google_protobuf/src/google/protobuf/message_lite.h:45, from external/com_google_protobuf/src/google/protobuf/message_lite.cc:36: In function ‘void* memcpy(void*, const void*, size_t)’, inlined from ‘google::protobuf::uint8* google::protobuf::io::EpsCopyOutputStream::WriteRaw(const void*, int, google::protobuf::uint8*)’ at external/com_google_protobuf/src/google/protobuf/io/coded_stream.h:699:16, inlined from ‘virtual google::protobuf::uint8* google::protobuf::internal::ImplicitWeakMessage::_InternalSerialize(google::protobuf::uint8*, google::protobuf::io::EpsCopyOutputStream*) const’ at external/com_google_protobuf/src/google/protobuf/implicit_weak_message.h:87:28, inlined from ‘bool google::protobuf::MessageLite::SerializePartialToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const’ at external/com_google_protobuf/src/google/protobuf/message_lite.cc:388:30: /usr/include/bits/string_fortified.h:29:33: warning: ‘void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)’ specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 29 | return __builtin___memcpy_chk (__dest, __src, __len, | ~~~^~ 30 | __glibc_objsize0 (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ ERROR: /home/mediapipe/mediapipe_api/framework/formats/BUILD:123:17: Executing genrule //mediapipe_api/framework/formats:rasterization_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: line 1: $‘\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: 239.370s, Critical Path: 159.08s INFO: 202 processes: 25 internal, 177 processwrapper-sandbox. FAILED: Build did NOT complete successfully Traceback (most recent call last): File “/home/mediapipe/build.py”, line 392, in <module> Argument().command().run() File “/home/mediapipe/build.py”, line 109, in run self._run_command(self._build_proto_srcs_commands()) File “/home/mediapipe/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. [mediapipe@a6488514b249 ~]$ Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
homulercommented, May 18, 2021

Will you run python build.py build --android arm64 -vv and share the log, please? In addition, I’d like to know the command you’ve run to build the Docker image.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'\r': command not found - .bashrc / .bash_profile [duplicate]
I run this file in Cygwin: $ bash sashacrlf.sh Sasha sashacrlf.sh: line 1: $'\r': command not found Goddess!
Read more >
Why am I getting "line 1: $' :\r': command not found"?
You have Windows-style line endings. The no-op command : is instead read as :<carriage return> , displayed as :\r or more fully as...
Read more >
command not found" errors running Bash scripts in WSL?
1. This works. · 4. Another alternative would be sed -i 's/\r$//' path/to/file · 3. If you get E: Unable to locate package...
Read more >
How to fix the “ '\r': command not found” error
The “ '\r': command not found” occurs when your file contains the DOS script syntax for line ending, but you are attempting to...
Read more >
How to fix a "Command not found" error in Linux
5 ways to fix "Command not found" errors · 1. Include the path · 2. Add a new path · 3. Copy a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found