Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel doesn't build ios mediapipe examples #4714

Closed
chensisi0730 opened this issue Aug 22, 2023 · 9 comments
Closed

Bazel doesn't build ios mediapipe examples #4714

chensisi0730 opened this issue Aug 22, 2023 · 9 comments
Assignees
Labels
legacy:hands Hand tracking/gestures/etc platform:c++ Issues specific to C++ framework in mediapipe platform:ios MediaPipe IOS issues type:build/install For Build and Installation issues

Comments

@chensisi0730
Copy link

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

None

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

lastest

Bazel version

5.2

Solution

handtrackinggpu

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

Python 3.9.12
bazel 5.2.0
xcode 13.3.1 
macOS 12.3.1 (21E258)



bazel build -c opt --config=ios_arm64 mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp
ERROR: /Users/sisichen/work/mediapipe_work/mediapipe/mediapipe/examples/ios/handtrackinggpu/BUILD:34:16: ProcessEntitlementsFiles mediapipe/examples/ios/handtrackinggpu/HandTrackingGpuApp_entitlements.entitlements failed: (Exit 1): plisttool failed: error executing command bazel-out/host/bin/external/build_bazel_rules_apple/tools/plisttool/plisttool ... (remaining 1 argument skipped)

Describe the expected behaviour

I tried to build HandTrackingExample and get this error

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

1

Other info / Complete Logs

No response

@chensisi0730 chensisi0730 added the type:bug Bug in the Source Code of MediaPipe Solution label Aug 22, 2023
@kuaashish
Copy link
Collaborator

kuaashish commented Aug 22, 2023

@chensisi0730,

From the description, We can see that you are using the Bazel Version 5.2.0, Supported Version of Bazel is 6.1.1 as noted here in .bazelversion.

Please use the recommended version And revert back if encounter any error. Thank you

@kuaashish kuaashish added type:build/install For Build and Installation issues legacy:hands Hand tracking/gestures/etc platform:ios MediaPipe IOS issues platform:c++ Issues specific to C++ framework in mediapipe stat:awaiting response Waiting for user response and removed type:bug Bug in the Source Code of MediaPipe Solution labels Aug 22, 2023
@chensisi0730
Copy link
Author

chensisi0730 commented Aug 23, 2023

@chensisi0730,

From the description, We can see that you are using the Bazel Version 5.2.0, Supported Version of Bazel is 6.1.1 as noted here in .bazelversion.

Please use the recommended version And revert back if encounter any error. Thank you

