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.
2.87k stars 782 forks source link

build errror for RK 3588S Ubuntu Jammy #1005

Closed toplinuxsir closed 1 year ago

toplinuxsir commented 2 years ago

Chip info

SoC: Rockchip RK3588S
CPU: Quad-core ARM Cortex-A76(up to 2.4GHz) and quad-core Cortex-A55 CPU (up to 1.8GHz)
GPU: Mali-G610 MP4, compatible with OpenGLES 1.1, 2.0, and 3.2, OpenCL up to 2.2 and Vulkan1.2
VPU: 8K@60fps H.265 and VP9 decoder, 8K@30fps H.264 decoder, 4K@60fps AV1 decoder, 8K@30fps H.264 and H.265 encoder
NPU: 6TOPs, supports INT4/INT8/INT16/FP16

error:

In file included from src/core/ITensorPack.cpp:24:                                                                                                                             
./arm_compute/core/ITensorPack.h:89:5: error: ‘size_t’ does not name a type
   89 |     size_t size() const;
      |     ^~~~~~
./arm_compute/core/ITensorPack.h:29:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
   28 | #include <map>
  +++ |+#include <cstddef>
   29 | 
src/core/ITensorPack.cpp:56:8: error: no declaration matches ‘size_t arm_compute::ITensorPack::size() const’
   56 | size_t ITensorPack::size() const
      |        ^~~~~~~~~~~
src/core/ITensorPack.cpp:56:8: note: no functions named ‘size_t arm_compute::ITensorPack::size() const’
In file included from src/core/ITensorPack.cpp:24:
./arm_compute/core/ITensorPack.h:36:7: note: ‘class arm_compute::ITen
zhangqicai commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

morgolock commented 2 years ago

Hi @toplinuxsir

What version of ACL are you building?

Could you please share the build command you used?

The output of g++ --version or aarch64-linux-gnu-g++ --version will also help.

toplinuxsir commented 2 years ago

@morgolock

aarch64-linux-gnu-g++ --version
aarch64-linux-gnu-g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
morgolock commented 2 years ago

Hi @toplinuxsir I suppose you are making a native build and gcc 11.3.0 is the toolchain installed on your device, is this right? Could you share the command you use to build the library?

This looks like a problem with the toolchain 11.3.0. I built ACL successfully with gcc 11.2.0 and 12.2.0. Unfortunately I don't have access to a device like yours.

You could try downloading a different version of gcc from https://developer.arm.com/downloads/-/gnu-a or even updating your system to use a different version of gcc.

Alternatively you could add #include <cstdlib> to the top of ./arm_compute/core/ITensorPack.h

Hope this helps