mediapipe MacOS helloworld failure

Created on 26 Aug 2019  路  6Comments  路  Source: google/mediapipe

pjhuang-macbookpro:mediapipe pjhuang$ bazel run --define MEDIAPIPE_DISABLE_GPU=1

mediapipe/examples/desktop/hello_world:hello_world

DEBUG: Rule 'build_bazel_rules_apple' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "6c9fcae7a3597aabd43f28be89466afe0eab18de", shallow_since = "1565379803 -0700" and dropping ["tag"]
DEBUG: Call stack for the definition of repository 'build_bazel_rules_apple' which is a git_repository (rule definition at /private/var/tmp/_bazel_pjhuang/afa06e99810fc5bceaeb2263198f79fa/external/bazel_tools/tools/build_defs/repo/git.bzl:181:18):

  • /Users/pjhuang/mediapipe/WORKSPACE:251:1
    INFO: Analyzed target //mediapipe/examples/desktop/hello_world:hello_world (0 packages loaded, 0 targets configured).
    INFO: Found 1 target...
    ERROR: /private/var/tmp/_bazel_pjhuang/afa06e99810fc5bceaeb2263198f79fa/external/com_github_glog_glog/BUILD.bazel:68:1: C++ compilation of rule '@com_github_glog_glog//:glog' failed (Exit 1) cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 36 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/com_github_glog_glog/src/logging.cc:1227:3: error: use of undeclared identifier 'RawLog__SetLastTime'
RawLog__SetLastTime(data_->tm_time_, usecs);
^
1 error generated.
Target //mediapipe/examples/desktop/hello_world:hello_world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.997s, Critical Path: 0.89s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

pjhuang-macbookpro:mediapipe pjhuang$ bazel version
Build label: 0.28.1-homebrew
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jul 19 16:09:50 2019 (1563552590)
Build timestamp: 1563552590
Build timestamp as int: 1563552590

awaiting user response build desktop

All 6 comments

I have this issue too.

me too on macos

It seems to be a compatibility issue between Mediapipe and OpenCV4.1.1 on macos.
The glog v0.4.0 installed by brew for OpenCV4.1.1 somehow is not compatible with the glog v0.3.5 used by MediaPipe.

We are working on a fix. For now, a temporary workaround could be

$ brew uninstall --ignore-dependencies glog
$ bazel clean --expunge
$ bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world

In https://github.com/google/mediapipe/commit/785d266e3fb77fc15ab96570b40ac8cafd26c6a0, we switched the default OpenCV version to 3.4.5 on macos.

You can do the following steps to switch the opencv dependency and rebuild the hello world example:

brew uninstall opencv
brew uninstall --ignore-dependencies glog
brew install opencv@3
git pull
bazel clean --expunge
export GLOG_logtostderr=1 && bazel run --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/hello_world:hello_world

We are closing this issue for now due to lack of activity. Please comment if this is still an issue for you.

FYI using opencv@3 on it's own didn't work for me. I still had to run brew uninstall --ignore-dependencies glog afterwards. I had never run brew install opencv (without the @ version qualifier)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Devin0202 picture Devin0202  路  5Comments

calvin422 picture calvin422  路  3Comments

Rakeshvcr picture Rakeshvcr  路  4Comments

dgrnd4 picture dgrnd4  路  4Comments

suyashjoshi picture suyashjoshi  路  3Comments