libjxl icon indicating copy to clipboard operation
libjxl copied to clipboard

libjxl fails to compile on armv7

Open stefson opened this issue 3 years ago • 3 comments

hey everyone,

I got these build errors when compiling libjxl on armv7:

/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10974:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_f32(float32_t*, float32x4_t)’: target specific option mismatch
/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/10.4.0/include/arm_neon.h:10995:1: error: inlining failed in call to ‘always_inline’ ‘void vst1q_u32(uint32_t*, uint32x4_t)’: target specific option mismatch

I tried to export -DJPEGXL_FORCE_NEON=ON , without success.

I'm forced to use system highway with neon enabled, as it won't compile without neon optimizations. I checked out and compiled it at the exact same commit you're using ( https://github.com/google/highway/tree/22e3d7276f4157d4a47586ba9fd91dd6303f441a )

anything else I can try to config, or is this a bug?

Environment

  • OS: Linux x86_64 host, armv7a target
  • Compiler version: gcc-10.4.0
  • CPU type: x86_64 host, armv7a target

stefson avatar Sep 15 '22 06:09 stefson

What happens if you use -DHWY_CMAKE_ARM7=ON ?

novomesk avatar Sep 15 '22 09:09 novomesk

I think this is the option I have to pass along to system highway, but I gave it a try anyway:

/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/third_party/skcms/src/Transform_inl.h:158:26: error: ‘float16x4_t’ was not declared in this scope; did you mean ‘bfloat16x4_t’?
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/third_party/skcms/src/Transform_inl.h:158:12: error: ‘vcvt_f32_f16’ was not declared in this scope; did you mean ‘vcvt_f32_bf16’?
/var/tmp/portage/media-libs/libjxl-9999/work/libjxl-9999/third_party/skcms/src/Transform_inl.h:187:17: error: ‘vcvt_f16_f32’ was not declared in this scope; did you mean ‘vcvt_bf16_f32’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:342:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:342:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:346:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:346:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:443:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:443:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:447:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:447:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:544:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:544:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:548:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:548:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:624:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:624:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:687:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:687:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:728:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:728:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:728:45: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:728:57: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:750:15: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:750:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:750:45: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:750:57: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:870:56: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:870:68: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:871:46: error: request for member ‘raw’ in ‘v’, which is of non-class type ‘int’
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:980:19: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:980:31: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:980:54: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:980:69: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:982:17: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:982:29: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2698:16: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2698:28: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2698:41: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2698:56: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2699:42: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/shared-inl.h:200:7: error: ‘int’ is not a class, struct, or union type
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2702:17: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2702:29: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2702:47: error: no matching function for call to ‘LoadU(const int&, const short unsigned int* const&)’
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2874:28: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2874:40: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2874:50: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2874:65: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2875:21: error: ‘float16_t’ has not been declared
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:2878:39: error: request for member ‘raw’ in ‘v’, which is of non-class type ‘int’
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3034:46: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3034:58: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3035:63: error: request for member ‘raw’ in ‘v’, which is of non-class type ‘const int’
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3035:40: error: ‘vreinterpret_f16_u16’ was not declared in this scope; did you mean ‘vreinterpret_bf16_u16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3035:27: error: ‘vcvt_f32_f16’ was not declared in this scope; did you mean ‘vcvt_f32_bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3040:49: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3040:61: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3041:63: error: request for member ‘raw’ in ‘v’, which is of non-class type ‘const int’
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3041:40: error: there are no arguments to ‘vreinterpret_f16_u16’ that depend on a template parameter, so a declaration of ‘vreinterpret_f16_u16’ must be available [-fpermissive]
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3162:16: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3162:28: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3162:46: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3162:55: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3164:17: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3164:29: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3164:52: error: ‘vcvt_f16_f32’ was not declared in this scope; did you mean ‘vcvt_bf16_f32’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3164:31: error: ‘vreinterpret_u16_f16’ was not declared in this scope; did you mean ‘vreinterpret_u16_bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3167:16: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3167:28: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3167:44: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3167:59: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3169:9: error: ‘float16x4_t’ does not name a type; did you mean ‘bfloat16x4_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3170:17: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3170:29: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3170:52: error: ‘f16’ was not declared in this scope
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/ops/arm_neon-inl.h:3170:31: error: there are no arguments to ‘vreinterpret_u16_f16’ that depend on a template parameter, so a declaration of ‘vreinterpret_u16_f16’ must be available [-fpermissive]
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:259:19: error: ‘__fp16’ does not name a type; did you mean ‘__bf16’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:18: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:480:27: error: template argument 1 is invalid
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:502:18: error: ‘float16_t’ does not name a type; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:25: error: ‘float16_t’ was not declared in this scope; did you mean ‘bfloat16_t’?
/usr/armv7a-unknown-linux-gnueabihf/usr/include/hwy/base.h:602:16: error: template-id ‘IsSigned<<expression error> >’ for ‘constexpr bool hwy::IsSigned()’ does not match any template declaration

full build log: libjxl.log.gz

stefson avatar Sep 15 '22 16:09 stefson

The error seems to be that we are using __fp16 although it is not supported by the compiler.

The code governing this decision is #if ((HWY_ARCH_ARM_A64 || (__ARM_FP & 2)) && HWY_COMPILER_GCC). HWY_COMPILER_GCC can be expected to be true, but the others shouldn't be. Here's a (failed) repro with what HWY_ARCH_ARM_A64 expands to: https://gcc.godbolt.org/z/oPTf5W8Wz As expected, __fp16 is not used there. Any ideas whether/why the above #if evaluates to true?

jan-wassenberg avatar Sep 20 '22 08:09 jan-wassenberg

fixed in: https://github.com/google/highway/commit/dc63f813c465f3bf95cb5b98f01aeed28b81173c

Can you please cherry pick the fix into your internal highway, or update the internal highway to include this commit?

thank you

stefson avatar Mar 02 '23 13:03 stefson

fixed in: google/highway@dc63f81

Can you please cherry pick the fix into your internal highway, or update the internal highway to include this commit?

thank you

WIP: https://github.com/libjxl/libjxl/pull/2255

mo271 avatar Mar 02 '23 13:03 mo271

thanks, lets watch the fireworks!

stefson avatar Mar 03 '23 13:03 stefson

@novomesk do you care to pull in the fix for highway-1.0.1-r1 and highway-1.0.3? Both versions with and without neon are fixed now with this fix.

stefson avatar Mar 06 '23 07:03 stefson

@stefson Do you mean that with the patch, the -DHWY_CMAKE_ARM7=$(usex cpu_flags_arm_neon) will be not needed? Or it is still good to keep?

novomesk avatar Mar 06 '23 07:03 novomesk

No you shall absolutly keep the neon option, but without neon is now unbroken. And, more important, libjxl now compiles against the fixed system highway, on armv7.

stefson avatar Mar 06 '23 07:03 stefson

@stefson I prefer that you prepare the PR for Gentoo, because I do not have Gentoo with arm, I can't test it.

I suggest to leave 1.0.1 as it is and add the patch only to the new highway-1.0.3-r1.ebuild

novomesk avatar Mar 06 '23 08:03 novomesk