Bug 13356

Summary: libabseil-cpp: not building for raspberry pi
Product: buildroot Reporter: Michael Nosthoff <buildroot>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: 2020.11   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: HACK: package/libabseil-cpp: disable hardware accelaration on arm

Description Michael Nosthoff 2020-12-04 09:32:26 UTC
I just stumbled across this but currently don't have the time to investigate further.

libabseil-cpp fails to compile for raspberry pi targets with the following error:

In file included from /build/build/build/libabseil-cpp-20200923.2/absl/random/internal/randen_hwaes.cc:229:
/build/build/host/opt/ext-toolchain/lib/gcc/arm-none-linux-gnueabihf/9.2.1/include/arm_neon.h: In function 'Vector128 {anonymous}::AesRound(const Vector128&, const Vector128&)':
/build/build/host/opt/ext-toolchain/lib/gcc/arm-none-linux-gnueabihf/9.2.1/include/arm_neon.h:16925:1: error: inlining failed in call to always_inline 'uint8x16_t vaesmcq_u8(uint8x16_t)': target specific option mismatch
16925 | vaesmcq_u8 (uint8x16_t __data)
      | ^~~~~~~~~~
/build/build/build/libabseil-cpp-20200923.2/absl/random/internal/randen_hwaes.cc:255:20: note: called from here
  255 |   return vaesmcq_u8(vaeseq_u8(state, uint8x16_t{})) ^ round_key;
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /build/build/build/libabseil-cpp-20200923.2/absl/random/internal/randen_hwaes.cc:229:
/build/build/host/opt/ext-toolchain/lib/gcc/arm-none-linux-gnueabihf/9.2.1/include/arm_neon.h:16911:1: error: inlining failed in call to always_inline 'uint8x16_t vaeseq_u8(uint8x16_t, uint8x16_t)': target specific option mismatch
16911 | vaeseq_u8 (uint8x16_t __data, uint8x16_t __key)
      | ^~~~~~~~~
/build/build/build/libabseil-cpp-20200923.2/absl/random/internal/randen_hwaes.cc:255:20: note: called from here
  255 |   return vaesmcq_u8(vaeseq_u8(state, uint8x16_t{})) ^ round_key;
      |          ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/build.make:63: absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/internal/randen_hwaes.cc.o] Error 1
make[3]: *** [CMakeFiles/Makefile2:2115: absl/random/CMakeFiles/random_internal_randen_hwaes_impl.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....



It is already reported upstream at https://github.com/abseil/abseil-cpp/issues/662 (on comment points out it is also not compiling for arm/rpi3)
Comment 1 Peter Seiderer 2020-12-04 18:15:10 UTC
Created attachment 8696 [details]
HACK: package/libabseil-cpp: disable hardware accelaration on arm

Add patch/hack to disable hardware acceleration for libabseil-cpp unconditionaly in case compiled for arm target.
Comment 2 Peter Seiderer 2020-12-04 18:18:36 UTC
Until a proper (upstream?) fix you can use the attached patch/hack to disable
hardware acceleration for random handling unconditionally in case compiled for arm target...
Comment 3 Michael Nosthoff 2022-07-27 18:34:27 UTC
the github issued set this to resolved since 20211102. See https://github.com/abseil/abseil-cpp/issues/662