Mediapipe: Android Setup Issue

Created on 1 Dec 2019  路  3Comments  路  Source: google/mediapipe

Hello,

Very excited about MediaPipe and I was trying to run the sample - Multi Hand Tracking app on my MacBook Pro, after Install Bazel and running the following command as stated in the doc bazel build -c opt --config=android_arm64 --define 3D=true mediapipe/examples/android/src/java/com/google/mediapipe/apps/multihandtrackinggpu
, I'm getting a nasty Bazel error :
Illegal ambiguous match on configurable attribute "linkopts" in //mediapipe/gpu:gl_base:
//mediapipe:apple
//mediapipe:macos
Multiple matches are not allowed unless one is unambiguously more specialized.

Looking at the log, I tried to remove from this entry "//mediapipe:apple" in the BUILD file (snippet below) still no luck, perhaps I'm not understanding the source of the problem.

cc_library(
name = "gpu_buffer_multi_pool",
srcs = ["gpu_buffer_multi_pool.cc"] + select({
"//conditions:default": [
"gl_texture_buffer_pool.cc",
],

    "//mediapipe:macos": [
        "gl_texture_buffer_pool.cc",
    ],
}),
hdrs = ["gpu_buffer_multi_pool.h"] + select({
    "//conditions:default": [
        "gl_texture_buffer_pool.h",
    ],
    "//mediapipe:apple": [
        # The inclusions check does not see that this is provided by
        # pixel_buffer_pool_util, so we include it here too. This is
        # b/28066691.
        "pixel_buffer_pool_util.h",
    ],
    "//mediapipe:macos": [
        "gl_texture_buffer_pool.h",
    ],
}),
visibility = ["//visibility:public"],
deps = [
    ":gl_base",
    ":gpu_buffer",
    ":gpu_shared_data_header",
    "//mediapipe/framework:calculator_context",
    "//mediapipe/framework:calculator_node",
    "//mediapipe/framework/port:logging",
    "@com_google_absl//absl/memory",
    "@com_google_absl//absl/synchronization",
] + select({
    "//conditions:default": [
        ":gl_texture_buffer",
    ],
    "//mediapipe:apple": [
        ":pixel_buffer_pool_util",
        "//mediapipe/objc:CFHolder",
    ],
    "//mediapipe:macos": [
        ":pixel_buffer_pool_util",
        ":gl_texture_buffer",
    ],
}),

)

Please help, what am I doing wrong or is missing.

Most helpful comment

I believe it's caused by using Bazel 1.2.1 on mac. Sorry about the inconvenience and we are working on a fix. If you are looking for a temporary workaround. Please read the updated instruction to downgrade to Bazel 1.1.0.

All 3 comments

Alternatively, I would just like to open this app in IntelliJ and build and run the Android APK, why can't I do that? Any steps for that would be very helpful.

When the demo project says 'GPU' is it referring to that I need CUDA GPU for Tensorflow on my Mac or GPU on Android device for TF Lite ?

I believe it's caused by using Bazel 1.2.1 on mac. Sorry about the inconvenience and we are working on a fix. If you are looking for a temporary workaround. Please read the updated instruction to downgrade to Bazel 1.1.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HebaMohamed picture HebaMohamed  路  5Comments

Bluebie picture Bluebie  路  3Comments

suraj-0387 picture suraj-0387  路  3Comments

PrinceP picture PrinceP  路  5Comments

RealBBakGosu picture RealBBakGosu  路  4Comments