bazelbuild / bazel

a fast, scalable, multi-language and extensible build system
https://bazel.build
Apache License 2.0
23.32k stars 4.1k forks source link

the clang compiler does not support '-march=armv8.2-a+i8mm' #19359

Open xieningtao opened 1 year ago

xieningtao commented 1 year ago

Description of the bug:

compile tensorflow on mac

bazelversion: 6.1.0 ndk: 21

exception: the clang compiler does not support '-march=armv8.2-a+i8mm'

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

iancha1992 commented 1 year ago

@xieningtao can you please try with the newest bazel version (6.4.0)? If that does not also work, then please include infos such as the logs or outputs from the console/terminal, as well as the repo (if possible) to reproduce the issue for us. Thank you!

williammm001 commented 1 year ago

I also meet this bug when building the TFLite for andriod following the instructions (https://www.tensorflow.org/lite/android/lite_build).

The full message is: ERROR: /root/.cache/bazel/_bazel_root/68a62076e91007a7908bc42a32e4cff9/external/XNNPACK/BUILD.bazel:3291:19: Compiling src/amalgam/gen/neoni8mm.c failed: (Exit 1): clang failed: error executing command (from target @XNNPACK//:neoni8mm_amalgam_microkernels) external/androidndk/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -gcc-toolchain external/androidndk/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -target ... (remaining 65 arguments skipped) clang: error: the clang compiler does not support '-march=armv8.2-a+i8mm' Target //tensorflow/lite/java:tensorflow-lite failed to build

xieningtao commented 1 year ago

I try an old version of tensorFlow,it's ok。 config: tensorflow: 2.10.0 python:3.10.9 bazel:default version(5.1.1) ndk:21 sdk: default version

xieningtao commented 1 year ago

@xieningtao can you please try with the newest bazel version (6.4.0)? If that does not also work, then please include infos such as the logs or outputs from the console/terminal, as well as the repo (if possible) to reproduce the issue for us. Thank you!

6.4.0 hasn't released yet and I have tried version 6.3.0, it still does not work.

iancha1992 commented 1 year ago

@xieningtao Sorry, I meant 6.3.2. But still, thanks for the input. We'll try to get back to you as soon as possible. Thanks!

terryheo commented 1 year ago

If it's a Android build, could you try to use NDK r25c ? https://developer.android.com/ndk/downloads#lts-downloads

Or you can add --define=xnn_enable_arm_i8mm=false to workaround this with older toolchains.

himasagarpotnuru commented 6 months ago

Hey, I am stuck here,

ERROR: /home/hima/.cache/bazel/bazel_hima/54eca7e24850c4d5f13ed1480ddc6303/external/XNNPACK/BUILD.bazel:1527:19: Compiling src/amalgam/gen/neoni8mm.c failed: (Exit 1): clang failed: error executing command (from target @XNNPACK//:neoni8mm_prod_microkernels) external/androidndk/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang '-DANDROIDAPI=21' -isystemexternal/androidndk/ndk/sysroot/usr/include/arm-linux-androideabi -target ... (remaining 55 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging clang: error: the clang compiler does not support '-march=armv8.2-a+i8mm+fp16' Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/facemeshgpu:facemeshgpu failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 186.483s, Critical Path: 111.81s INFO: 886 processes: 286 internal, 600 processwrapper-sandbox. FAILED: Build did NOT complete successfully

Could you please help me to fix this one?

orange-Pai commented 4 months ago

anything update?

kaka-lin commented 3 months ago

anything update?