在Raspberry Pi 4(Raspbian操作系统64位)上设置媒体管道时出错并生成失败



我是Raspberry Pi和Mediapipe的新手。我遵循以下步骤:https://spyjetson.blogspot.com/2021/06/installing-mediapipecpu-mode-on.html

但在这一步:root@raspberrypi:/usr/local/src/mediapipe#python3 setup.py bdist_wheel

我得到错误和建立失败的

错误是:

ERROR: /usr/local/src/mediapipe/mediapipe/framework/stream_handler/BUILD:95:11: C++ compilation of rule '//mediapipe/framework/stream_handler:default_input_stream_handler' 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 55 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 55 argument(s) skipped)
Use --sandbox_debug to see verbose messages from the sandbox
In file included from <command-line>:
/usr/include/stdc-predef.h: In substitution of 'template<class _Functor, class, class> std::function<std::unique_ptr<mediapipe::InputStreamHandler>(std::shared_ptr<mediapipe::tool::TagMap>, mediapipe::CalculatorContextManager*, const mediapipe::MediaPipeOptions&, bool)>::function(_Functor) [with _Functor = <missing>; <template-parameter-1-2> = <missing>; <template-parameter-1-3> = <missing>]':
mediapipe/framework/stream_handler/default_input_stream_handler.cc:24:1:   required from here
/usr/include/stdc-predef.h:32:94: internal compiler error: Segmentation fault
32 |    whether the overall intent is to support these features; otherwise,
|                                                                                              ^                         
0x7fa3cab217 __libc_start_main
../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
Target //mediapipe/modules/face_detection:face_detection_short_range_cpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 853.907s, Critical Path: 792.14s
INFO: 990 processes: 130 internal, 860 linux-sandbox.
FAILED: Build did NOT complete successfully

在我的案例中,这是一个GCC问题。我把等级从10降到了9,然后它就编译了。

sudo apt install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9

最新更新