ARM-software / ComputeLibrary

The Compute Library is a set of computer vision and machine learning functions optimised for both Arm CPUs and GPUs using SIMD technologies.
MIT License
2.76k stars 767 forks source link

Build ACL22_05 failed with aarch64-linux-android-ar: Permission denied #984

Closed BrainSurgeAI closed 2 years ago

BrainSurgeAI commented 2 years ago

Hi, when I build library with NDK r23b use command scons arch=arm64-v8a neon=1 opencl=1 embed_kernels=1 extra_cxx_flags="-fPIC" benchmark_tests=0 validation_tests=0 os=android -j16 occurs errors:

sh: 1: aarch64-linux-android-ar: Permission denied

企业微信截图_16566594203718

morgolock commented 2 years ago

Hi @Chernobyl81

There is a permissions problem with your host environment or toollchain.

In your build command: scons arch=arm64-v8a neon=1 opencl=1 embed_kernels=1 extra_cxx_flags="-fPIC" benchmark_tests=0 validation_tests=0 os=android -j16 you don't specify the path to the toolchain so I'm not sure how and where scons finds aarch64-linux-android-ar and aarch64-linux-android-clang++.

Did you add the toolchain path to the $PATH variable? If so what happens if you manually try to run aarch64-linux-android-ar ?

BrainSurgeAI commented 2 years ago

@morgolock Thanks for reply so quickly! I added toolchain to the $PATH variable. 企业微信截图_16566664542192

In my $NDK/toolchains/llvm/prebuilt/linux-x86_64/bin folder, aarch64-linux-android-ar does not exist. 企业微信截图_16566668012237

morgolock commented 2 years ago

Hi @Chernobyl81

Please try to specify the archiver tool as show below with the AR=llvm-ar variable:

AR=llvm-ar CXX=clang++ CC=clang PATH=../../toolchains/android-ndk-r24/toolchains/llvm/prebuilt/linux-x86_64/bin/:$PATH scons neon=1 opencl=0 benchmark_tests=0 validation_tests=1 benchmark_examples=1 standalone=0 os=android Werror=0 test_filter=ActivationLayer.cpp compiler_prefix=aarch64-linux-android31- toolchain_prefix=llvm- arch=arm64-v8.2-a-sve -j8

Hope this helps.

BrainSurgeAI commented 2 years ago

Hi, @morgolock When I set neon=0, it works fine. Building occurs errors when I set neon=1 企业微信截图_16568994782244

morgolock commented 2 years ago

Hi @Chernobyl81

Please try with arch=armv8a instead of arch=arm64-v8.2-a-sve

Hope this helps

BrainSurgeAI commented 2 years ago

Wow, it works, thanks a lot! @morgolock