when using the Bazel Version 6.1.1 ,
ERROR: /Users/sisichen/work/mediapipe_work/mediapipe_newest/mediapipe/mediapipe/examples/ios/handtrackinggpu/BUILD:34:16: in ios_application rule //mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp:
Traceback (most recent call last):
File "/private/var/tmp/_bazel_sisichen/a7fca234246f4255617eb5320eaa20b9/external/build_bazel_rules_apple/apple/internal/ios_rules.bzl", line 160, column 61, in _ios_application_impl
entitlements = entitlements_support.process_entitlements(
File "/private/var/tmp/_bazel_sisichen/a7fca234246f4255617eb5320eaa20b9/external/build_bazel_rules_apple/apple/internal/entitlements_support.bzl", line 273, column 24, in _process_entitlements
_validate_bundle_id(bundle_id)
File "/private/var/tmp/_bazel_sisichen/a7fca234246f4255617eb5320eaa20b9/external/build_bazel_rules_apple/apple/internal/entitlements_support.bzl", line 215, column 25, in _validate_bundle_id
fail("Invalid character(s) in bundle_id: "%s"" % bundle_id)
Error in fail: Invalid character(s) in bundle_id: "SEE_IOS_INSTRUCTIONS.mediapipe.examples.HandTrackingGpu"
ERROR: /Users/sisichen/work/mediapipe_work/mediapipe_newest/mediapipe/mediapipe/examples/ios/handtrackinggpu/BUILD:34:16: Analysis of target '//mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp' failed
ERROR: Analysis of target '//mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp' failed; build aborted:

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Aug 23, 2023
@kuaashish
Copy link
Collaborator

@chensisi0730,

Please change bundle_id to the same one which you set at Provisioning Profile in file mediapipe/mediapipe/examples/ios/handtrackinggp/BUILD As below OR you can follow this example section build-from-terminal to set up the bundle_id:

bundle_id = BUNDLE_ID_PREFIX + ".HandTrackingGpu",
         
bundle_id = "(Bundle Identifier)",

And revert back if you encounter further issue. Thank you

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Aug 23, 2023
@chensisi0730
Copy link
Author

@chensisi0730,

Please change bundle_id to the same one which you set at Provisioning Profile in file mediapipe/mediapipe/examples/ios/handtrackinggp/BUILD As below OR you can follow this example section build-from-terminal to set up the bundle_id:

bundle_id = BUNDLE_ID_PREFIX + ".HandTrackingGpu",
         
bundle_id = "(Bundle Identifier)",

And revert back if you encounter further issue. Thank you

ERROR: /private/var/tmp/_bazel_sisichen/1f8802ff93599cb6b7c44b8093081bf5/external/bazel_tools/platforms/BUILD:19:6: in alias rule @bazel_tools//platforms:x86_64: Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms. See bazelbuild/bazel#8622 for details.
ERROR: /private/var/tmp/_bazel_sisichen/1f8802ff93599cb6b7c44b8093081bf5/external/bazel_tools/platforms/BUILD:19:6: Analysis of target '@bazel_tools//platforms:x86_64' failed
ERROR: /Users/sisichen/work/mediapipe_work/mediapipe/mediapipe/examples/ios/handtrackinggpu/BUILD:34:16: While resolving toolchains for target //mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp: Target @local_execution_config_platform//:platform was referenced as a platform, but does not provide PlatformInfo
ERROR: Analysis of target '//mediapipe/examples/ios/handtrackinggpu:HandTrackingGpuApp' failed; build aborted:

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Aug 23, 2023
@schmidt-sebastian
Copy link
Collaborator

@chensisi0730 Can you confirm that you are still seeing this issue with the latest master? We reverted the change that introduced Bazel platform support.

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Aug 23, 2023
@chensisi0730
Copy link
Author

chensisi0730 commented Aug 24, 2023

ERROR: /private/var/tmp/_bazel_sisichen/a7fca234246f4255617eb5320eaa20b9/external/org_tensorflow/tensorflow/lite/delegates/gpu/common/transformations/BUILD:59:11: Compiling tensorflow/lite/delegates/gpu/common/transformations/fuse_add_to_conv.cc failed: (Aborted): wrapped_clang_pp failed: error executing command external/local_config_cc/wrapped_clang_pp '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG ... (remaining 36 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/org_tensorflow/tensorflow/lite/delegates/gpu/common/transformations/fuse_add_to_conv.cc:40:14: error: no matching function for call to 'get_if'
auto add = absl::get_if<Tensor<Linear, DataType::FLOAT32>>(&add_attr.param);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/com_google_absl/absl/types/variant.h:393:34: note: candidate template ignored: could not match 'absl::variant' against 'std::variant'

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Aug 24, 2023
@kuaashish kuaashish added the stat:awaiting googler Waiting for Google Engineer's Response label Aug 24, 2023
@google-ml-butler
Copy link

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

@kuaashish kuaashish removed the stat:awaiting googler Waiting for Google Engineer's Response label Sep 11, 2023
@AphroDatalyst
Copy link

i have the same problem,
fail("Invalid character(s) in bundle_id: "%s"" % bundle_id)
not solved yet!

@schmidt-sebastian
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:hands Hand tracking/gestures/etc platform:c++ Issues specific to C++ framework in mediapipe platform:ios MediaPipe IOS issues type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

4 participants