ComputeLibrary icon indicating copy to clipboard operation
ComputeLibrary copied to clipboard

AArch64 build failure on gcc 4.8

Open afaerber opened this issue 9 years ago • 7 comments

For Linux, the library was successfully built and tested using the following Linaro GCC toolchain: gcc-linaro-arm-linux-gnueabihf-4.8-2014.02_linux and gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabihf

While v17.03.1 builds fine on openSUSE Tumbleweed with our gcc 6.3.1 for both armv7a and arm64-v8a, it fails to build on openSUSE Leap 42.{1,2,3} (SLES 12 SP{1,2,3}) with our gcc 4.8.5 for arm64-v8a:

[  150s] g++ -o build/src/core/NEON/kernels/NEConvolutionKernel.o -c -D_GLIBCXX_USE_NANOSLEEP -Wno-deprecated-declarations -Wall -DARCH_ARM -Wextra -Wno-unused-parameter -pedantic -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Wstrict-overflow=2 -Wswitch-default -fpermissive -std=c++11 -Wno-vla -Woverloaded-virtual -Wctor-dtor-privacy -Wsign-promo -Weffc++ -Wno-format-nonliteral -Wno-overlength-strings -Wno-strict-overflow -Wlogical-op -Wnoexcept -Wstrict-null-sentinel -march=armv8-a -O3 -ftree-vectorize -Ibuild -I. -Iinclude src/core/NEON/kernels/NEConvolutionKernel.cpp
[  156s] In file included from src/core/NEON/kernels/NEConvolutionKernel.cpp:37:0:
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h: In member function 'void arm_compute::NESeparableConvolutionHorKernel<matrix_size>::convolve(const arm_compute::Window&) [with OutputType = int; unsigned int matrix_size = 5u]':
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:12175:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:12175:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  156s] /usr/lib64/gcc/aarch64-suse-linux/4.8/include/arm_neon.h:9852:32: error: 'asm' operand requires impossible reload
[  156s]             : /* No clobbers */);
[  156s]                                 ^
[  162s] scons: *** [build/src/core/NEON/kernels/NEConvolutionKernel.o] Error 1

Which compilers did you build your 64-bit binaries with?

afaerber avatar Apr 03 '17 22:04 afaerber

Hi, At the moment instructions for AArch64 Linux (4.8 is for armv7a only) are missing from the documentation because we're still waiting to receive devices to test on. (They've been ordered, just waiting to receive them). We've successfully managed to build the library with gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu Documentation will be updated in the next update.

AnthonyBarbier avatar Apr 03 '17 22:04 AnthonyBarbier

Just curious, what devices are you going to use?

MineFuehrer avatar Apr 03 '17 22:04 MineFuehrer

https://developer.arm.com/technologies/compute-library mentions HiSilicon Kirin 960, which hints at the upcoming HiKey 960?

afaerber avatar Apr 03 '17 23:04 afaerber

sconscript has a gcc version check for arm64-v8.2-a, so if someone could confirm with a Linaro toolchain that 4.8 does not work, you could require 4.9 as minimum version for arm64-v8a.

afaerber avatar Apr 03 '17 23:04 afaerber

Yes, that's a good point, we will add a compiler check. From the GCC changelog it looks like the AArch64 support was added in 4.8 but more work was done related to NEON in 4.9 which is probably why the support is flaky in 4.8

Regarding the Linux platforms: you're right we're waiting for the HiKey 960, but in the meantime we're going to start using the Firefly RK3399

AnthonyBarbier avatar Apr 04 '17 09:04 AnthonyBarbier

If someone knew where exactly this got fixed, I could also file a bug against our gcc48 package to get a patch applied, in which case a version check would be counter-productive.

For now I have resorted to using gcc5 on those platforms.

afaerber avatar Apr 04 '17 11:04 afaerber

Closing this issue as we updated the minimum gcc version to 4.9.

GeorgeARM avatar May 04 '17 11:05 GeorgeARM