Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[onert] Armcompute 21.02 build is not working on ubuntu 24.04 #13883

Open
hseok-oh opened this issue Sep 2, 2024 · 2 comments
Open

[onert] Armcompute 21.02 build is not working on ubuntu 24.04 #13883

hseok-oh opened this issue Sep 2, 2024 · 2 comments

Comments

@hseok-oh
Copy link
Contributor

hseok-oh commented Sep 2, 2024

Build fail by build toolchain version

In file included from ./arm_compute/core/TensorShape.h:29,
                 from ./arm_compute/core/PyramidInfo.h:27,
                 from src/core/PyramidInfo.cpp:24:
./arm_compute/core/utils/misc/Utility.h: In function ‘bool arm_compute::utility::check_aligned(void*, size_t)’:
./arm_compute/core/utils/misc/Utility.h:194:35: error: ‘uintptr_t’ in namespace ‘std’ does not name a type
  194 |     return (reinterpret_cast<std::uintptr_t>(ptr) % alignment) == 0;
      |                                   ^~~~~~~~~
./arm_compute/core/utils/misc/Utility.h:32:1: note: ‘std::uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   31 | #include <vector>
  +++ |+#include <cstdint>
   32 | 
In file included from ./arm_compute/core/Types.h:28,
                 from ./arm_compute/core/PyramidInfo.h:28:
./arm_compute/core/QuantizationInfo.h: At global scope:
./arm_compute/core/QuantizationInfo.h:38:26: error: ‘uint8_t’ does not name a type
   38 | using qasymm8_t        = uint8_t;  /**< 8 bit quantized asymmetric scalar value */
      |                          ^~~~~~~

....

scons: *** [build/armv7a-linux.release/src/core/TensorInfo.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/AccessWindowTranspose.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/HOGInfo.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPUpsampleKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPDetectionWindowNonMaximaSuppressionKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/Helpers.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/ICPPSimpleKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPTopKVKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPPermuteKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/IKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/ITensor.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPNonMaximumSuppressionKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPSortEuclideanDistanceKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPCornerCandidatesKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/CPP/kernels/CPPBoxWithNonMaximaSuppressionLimitKernel.o] Error 1
scons: *** [build/armv7a-linux.release/src/core/Utils.o] Error 1
scons: building terminated because of errors.
CMake Error at cmake/packages/ARMComputeConfig.cmake:193 (message):
  ARMCOMPUTE Package: Build and install failed (check '' for details)
Call Stack (most recent call first):
  cmake/packages/ARMComputeConfig.cmake:201 (_ARMCompute_Build)
  CMakeLists.txt:45 (find_package)
  /home/nfs/git/ONE/compute/ARMComputeEx/CMakeLists.txt:1 (nnfw_find_package)


-- Configuring incomplete, errors occurred!
make: *** [Makefile.template:184: configure_internal] Error 1
@jiwaszki
Copy link
Contributor

jiwaszki commented Sep 6, 2024

@hseok-oh I also encountered similar issue while cross-compiling in docker with U24.04.

I was able to workaround it. There is a need to edit files manually by adding #include <cstdint>:

# After first run of CROSS_BUILD=1 HOST_ARCH=x86_64 TARGET_ARCH=arm64 make -f Makefile.template
externals/ARMCOMPUTE/arm_compute/core/utils/misc/Utility.h
externals/ARMCOMPUTE/arm_compute/core/Strides.h
# After second run of CROSS_BUILD=1 HOST_ARCH=x86_64 TARGET_ARCH=arm64 make -f Makefile.template
Product/aarch64-linux.debug/overlay/include/arm_compute/core/utils/misc/Utility.h
Product/aarch64-linux.debug/overlay/include/arm_compute/core/Strides.h

... however, it does not look like any proper solution (even if automated). Maybe contribution to ARMCompute is necessary here?

BTW is there any specific reason to keep v21.02 of library? If some kind of solution is merged to ARMCompute, then bump of version might be necessary.

@hseok-oh
Copy link
Contributor Author

hseok-oh commented Sep 9, 2024

@jiwaszki The simplest workaround is disable building by using OPTIONS=-DDOWNLOAD_ARMCOMPUTE=OFF with make

$ OPTIONS=-DDOWNLOAD_ARMCOMPUTE=OFF CROSS_BUILD=1 TARGET_ARCH=armv7l make -f Makefile.template

As you commented, we may need to bump up version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants