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.07k stars 5.11k forks source link

when i use Tulsi generated Xcode project of handtracking , report error #4753

Closed chensisi0730 closed 1 year ago

chensisi0730 commented 1 year ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

No

OS Platform and Distribution

iOS

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

No response

Programming Language and version

oc

MediaPipe version

0.10.3

Bazel version

6.3.2

Solution

handtracking

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

CPU: octa-core 64-bit icelake
Clang: 14.0.3 build 1403
Git: 2.33.0 => /usr/local/bin/git
Curl: 8.1.2 => /usr/bin/curl
macOS: 13.5.1-x86_64
CLT: 14.3.1.0.1.1683849156
Xcode: 14.3.1

i build in command line is success ( bazel build -c opt --config=ios_arm64 mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp)
But when i use Tulsi generated Xcode project of handtracking , report error.

Describe the expected behaviour

success  generated Xcode project

Standalone code/steps you may have used to try to get what you need

NO

Other info / Complete Logs

ERROR: /private/var/tmp/_bazel_zhiyun/2b457a6c89375daa2c15805eefa1944d/external/local_config_cc/BUILD:84:24: in cc_toolchain_config rule @local_config_cc//:darwin_x86_64: Traceback (most recent call last):
    File "/private/var/tmp/_bazel_zhiyun/2b457a6c89375daa2c15805eefa1944d/external/local_config_cc/cc_toolchain_config.bzl", line 482, column 61, in _impl
        flags = _deterministic_libtool_flags(ctx) + [
    File "/private/var/tmp/_bazel_zhiyun/2b457a6c89375daa2c15805eefa1944d/external/local_config_cc/cc_toolchain_config.bzl", line 53, column 38, in _deterministic_libtool_flags
        if _can_use_deterministic_libtool(ctx):
    File "/private/var/tmp/_bazel_zhiyun/2b457a6c89375daa2c15805eefa1944d/external/local_config_cc/cc_toolchain_config.bzl", line 45, column 25, in _can_use_deterministic_libtool
        if _compare_versions(xcode_version, _SUPPORTS_DETERMINISTIC_MODE) >= 0:
    File "/private/var/tmp/_bazel_zhiyun/2b457a6c89375daa2c15805eefa1944d/external/local_config_cc/cc_toolchain_config.bzl", line 38, column 15, in _compare_versions
        return dv1.compare_to(apple_common.dotted_version(v2))
Error: 'NoneType' value has no field or method 'compare_to'
ERROR: /private/var/tmp/_bazel_zhiyun/2b457a6c89375daa2c15805eefa1944d/external/local_config_cc/BUILD:84:24: Analysis of target '@local_config_cc//:darwin_x86_64' failed
ERROR: Analysis of target '//mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp' failed; build aborted: 
General failure: Bazel aspects could not be built.

E4QQ图片20230904001331

kuaashish commented 1 year ago

@chensisi0730,

We are already aware of this issue, and we are diligently working towards a resolution. Kindly consider employing the officially supported Bazel version 6.1.1, as indicated in the .bazelversion file.

Furthermore, We recommend making adjustments to the configuration in the "Configs/MediaPipe.tulsigen" file located under the "MediaPipe.tulsiproj" folder.

As a temporary solution, Prepend an "@" symbol before each buildTargets path starting from Line 26, as illustrated below:


"buildTargets" : [
"@//mediapipe/examples/ios/facedetectioncpu:FaceDetectionCpuApp",
"@//mediapipe/examples/ios/facedetectiongpu:FaceDetectionGpuApp",
"@//mediapipe/examples/ios/faceeffect:FaceEffectApp",
"@//mediapipe/examples/ios/facemeshgpu:FaceMeshGpuApp",
"@//mediapipe/examples/ios/handdetectiongpu:HandDetectionGpuApp",
"@//mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp",
"@//mediapipe/examples/ios/helloworld:HelloWorldApp",
"@//mediapipe/examples/ios/holistictrackinggpu:HolisticTrackingGpuApp",
"@//mediapipe/examples/ios/iristrackinggpu:IrisTrackingGpuApp",
"@//mediapipe/examples/ios/objectdetectioncpu:ObjectDetectionCpuApp",
"@//mediapipe/examples/ios/objectdetectiongpu:ObjectDetectionGpuApp",
"@//mediapipe/examples/ios/objectdetectiontrackinggpu:ObjectDetectionTrackingGpuApp",
"@//mediapipe/examples/ios/posetrackinggpu:PoseTrackingGpuApp",
"@//mediapipe/examples/ios/selfiesegmentationgpu:SelfieSegmentationGpuApp",
"@//mediapipe/objc:mediapipe_framework_ios"

For a more comprehensive understanding of the topic, We recommend tracking this ongoing thread. Thank you

chensisi0730 commented 1 year ago

Bazel version 6.1.1

Bazel version 6.1.1 have bug , #4296 Because I modified the source code of bazel during command line build , it was successful. Should I use custom bazel in Xcode ? 2253121918

Showing Recent Issues /Users/zhiyun/work/mediapipe_work/ios/mediapipe_github/latest/mediapipe/mediapipe/modules/palm_detection/BUILD:33:26: Linking mediapipe/modules/palm_detection/palm_detection_model_loader_graph_text_to_binary_graph [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //mediapipe/modules/palm_detection:palm_detection_model_loader_graph_text_to_binary_graph)

kuaashish commented 1 year ago

@chensisi0730,

This issue is already known to us, And We are working towards the fix. As workaround, Please go though the above workaround shared And recommended to part of thread suggested. Also, let us know if this works for you. Thank you

google-ml-butler[bot] commented 1 year ago

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