1

I am trying to compile the latest version (v0.8.5) of mediapipe library with gcc ver 11.1.0 and bazel ver 3.7.2 on my MacBook Pro running High Sierra.

After following all the installation steps as mentioned on mediapipe GitHub site, I am able to run the HelloWorld example successfully as below.

bazel run --define MEDIAPIPE_DISABLE_GPU=1 \
    mediapipe/examples/desktop/hello_world:hello_world

I , then , followed the steps to run the YouTube-8M feature extraction graph and when I try to run mediapipe binary to extract features as below, it fails in compilation.

bazel build -c opt --linkopt=-s \
  --define MEDIAPIPE_DISABLE_GPU=1 --define no_aws_support=true \
  mediapipe/examples/desktop/youtube8m:extract_yt8m_features

The error I got is below

ERROR: /Users/xxx/Documents/ml-projects/FeatureExtraction/mediapipe/mediapipe/examples/desktop/youtube8m/BUILD:17:10 C++ compilation of rule '@org_tensorflow//tensorflow/core/platform:tensor_coding' 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 -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 69 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox 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 -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 69 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
INFO: Elapsed time: 13.351s, Critical Path: 8.50s
INFO: 333 processes: 130 internal, 203 darwin-sandbox.
FAILED: Build did NOT complete successfully

Can someone please help provide pointers to resolve this issue ?

I have tried using older gcc versions - 10 and 4 - with no success. I also tried to use older version 0.8.1 of mediapipe with no success again.

All the required python libraries as mentioned in the installation steps are also installed.

Greenonline
  • 1,330
  • 8
  • 23
  • 31
aks20000
  • 11
  • 1

1 Answers1

0

TL;DR - High Sierra is not supported by MediaPipe


I too had many issues trying to install MediaPipe on High Sierra (10.13.6), as detailed on my blog, MediaPipe install fails on OS X. These issues were on both 2010 and 2011 MacBook Pros (which are limited to High Sierra (10.13.6).

I had to buy a slightly newer 2012 MBP (13" i7) - which runs Mavericks (10.14) and Catalina (10.15) - in order to run a version of OS X compatible with MediaPipe.

Apparently MediaPipe only works on Catalina 10.15.x and above, see:

From this post:

MediaPipe PyPI supports macOS 10.15 and above. See https://github.com/google/mediapipe/blob/master/docs/getting_started/troubleshooting.md#python-pip-install-failure.

However, you use could use a Docker image on High Sierra - again from my blog:

There is also a Docker install for mediapipe, see Installing using Docker. See also Docker for High Sierra.

Greenonline
  • 1,330
  • 8
  • 23
  • 31