Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What can I do to integrate into my project? #53

Closed
Sanerly opened this issue Aug 26, 2019 · 6 comments
Closed

What can I do to integrate into my project? #53

Sanerly opened this issue Aug 26, 2019 · 6 comments
Labels
platform:android Issues with Android as Platform type:build/install For Build and Installation issues type:feature Enhancement in the New Functionality or Request for a New Solution

Comments

@Sanerly
Copy link

Sanerly commented Aug 26, 2019

I use Gradle to compile projects and don't know how to modify them.

I also met:
INFO: Call stack for the definition of repository 'org_tensorflow' which is a http_archive (rule definition at C:/users/administrator/_bazel_administrator/miimwwwx/external/bazel_tools/tools/build_defs/repo/http.bzl:237:16):

  • E:/myproject/mediapipe-master/WORKSPACE:103:1
    INFO: Repository 'org_tensorflow' used the following cache hits instead of downloading the corresponding file.
  • Hash 'ddd4e3c056e7c0ff2ef29133b30fa62781dfbf8a903e99efb91a02d292fa9562' for https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/67def62936e28f97c16182dfcc467d8d1cae02b4.tar.gz
    If the definition of 'org_tensorflow' was updated, verify that the hashes were also updated.
    ERROR: An error occurred during the fetch of repository 'org_tensorflow':
    Traceback (most recent call last):
    File "C:/users/administrator/_bazel_administrator/miimwwwx/external/bazel_tools/tools/build_defs/repo/http.bzl", line 56
    patch(ctx)
    File "C:/users/administrator/_bazel_administrator/miimwwwx/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 91, in patch
    fail(("Error applying patch %s:\n%s%s...)))
    Error applying patch //third_party:tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff:
    java.io.IOException: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\ProgramData\chocolatey\lib\bazel" -c "patch '-p1' < E:/myproject/mediapipe-master/third_party/tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff"): ?????
    ERROR: no such package '@org_tensorflow//tensorflow': Traceback (most recent call last):
    File "C:/users/administrator/_bazel_administrator/miimwwwx/external/bazel_tools/tools/build_defs/repo/http.bzl", line 56
    patch(ctx)
    File "C:/users/administrator/_bazel_administrator/miimwwwx/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 91, in patch
    fail(("Error applying patch %s:\n%s%s...)))
    Error applying patch //third_party:tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff:
    java.io.IOException: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\ProgramData\chocolatey\lib\bazel" -c "patch '-p1' < E:/myproject/mediapipe-master/third_party/tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff"): ?????
    Sync finished
@mgyong
Copy link

mgyong commented Aug 26, 2019

@camillol @jiuqiant
@Sanerly MediaPipe for android only supports the bazel build system. Here are instructions on how to setup Android Studio with bazel.

If you have gradle build system for Android, you will have to build MediaPipe using bazel build system for Android. Both systems are incompatible for now.
Here are instructions on how to migrate from gradle to bazel

@Sanerly
Copy link
Author

Sanerly commented Aug 27, 2019

@mgyong
Thanks a lot, my project is more complicated and it is difficult to migrate from Gradle. I am currently using windows10, bazel is installed with chocolatey, and then I get an error when opening the MediaPipe project:
E:/myproject/mediapipe-master/WORKSPACE:103:1
INFO: Repository 'org_tensorflow' used the following cache hits instead of downloading the corresponding file.
Hash 'ddd4e3c056e7c0ff2ef29133b30fa62781dfbf8a903e99efb91a02d292fa9562' for https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/67def62936e28f97c16182dfcc467d8d1cae02b4.tar.gz
If the definition of 'org_tensorflow' was updated, verify that the hashes were also updated.
ERROR: An error occurred during the fetch of repository 'org_tensorflow':
Traceback (most recent call last):
File "C:/users/administrator/_bazel_administrator/miimwwwx/external/bazel_tools/tools/build_defs/repo/http.bzl", line 56
Patch(ctx)

Is it because I don't have the reason to install tensorflow? I don't know now, I am a little dizzy.

@jiuqiant
Copy link
Collaborator

Unfortunately, MediaPipe doesn't support Windows yet. We do support Windows Subsystem for Linux.
I am also not quite sure if MediaPipe can be integrated with Android Studio on Windows. We haven't tried this workflow by ourselves.

@Sanerly
Copy link
Author

Sanerly commented Aug 27, 2019

Thank you, may I ask the next version to consider supporting the Gradle compilation of Android studio under Windows?

@camillol camillol added type:feature Enhancement in the New Functionality or Request for a New Solution type:build/install For Build and Installation issues labels Aug 27, 2019
@mgyong mgyong added the platform:android Issues with Android as Platform label Aug 30, 2019
@mgyong mgyong closed this as completed Aug 30, 2019
@PrinceP
Copy link

PrinceP commented Sep 3, 2019

@mgyong Can you explain the error. Syncing again with invalidating caches is not working.
Is it a windows bazel version issue? Or a org_tensorflow patch has to be updated?
Would like to work on this.

@PrinceP
Copy link

PrinceP commented Sep 3, 2019

@mgyong Below is the cause of the error in building.

#2019-08-15
_TENSORFLOW_GIT_COMMIT = "67def62936e28f97c16182dfcc467d8d1cae02b4"
_TENSORFLOW_SHA256= "ddd4e3c056e7c0ff2ef29133b30fa62781dfbf8a903e99efb91a02d292fa9562"
http_archive(
name = "org_tensorflow",
urls = [
"https://mirror.bazel.build/github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT,
"https://github.com/tensorflow/tensorflow/archive/%s.tar.gz" % _TENSORFLOW_GIT_COMMIT,
],
strip_prefix = "tensorflow-%s" % _TENSORFLOW_GIT_COMMIT,
sha256 = _TENSORFLOW_SHA256,
patches = [
"@//third_party:tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff",
"@//third_party:tensorflow_f67fcbefce906cd419e4657f0d41e21019b71abd.diff",
],
patch_args = [
"-p1",
],
)

Causing the below error. Which is applying the patch error. Is this a bazel issue.

ERROR: An error occurred during the fetch of repository 'org_tensorflow':
Traceback (most recent call last):
File "C:/users/XX/_bazel_princ/wsixtlup/external/bazel_tools/tools/build_defs/repo/http.bzl", line 56
patch(ctx)
File "C:/users/XX/_bazel_princ/wsixtlup/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 91, in patch
fail(("Error applying patch %s:\n%s%s...)))
Error applying patch //third_party:tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff:
/bin/bash: E:/mediapipe/third_party/tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff: No such file or directory
ERROR: no such package '@org_tensorflow//tensorflow': Traceback (most recent call last):
File "C:/users/XX/_bazel_princ/wsixtlup/external/bazel_tools/tools/build_defs/repo/http.bzl", line 56
patch(ctx)
File "C:/users/XX/_bazel_princ/wsixtlup/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 91, in patch
fail(("Error applying patch %s:\n%s%s...)))
Error applying patch //third_party:tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff:
/bin/bash: E:/mediapipe/third_party/tensorflow_065c20bf79253257c87bd4614bb9a7fdef015cbb.diff: No such file or directory
Sync finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:android Issues with Android as Platform type:build/install For Build and Installation issues type:feature Enhancement in the New Functionality or Request for a New Solution
Projects
None yet
Development

No branches or pull requests

5 participants