superuser789 / MediaPipe-on-RaspberryPi

MediaPipe on Raspberry Pi
41 stars 3 forks source link

Mediapipe for python 3.9 #7

Open cristinabolanos opened 2 years ago

cristinabolanos commented 2 years ago

Hi! First of all, I appreciate your work maintaining this packages. Its a lot (of time compiling...). Thank you!

As we all know, Raspbian Bullseye version was released a month ago, and with it comes Python 3.9. I updated my Raspberry Pi 4 a few days ago and I realized none of this packages are compiled against this version of Python (only for Python 3.7, which is the version Buster distribution uses).

Currently, I'm trying to compile it, but I'm stuck with this error output on bdist_wheel:

ERROR: /home/pi/.cache/bazel/_bazel_pi/1948f1a68109a2dd3c67782037722f8e/external/XNNPACK/BUILD.bazel:5117:19: Compiling src/qs8-gemm/gen/8x8c4-minmax-gemmlowp-neondot.c 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 74 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
/tmp/cc39fE2n.s: Assembler messages:
/tmp/cc39fE2n.s:174: Error: selected processor does not support `vsdot.s8 q12,q10,d7[0]' in ARM mode
/tmp/cc39fE2n.s:189: Error: selected processor does not support `vsdot.s8 q7,q10,d6[0]' in ARM mode
/tmp/cc39fE2n.s:193: Error: selected processor does not support `vsdot.s8 q12,q10,d0[0]' in ARM mode
/tmp/cc39fE2n.s:200: Error: selected processor does not support `vsdot.s8 q7,q9,d6[1]' in ARM mode
/tmp/cc39fE2n.s:202: Error: selected processor does not support `vsdot.s8 q6,q10,d3[0]' in ARM mode
/tmp/cc39fE2n.s:205: Error: selected processor does not support `vsdot.s8 q12,q10,d5[0]' in ARM mode
/tmp/cc39fE2n.s:208: Error: selected processor does not support `vsdot.s8 q6,q9,d3[1]' in ARM mode
/tmp/cc39fE2n.s:210: Error: selected processor does not support `vsdot.s8 q5,q10,d2[0]' in ARM mode
/tmp/cc39fE2n.s:212: Error: selected processor does not support `vsdot.s8 q5,q9,d2[1]' in ARM mode
/tmp/cc39fE2n.s:217: Error: selected processor does not support `vsdot.s8 q4,q10,d1[0]' in ARM mode
/tmp/cc39fE2n.s:220: Error: selected processor does not support `vsdot.s8 q14,q10,d4[0]' in ARM mode
/tmp/cc39fE2n.s:221: Error: selected processor does not support `vsdot.s8 q12,q9,d7[1]' in ARM mode
/tmp/cc39fE2n.s:222: Error: selected processor does not support `vsdot.s8 q4,q9,d1[1]' in ARM mode
/tmp/cc39fE2n.s:225: Error: selected processor does not support `vsdot.s8 q14,q9,d4[1]' in ARM mode
/tmp/cc39fE2n.s:226: Error: selected processor does not support `vsdot.s8 q10,q9,d0[1]' in ARM mode
/tmp/cc39fE2n.s:231: Error: selected processor does not support `vsdot.s8 q10,q9,d5[1]' in ARM mode
/tmp/cc39fE2n.s:235: Error: selected processor does not support `vsdot.s8 q11,q9,d7[0]' in ARM mode
/tmp/cc39fE2n.s:236: Error: selected processor does not support `vsdot.s8 q15,q9,d6[0]' in ARM mode
/tmp/cc39fE2n.s:237: Error: selected processor does not support `vsdot.s8 q13,q9,d4[0]' in ARM mode
/tmp/cc39fE2n.s:240: Error: selected processor does not support `vsdot.s8 q11,q8,d7[1]' in ARM mode
/tmp/cc39fE2n.s:241: Error: selected processor does not support `vsdot.s8 q10,q9,d3[0]' in ARM mode
/tmp/cc39fE2n.s:242: Error: selected processor does not support `vsdot.s8 q15,q8,d6[1]' in ARM mode
/tmp/cc39fE2n.s:243: Error: selected processor does not support `vsdot.s8 q10,q8,d3[1]' in ARM mode
/tmp/cc39fE2n.s:244: Error: selected processor does not support `vsdot.s8 q13,q8,d4[1]' in ARM mode
/tmp/cc39fE2n.s:249: Error: selected processor does not support `vsdot.s8 q10,q9,d2[0]' in ARM mode
/tmp/cc39fE2n.s:250: Error: selected processor does not support `vsdot.s8 q10,q8,d2[1]' in ARM mode
/tmp/cc39fE2n.s:255: Error: selected processor does not support `vsdot.s8 q10,q9,d1[0]' in ARM mode
/tmp/cc39fE2n.s:256: Error: selected processor does not support `vsdot.s8 q10,q8,d1[1]' in ARM mode
/tmp/cc39fE2n.s:261: Error: selected processor does not support `vsdot.s8 q10,q9,d0[0]' in ARM mode
/tmp/cc39fE2n.s:262: Error: selected processor does not support `vsdot.s8 q10,q8,d0[1]' in ARM mode
/tmp/cc39fE2n.s:267: Error: selected processor does not support `vsdot.s8 q10,q9,d5[0]' in ARM mode
/tmp/cc39fE2n.s:268: Error: selected processor does not support `vsdot.s8 q10,q8,d5[1]' in ARM mode
/tmp/cc39fE2n.s:641: Error: selected processor does not support `vsdot.s8 q12,q8,d6[0]' in ARM mode
/tmp/cc39fE2n.s:646: Error: selected processor does not support `vsdot.s8 q7,q8,d5[0]' in ARM mode
/tmp/cc39fE2n.s:651: Error: selected processor does not support `vsdot.s8 q6,q8,d4[0]' in ARM mode
/tmp/cc39fE2n.s:656: Error: selected processor does not support `vsdot.s8 q5,q8,d3[0]' in ARM mode
/tmp/cc39fE2n.s:661: Error: selected processor does not support `vsdot.s8 q4,q8,d2[0]' in ARM mode
/tmp/cc39fE2n.s:666: Error: selected processor does not support `vsdot.s8 q9,q8,d1[0]' in ARM mode
/tmp/cc39fE2n.s:675: Error: selected processor does not support `vsdot.s8 q14,q8,d0[0]' in ARM mode
/tmp/cc39fE2n.s:679: Error: selected processor does not support `vsdot.s8 q9,q8,d7[0]' in ARM mode
/tmp/cc39fE2n.s:682: Error: selected processor does not support `vsdot.s8 q11,q8,d6[0]' in ARM mode
/tmp/cc39fE2n.s:685: Error: selected processor does not support `vsdot.s8 q15,q8,d5[0]' in ARM mode
/tmp/cc39fE2n.s:688: Error: selected processor does not support `vsdot.s8 q9,q8,d4[0]' in ARM mode
/tmp/cc39fE2n.s:693: Error: selected processor does not support `vsdot.s8 q9,q8,d3[0]' in ARM mode
/tmp/cc39fE2n.s:698: Error: selected processor does not support `vsdot.s8 q9,q8,d2[0]' in ARM mode
/tmp/cc39fE2n.s:703: Error: selected processor does not support `vsdot.s8 q9,q8,d1[0]' in ARM mode
/tmp/cc39fE2n.s:708: Error: selected processor does not support `vsdot.s8 q9,q8,d0[0]' in ARM mode
/tmp/cc39fE2n.s:713: Error: selected processor does not support `vsdot.s8 q9,q8,d7[0]' in ARM mode
Target //mediapipe/modules/face_detection:face_detection_short_range_cpu failed to build

Can anyone guess what could it be?

Also, if someone is compiling for Python 3.9, I would love some feedback on how is that going and if any compilation option changes :)

Thanks a bunch!

cristinabolanos commented 2 years ago

Just updating this issue. It seems, for now, its impossible to build this. Reading this XNNPACK issue, I think we will have to wait until the next gcc patch :(

Also, I tried building it in buster but with a custom installation of Python 3.9. Iin this case libstdc++6 is outdated for this python version as it needs support for GLIBCXX_3.4.26...