首页 > 解决方案 > 构建 mediapipe 的手部跟踪示例时出错

问题描述

我正在使用 ubuntu 16.04,我正在尝试在 mediapipe 包中运行手部跟踪示例,当我使用 bazel 运行构建命令时,出现以下错误

ERROR: /home/mahtab/mediapipe/mediapipe/util/BUILD:127:11: C++ compilation of rule '//mediapipe/util:annotation_renderer' 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 60 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 60 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
mediapipe/util/annotation_renderer.cc: In function 'int mediapipe::{anonymous}::ClampThickness(int)':
mediapipe/util/annotation_renderer.cc:43:10: error: 'clamp' is not a member of 'std'
   return std::clamp(thickness, 1, kMaxThickness);
          ^~~
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: 2.912s, Critical Path: 2.56s
INFO: 154 processes: 150 internal, 4 linux-sandbox.
FAILED: Build did NOT complete successfully

标签: ubuntuubuntu-16.04bazelmediapipe

解决方案


推荐阅读