google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.82k stars 5.18k forks source link

Bazel build graph failed #4502

Closed artemsokol98 closed 9 months ago

artemsokol98 commented 1 year ago

OS Platform and Distribution

macOS 12.6

Compiler version

Apple clang version 14.0.0 (clang-1400.0.29.202)

Programming Language and version

Objective-C, Swift, Objective-C++

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

0.10.0

Bazel version

6.2.0

XCode and Tulsi versions (if iOS)

14.2.0.14C18. I use rules_xcodeproj, because Tulsi deprecated

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

No response

Describe the problem

When I try to build any example/ios (FaceMesh, FaceDetectionGpu and else), I faced with graph errors.

Complete Logs

artemsokolovskiy@Artems-iMac mediapipe % bazel build mediapipe/examples/ios/facemeshgpu:FaceMeshGpuApp --verbose_failures --sandbox_debug
WARNING: /Users/artemsokolovskiy/Mediapipe2/mediapipe/mediapipe/framework/BUILD:56:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
WARNING: /Users/artemsokolovskiy/Mediapipe2/mediapipe/mediapipe/framework/tool/BUILD:197:24: in cc_library rule //mediapipe/framework/tool:field_data_cc_proto: target '//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
INFO: Analyzed target //mediapipe/examples/ios/facemeshgpu:FaceMeshGpuApp (5 packages loaded, 49 targets configured).
INFO: Found 1 target...
ERROR: /Users/artemsokolovskiy/Mediapipe2/mediapipe/mediapipe/graphs/face_mesh/BUILD:64:23: Linking mediapipe/graphs/face_mesh/face_mesh_mobile_gpu_binary_graph_text_to_binary_graph [for tool] failed: (Exit 1): sandbox-exec failed: error executing command 
  (cd /private/var/tmp/_bazel_artemsokolovskiy/91f460263cc1ebd6995dcedc71a2c8a7/sandbox/darwin-sandbox/1502/execroot/mediapipe && \
  exec env - \
    APPLE_SDK_PLATFORM=MacOSX \
    APPLE_SDK_VERSION_OVERRIDE=13.1 \
    DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
    PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin \
    SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk \
    TMPDIR=/var/folders/0z/d7nxqcn15qd2fy3_jgll448r0000gn/T/ \
    XCODE_VERSION_OVERRIDE=14.2.0.14C18 \
    ZERO_AR_DATE=1 \
  /usr/bin/sandbox-exec -f /private/var/tmp/_bazel_artemsokolovskiy/91f460263cc1ebd6995dcedc71a2c8a7/sandbox/darwin-sandbox/1502/sandbox.sb /var/tmp/_bazel_artemsokolovskiy/install/f822566ff435ccaad75bcfd3b2719b0b/process-wrapper '--timeout=0' '--kill_delay=15' '--stats=/private/var/tmp/_bazel_artemsokolovskiy/91f460263cc1ebd6995dcedc71a2c8a7/sandbox/darwin-sandbox/1502/stats.out' external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-0d1fe7b00ffe/bin/mediapipe/graphs/face_mesh/face_mesh_mobile_gpu_binary_graph_text_to_binary_graph-2.params)
stderr (/private/var/tmp/_bazel_artemsokolovskiy/91f460263cc1ebd6995dcedc71a2c8a7/execroot/mediapipe/bazel-out/_tmp/actions/stderr-44) 1953000 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping
Target //mediapipe/examples/ios/facemeshgpu:FaceMeshGpuApp failed to build
INFO: Elapsed time: 2.329s, Critical Path: 2.13s
INFO: 38 processes: 25 internal, 12 darwin-sandbox, 1 local.
FAILED: Build did NOT complete successfully
kuaashish commented 1 year ago

Hello @artemsokol98, Please confirm this you are using the Intel or silicon chip M1, M2 based macOS?

artemsokol98 commented 1 year ago

Hello, @kuaashish I use Intel based macOS

artemsokol98 commented 1 year ago

And also I tried face detection example on Intel iMac and on Mac mini M1, when build examples for iOS. Mediapipe v0.10.1. Xcode 14.2.
Command to produce: bazel build mediapipe/examples/ios/facedetectioncpu:FaceDetectionCpuApp --verbose_failures --copt=-fembed-bitcode --apple_bitcode=embedded

