构建错误....导致 mediapipe aar 错误

问题描述 投票:0回答:0

现在我正在为 mediapipe 示例构建 android aar。但因以下错误而失败

如何解决错误并构建 aar?

在 Mac Pro M1 (13.0.1) 上

Mac M1 不支持?制作aar?

以下是构建命令

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

以下是错误日志



/mediapipe/mediapipe/gpu/BUILD:103:11: Illegal ambiguous match on configurable attribute "linkopts" in //mediapipe/gpu:gl_base:
//mediapipe:android
//mediapipe:macos
Multiple matches are not allowed unless one is unambiguously more specialized.
INFO: Repository eigen_archive instantiated at:
  /Users/sjmyeong/mediapipe/mediapipe/WORKSPACE:512:14: in <toplevel>
  /private/var/tmp/_bazel_dd/dfe6c1cb11887963760080ded44a6de9/external/org_tensorflow/tensorflow/workspace2.bzl:988:28: in workspace
  /private/var/tmp/_bazel_dd/dfe6c1cb11887963760080ded44a6de9/external/org_tensorflow/tensorflow/workspace2.bzl:67:11: in _initialize_third_party
  /private/var/tmp/_bazel_dd/dfe6c1cb11887963760080ded44a6de9/external/org_tensorflow/third_party/eigen3/workspace.bzl:14:20: in repo
  /private/var/tmp/_bazel_dd/dfe6c1cb11887963760080ded44a6de9/external/org_tensorflow/third_party/repo.bzl:136:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
  /private/var/tmp/_bazel_dd/dfe6c1cb11887963760080ded44a6de9/external/org_tensorflow/third_party/repo.bzl:89:35: in <toplevel>
INFO: Repository android_opencv instantiated at:
  /Users/sjmyeong/mediapipe/mediapipe/WORKSPACE:359:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_dd/dfe6c1cb11887963760080ded44a6de9/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in <toplevel>
ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/test:mediapipe_face_detection.aar' failed; build aborted: 
INFO: Elapsed time: 5.168s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (119 packages loaded, 7856 targets configured)
    Fetching repository @local_config_xcode; Fetching the default Xcode version
    Fetching https://storage.googleapis.com/.../archive/0b51f763cbbd0ed08168f88972724329f0375498/eigen-0b51f763cbbd0ed08168f88972724329f0375498.tar.gz
    Fetching https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-android-sdk.zip

错误已损坏,因此无法执行任何操作。

请为这个错误添加评论~~~~

aar mediapipe
© www.soinside.com 2019 - 2024. All rights reserved.