微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

mediapipe 的手动跟踪构建错误

如何解决mediapipe 的手动跟踪构建错误

运行此命令时出现错误

bazel build -c opt --define MEDIAPIPE_disABLE_GPU=1 mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu




 qwerty@ubuntu:~/mediapipe$ bazel build -c opt --define MEDIAPIPE_disABLE_GPU=1 mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu
DEBUG: Rule 'rules_foreign_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "c2cdcf55ffaf49366725639e45dedd449b8c3fe22b54e31625eb80ce3a240f1e"
DEBUG: Repository rules_foreign_cc instantiated at:
  /home/qwerty/mediapipe/WORKSPACE:42:13: in <toplevel>
Repository rule http_archive defined at:
  /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
WARNING: Download from http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/cf1e44edb908e9616030cc83d085989b8e6cd6df.tar.gz Failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/44c890cd46fd9aad2b3bf4b13c5f36d8cff795c3.tar.gz Failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'bazel_skylib' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/org_tensorflow/third_party/repo.bzl:108:14: 
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/tf_runtime/third_party/cuda/dependencies.bzl:51:10: The following command will download NVIDIA proprietary software. By using the software you agree to comply with the terms of the license agreement that accompanies the software. If you do not agree to the terms of the license agreement,do not use the software.
INFO: Build option --compilation_mode has changed,discarding analysis cache.
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "02413e4a077107711ecc21458432e7c9ba63e75e63f3fa84ae4da2d6b2c82700"
DEBUG: Repository rules_cc instantiated at:
  /home/qwerty/mediapipe/WORKSPACE:36:13: in <toplevel>
Repository rule http_archive defined at:
  /home/qwerty/.cache/bazel/_bazel_qwerty/a12d07e16a57f8d88ea378494a9d1b0e/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/ruy/archive/d37128311b445e758136b8602d1bbd2a755e115d.zip Failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed target //mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu (65 packages loaded,6134 targets configured).
INFO: Found 1 target...
INFO: From ProtoCompile mediapipe/calculators/util/rect_to_render_data_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/core/gate_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator_profile.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/internal/callback_packet_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/tool/calculator_graph_template.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/tensor/tensors_to_landmarks_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/landmarks_to_render_data_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/video/opencv_video_encoder_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/collection_has_min_size_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/labels_to_render_data_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/util/annotation_overlay_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/core/split_vector_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator_profile.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/calculators/core/gate_calculator.pb.h [for host]:
bazel-out/host/bin/external/com_google_protobuf/src: warning: directory does not exist.
ERROR: /home/qwerty/mediapipe/mediapipe/examples/desktop/BUILD:38:11: C++ compilation of rule '//mediapipe/examples/desktop:demo_run_graph_main' Failed (Exit 1): gcc Failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 61 argument(s) skipped)

Use --sandBox_debug to see verbose messages from the sandBox gcc Failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 61 argument(s) skipped)

Use --sandBox_debug to see verbose messages from the sandBox
In file included from ./mediapipe/framework/formats/image_frame_opencv.h:20,from mediapipe/examples/desktop/demo_run_graph_main.cc:22:
./mediapipe/framework/port/opencv_core_inc.h:18:10: Fatal error: opencv2/core/version.hpp: No such file or directory
   18 | #include <opencv2/core/version.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Target //mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu Failed to build
Use --verbose_failures to see the command lines of Failed build steps.
INFO: Elapsed time: 53.610s,Critical Path: 46.95s
INFO: 419 processes: 247 internal,172 linux-sandBox.
Failed: Build did NOT complete successfully

我在 VMware 上使用 Ubuntu 20.04。

python3 蟒蛇 3.8.10

我使用以下命令安装了 opencv 和 ffmpeg。

sudo apt-get install libopencv-core-dev libopencv-highgui-dev
libopencv-calib3d-dev libopencv-features2d-dev
libopencv-imgproc-dev libopencv-video-dev

gcc 和 g++ 9.3.0 版

顺便说一下,hello world 可以运行。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。