MediaPipeUnityPlugin icon indicating copy to clipboard operation
MediaPipeUnityPlugin copied to clipboard

ERROR: An error occurred during the fetch of repository 'com_google_mediapipe':

Open MustafaGulsoy opened this issue 1 year ago • 1 comments

Plugin Version or Commit ID

0.8.9

Unity Version

2022.3.30

Your Host OS

Winows 10

Target Platform

Android

[Windows Only] Visual Studio C++ and Windows SDK Version

No response

[Linux Only] GCC/G++ and GLIBC Version

No response

[Android Only] Android Build Tools and NDK Version

No response

[iOS Only] XCode Version

No response

Command Sequences

Hi,

I’m working with a fork of meadiapile ( MesekaiUnity project). I've set up the project and am trying to build MediaPipe using a Linux Docker build for Android. I successfully created the Docker image, but I'm encountering errors when I attempt to start the Python build command.

Could you provide some guidance on resolving this issue?

Log

[mediapipe@cf194b859acf ~]$ python build.py build --android arm64 -vv INFO (build.py): Building protobuf sources... DEBUG (build.py): Running bazel build -c opt --verbose_failures //mediapipe_api:mediapipe_proto_srcs INFO: Repository com_google_mediapipe instantiated at: /home/mediapipe/WORKSPACE:61:13: in Repository rule http_archive defined at: /home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/http.bzl:364:31: in INFO: Repository 'com_google_mediapipe' used the following cache hits instead of downloading the corresponding file.

  • Hash '54ce6da9f167d34fe53f928c804b3bc1fd1dd8fe2b32ca4bf0b63325d34680ac' for https://github.com/google/mediapipe/archive/v0.8.9.tar.gz If the definition of 'com_google_mediapipe' was updated, verify that the hashes were also updated. ERROR: An error occurred during the fetch of repository 'com_google_mediapipe': Traceback (most recent call last): File "/home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/http.bzl", line 122, column 10, in _http_archive_impl patch(ctx, auth = auth) File "/home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 167, column 22, in patch ctx.patch(patchfile, strip) Error in patch: Error applying patch /home/mediapipe/third_party/mediapipe_workaround.diff: Incorrect Chunk: the chunk content doesn't match the target Original Position: 97

Original Content: "@org_tensorflow//tensorflow/lite:framework_stable", "@org_tensorflow//tensorflow/lite/delegates/gpu:gl_delegate", "@org_tensorflow//tensorflow/lite/delegates/gpu/common:shape", ], alwayslink = 1, )

Revised Content: "@org_tensorflow//tensorflow/lite:framework_stable", "@org_tensorflow//tensorflow/lite/delegates/gpu:gl_delegate", "@org_tensorflow//tensorflow/lite/delegates/gpu/common:shape", ] + select({ "//mediapipe:android": [ "//mediapipe/util/android/file/base", ], "//conditions:default": [], }), alwayslink = 1, )

ERROR: /home/mediapipe/WORKSPACE:61:13: fetching http_archive rule //external:com_google_mediapipe: Traceback (most recent call last): File "/home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/http.bzl", line 122, column 10, in _http_archive_impl patch(ctx, auth = auth) File "/home/mediapipe/.cache/bazel/_bazel_mediapipe/6c11c387a04fa8f17c87a5c6db6ee555/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 167, column 22, in patch ctx.patch(patchfile, strip) Error in patch: Error applying patch /home/mediapipe/third_party/mediapipe_workaround.diff: Incorrect Chunk: the chunk content doesn't match the target Original Position: 97

Original Content: "@org_tensorflow//tensorflow/lite:framework_stable", "@org_tensorflow//tensorflow/lite/delegates/gpu:gl_delegate", "@org_tensorflow//tensorflow/lite/delegates/gpu/common:shape", ], alwayslink = 1, )

Revised Content: "@org_tensorflow//tensorflow/lite:framework_stable", "@org_tensorflow//tensorflow/lite/delegates/gpu:gl_delegate", "@org_tensorflow//tensorflow/lite/delegates/gpu/common:shape", ] + select({ "//mediapipe:android": [ "//mediapipe/util/android/file/base", ], "//conditions:default": [], }), alwayslink = 1, )

ERROR: error loading package '': Encountered error while reading extension file 'apple/repositories.bzl': no such package '@build_bazel_rules_apple//apple': no such package '@com_google_mediapipe//third_party': Error applying patch /home/mediapipe/third_party/mediapipe_workaround.diff: Incorrect Chunk: the chunk content doesn't match the target Original Position: 97

Original Content: "@org_tensorflow//tensorflow/lite:framework_stable", "@org_tensorflow//tensorflow/lite/delegates/gpu:gl_delegate", "@org_tensorflow//tensorflow/lite/delegates/gpu/common:shape", ], alwayslink = 1, )

Revised Content: "@org_tensorflow//tensorflow/lite:framework_stable", "@org_tensorflow//tensorflow/lite/delegates/gpu:gl_delegate", "@org_tensorflow//tensorflow/lite/delegates/gpu/common:shape", ] + select({ "//mediapipe:android": [ "//mediapipe/util/android/file/base", ], "//conditions:default": [], }), alwayslink = 1, )

INFO: Elapsed time: 2.167s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded) Fetching @build_bazel_rules_apple; Restarting. Traceback (most recent call last): File "/home/mediapipe/build.py", line 450, in 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 54, in _run_command return subprocess.run(' '.join(command_list), check=True, shell=shell) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/subprocess.py", line 571, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'bazel build -c opt --verbose_failures //mediapipe_api:mediapipe_proto_srcs' returned non-zero exit status 1.

Additional Context

No response

MustafaGulsoy avatar Sep 27 '24 12:09 MustafaGulsoy

I would like you to ask the author of the forked project. Additionally, the version is too outdated, so I am unable to provide support.

At first glance, the cause seems to be one of the following:

  • The Docker image is not built properly.
    • You may need to build the image with --no-cache.
  • The version of the WORKSPACE file and the patch files (under the third_party/ directory) do not match.

homuler avatar Sep 28 '24 03:09 homuler