0

I'm trying to build the .aar file (android archieve) using mediapipe project on macOS, specifically the face_detection module. However, I encountered an error during the linking process of face_detection_graph_text_to_binary_graph. Here's the specific error message I received:

/Users/saurav/Documents/mediapipe/mediapipe/modules/face_detection/BUILD:99:26: Linking mediapipe/modules/face_detection/face_detection_graph_text_to_binary_graph [for tool] failed: (Exit 1): sandbox-exec failed: error executing command 
  (cd /private/var/tmp/_bazel_root/5bc38dea76c985b4052848234924bf2f/sandbox/darwin-sandbox/976/execroot/mediapipe && \
  exec env - \
    APPLE_SDK_PLATFORM=MacOSX \
    APPLE_SDK_VERSION_OVERRIDE=13.3 \
    DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
    PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/saurav/Downloads/flutter/bin/flutter/bin:/Users/saurav/Downloads/flutter/bin:/Users/saurav/.pub-cache/bin \
    SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk \
    TMPDIR=/tmp \
    XCODE_VERSION_OVERRIDE=14.3.0.14E222b \
    ZERO_AR_DATE=1 \
  /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_root/5bc38dea76c985b4052848234924bf2f/sandbox/darwin-sandbox/976/sandbox.sb /var/tmp/_bazel_root/install/f822566ff435ccaad75bcfd3b2719b0b/process-wrapper '--timeout=0' '--kill_delay=15' '--stats=/private/var/tmp/_bazel_root/5bc38dea76c985b4052848234924bf2f/sandbox/darwin-sandbox/976/stats.out' external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418/bin/mediapipe/modules/face_detection/face_detection_graph_text_to_binary_graph-2.params)

Here is my BUILD file :

load("//mediapipe/java/com/google/mediapipe:mediapipe_aar.bzl", "mediapipe_aar")

mediapipe_aar(
    name = "mediapipe_face_detection",
    calculators = ["//mediapipe/graphs/face_detection:mobile_calculators"],
)

Command :

sudo bazel build -c opt --strip=ALWAYS \
        --host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
        --fat_apk_cpu=arm64-v8a,armeabi-v7a \
        --legacy_whole_archive=0 \
        --features=-legacy_whole_archive \
        --copt=-fvisibility=hidden \
        --copt=-ffunction-sections \
        --copt=-fdata-sections \
        --copt=-fstack-protector \
        --copt=-Oz \
        --sandbox_debug \
        --copt=-fomit-frame-pointer \
        --copt=-DABSL_MIN_LOG_LEVEL=2 \
        --linkopt=-Wl,--gc-sections,--strip-all \
        //mediapipe/examples/android/aar_example:mediapipe_face_detection.aar

MediaPipe Framework Android Archive Documentation: https://developers.google.com/mediapipe/framework/getting_started/android_archive_library

Saurav Prakash
  • 588
  • 1
  • 5
  • 26
  • Does it have support for MacOs Ventura. I see many issues in [sierra](https://stackoverflow.com/questions/67932240/the-mediapipe-library-fails-to-build-on-high-sierra) – SG_Bazel May 25 '23 at 06:55
  • MediaPipe only works on Catalina 10.15.x and above. Ventura is version 13.4. – Saurav Prakash May 25 '23 at 07:19

0 Answers0