mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Build fails for Coral - Docker gcc too old for XNNPACK?

Open tonystratum opened this issue 1 year ago • 8 comments

OS Platform and Distribution

debian buster (Docker)

Compiler version

gcc8.3 (docker)

Programming Language and version

c++

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

0.10.11

Bazel version

as per .bazelversion

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

No response

Describe the problem

A bug happened!

Complete Logs

ERROR: /root/.cache/bazel/_bazel_root/4884d566396e9b67b62185751879ad14/external/XNNPACK/BUILD.bazel:1519:19: Compiling src/amalgam/gen/neoni8mm.c failed: (Exit 1): aarch64-linux-gnu-gcc failed: error executing command (from target @XNNPACK//:neoni8mm_prod_microkernels) /usr/bin/aarch64-linux-gnu-gcc -fPIC -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-march=armv8-a' -g0 -O3 -DNDEBUG ... (remaining 39 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
cc1: error: invalid feature modifier in '-march=armv8.2-a+i8mm+fp16'
Target //mediapipe/examples/coral:object_detection_tpu failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 149.181s, Critical Path: 11.07s
INFO: 499 processes: 263 internal, 236 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

tonystratum avatar Apr 25 '24 13:04 tonystratum

Have you solved it yet?

I met same problem... I think this problem comes from bazel instead of mediapipe

FunnyWii avatar Apr 28 '24 03:04 FunnyWii

I Solved this problem via upgrading gcc&g++ from 9 to 10.

FunnyWii avatar Apr 28 '24 05:04 FunnyWii

Hi @tonystratum,

Can you try out the suggestion mentioned by @FunnyWii, And please let us know if this still an issue?

Thank you!!

kuaashish avatar Apr 30 '24 07:04 kuaashish

@kuaashish certainly will try! @FunnyWii have you upgreaded the compiler within docker build environment? If so, how? Thanks

tonystratum avatar May 01 '24 14:05 tonystratum

@FunnyWii @kuaashish built gcc 10.5.0 inside the debian:buster image, still Error: unrecognized option -march=armv8.2-a+i8mm+fp16

tonystratum avatar May 01 '24 18:05 tonystratum

@FunnyWii please, could You share the steps for upgrading the toolchain?

tonystratum avatar May 02 '24 05:05 tonystratum

@FunnyWii please, could You share the steps for upgrading the toolchain?

sry for the late response, I update gcc via sudo apt install gcc-10

My platform is Jetson Orin NX

FunnyWii avatar May 06 '24 02:05 FunnyWii

@FunnyWii Yeah no worries, thanks! @kuaashish I just wanted to know if Coral TPU is still supported at this point. The Coral's Mendel Linux is based on Debian Buster, and the toolchain there (gcc-9) does not compile the fresh XNNPACK (what @FunnyWii is actually saying). We would need to update toolchain on both the Mendel linux and the docker build environment here

tonystratum avatar May 06 '24 08:05 tonystratum

Hi @tonystratum,

Currently, the new Task API supports Edge devices such as the Raspberry Pi 4, as mentioned on the referenced page. For legacy solutions, we supported the Coral TPU, If this is the case, we will not be able to assist you, as support for the legacy solution has completely ended.

Thank you!!

kuaashish avatar May 17 '24 08:05 kuaashish

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar May 25 '24 01:05 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar Jun 01 '24 01:06 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Jun 01 '24 01:06 google-ml-butler[bot]