Logs for Mac mini M1: `ERROR: /Users/timuribragimov/mediapipev0.10.1/mediapipe/mediapipe/graphs/face_detection/BUILD:56:23: Linking mediapipe/graphs/face_detection/face_detection_mobile_cpu_binary_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/graphs/face_detection:face_detection_mobile_cpu_binary_graph_text_to_binary_graph) (cd /private/var/tmp/_bazel_timuribragimov/fedbca33a62f845c3a501d6b33f83488/sandbox/darwin-sandbox/1641/execroot/mediapipe && \ exec env - \ APPLE_SDK_PLATFORM=MacOSX \ APPLE_SDK_VERSION_OVERRIDE=13.1 \ PATH=/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.6.8/bin:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/2.6.0/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin \ XCODE_VERSION_OVERRIDE=14.2.0.14C18 \ ZERO_AR_DATE=1 \ external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-0d1fe7b00ffe/bin/mediapipe/graphs/face_detection/face_detection_mobile_cpu_binary_graph_text_to_binary_graph-2.params) Configuration: e9670154d5af08fa52d86e0762a1381506511f62455c5fc774c6bd94d6701f1f Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging stderr (/private/var/tmp/_bazel_timuribragimov/fedbca33a62f845c3a501d6b33f83488/execroot/mediapipe/bazel-out/_tmp/actions/stderr-724) 1953000 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping Target //mediapipe/examples/ios/facedetectioncpu:FaceDetectionCpuApp failed to build INFO: Elapsed time: 74.324s, Critical Path: 67.76s INFO: 500 processes: 80 internal, 420 darwin-sandbox. FAILED: Build did NOT complete successfully`

Logs for Intel iMac 2020: `ERROR: /Users/artemsokolovskiy/mediapipe0.10.1/mediapipe/mediapipe/graphs/face_detection/BUILD:56:23: Linking mediapipe/graphs/face_detection/face_detection_mobile_cpu_binary_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/graphs/face_detection:face_detection_mobile_cpu_binary_graph_text_to_binary_graph) (cd /private/var/tmp/_bazel_artemsokolovskiy/8ec7566841d7814b73c1b8ae8937638c/sandbox/darwin-sandbox/1944/execroot/mediapipe && \ exec env - \ APPLE_SDK_PLATFORM=MacOSX \ APPLE_SDK_VERSION_OVERRIDE=13.1 \ PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin \ XCODE_VERSION_OVERRIDE=14.2.0.14C18 \ ZERO_AR_DATE=1 \ external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt-exec-50AE0418-ST-0d1fe7b00ffe/bin/mediapipe/graphs/face_detection/face_detection_mobile_cpu_binary_graph_text_to_binary_graph-2.params) Configuration: e9670154d5af08fa52d86e0762a1381506511f62455c5fc774c6bd94d6701f1f Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging stderr (/private/var/tmp/_bazel_artemsokolovskiy/8ec7566841d7814b73c1b8ae8937638c/execroot/mediapipe/bazel-out/_tmp/actions/stderr-326) 1953000 exceeds maximum size of --experimental_ui_max_stdouterr_bytes=1048576 bytes; skipping Target //mediapipe/examples/ios/facedetectioncpu:FaceDetectionCpuApp failed to build INFO: Elapsed time: 12.650s, Critical Path: 12.39s INFO: 200 processes: 3 internal, 197 darwin-sandbox. FAILED: Build did NOT complete successfully`

kuaashish commented 1 year ago

@artemsokol98,

This issue is known to us and working towards the fix it. Please allow us sometime to share the update on this.

ndrnrc commented 1 year ago

same issue

kuaashish commented 10 months ago

Hi @artemsokol98,

Could you kindly confirm if you still require assistance with this matter? If so, we would like to inform you that our iOS app development using C++ are no longer under active maintenance, and it is unlikely that the reported issue will be resolved.

Instead, we suggest exploring our CocoaPods Version of Face Detection Task API for easier implementation in building your iOS application. This API is an improved version of our legacy Face Detection Solution. You can find more details here.

Furthermore, please refer to the associated Overview documentation and implementation instructions for iOS on this page. Additionally, note that the CocoaPods version for building the iOS app for Face Landmaker is currently in development and will be made available soon, serving as an upgraded version of the legacy Face Mesh Solution.

Should you encounter any challenges during the implementation process, we kindly request you to report them to us promptly for further assistance.

Thank you!

github-actions[bot] commented 10 months ago

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] commented 9 months ago

This issue was closed due to lack of activity after being marked stale for past 7 days.

google-ml-butler[bot] commented 9 months ago

Are you satisfied with the resolution of your issue? Yes No