superuser789 / MediaPipe-on-RaspberryPi

MediaPipe on Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue building package

jacobhollebon opened this issue · comments

HI, I am having issues trying to build the package (step 9: python3 setup.py gen_protos && python3 setup.py bdist_wheel ) I am trying to install on a Raspberry PI 4. The Bazel installation seems fine (running 'bazel version' in terminal returns a valid build). However I get the following error

ERROR: /home/pi/mediapipe-0.8.4/mediapipe/python/BUILD:19:17: Linking mediapipe/python/_framework_bindings.so failed: (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/arm-opt/bin/mediapipe/python/_framework_bindings.so-2.params

Use --sandbox_debug to see verbose messages from the sandbox
/usr/bin/ld.gold: error: cannot find -ljpeg
/usr/bin/ld.gold: error: cannot find -ltiff
/usr/bin/ld.gold: error: cannot find -lavcodec
/usr/bin/ld.gold: error: cannot find -lavformat
/usr/bin/ld.gold: error: cannot find -lavutil
/usr/bin/ld.gold: error: cannot find -lswscale
/usr/bin/ld.gold: error: cannot find -lavresample
collect2: error: ld returned 1 exit status
Target //mediapipe/python:_framework_bindings.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3476.764s, Critical Path: 3460.99s
INFO: 1807 processes: 3 internal, 1804 linux-sandbox.
FAILED: Build did NOT complete successfully
error: command 'bazel' failed with exit status 1

Hi. Make sure that you have installed ffmpeg and OpenCV.
The dependency packages are not installed. First install them by :

sudo apt install  libjpeg-dev libtiff-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev libavresample-dev

and build mediapipe again.

HI, thanks for the help. I was able to proceed and build mediapipe fine after the above.

However now when I try to import mediapipe I get the follow error

File "/usr/local/lib/python3.7/dist-packages/mediapipe/init.py", line 16, in
from mediapipe.python import *
File "/usr/local/lib/python3.7/dist-packages/mediapipe/python/init.py", line 17, in
from mediapipe.python._framework_bindings import resource_util
ImportError: /usr/local/lib/python3.7/dist-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: _ZN3ruy28Pack8bitColMajorForNeon2ColsERKNS_14PackParams8bitE

HI, thanks for the help. I was able to proceed and build mediapipe fine after the above.

However now when I try to import mediapipe I get the follow error

File "/usr/local/lib/python3.7/dist-packages/mediapipe/init.py", line 16, in
from mediapipe.python import *
File "/usr/local/lib/python3.7/dist-packages/mediapipe/python/init.py", line 17, in
from mediapipe.python._framework_bindings import resource_util
ImportError: /usr/local/lib/python3.7/dist-packages/mediapipe/python/_framework_bindings.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: _ZN3ruy28Pack8bitColMajorForNeon2ColsERKNS_14PackParams8bitE

Your error seems like these kind of issues.
Did you follow all the steps exactly ? Made any changes ?
Did you build ffmpeg and opencv ? or Installed from official repository ?