Skip to content

Build failure on aarch64 with GCC #64

Closed
@eclipseo

Description

@eclipseo

Describe the bug
The build fails on aarch64:

In file included from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:36:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h: In lambda function:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:166:53: note: use '-flax-vector-conversions' to permit conversions between vectors with differing element types or numbers of subparts
  166 |             Vec128<uint8_t, 16>(vreinterpretq_s16_u8(exp16)))
      |                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:166:54: error: cannot convert 'int16x8_t' to 'uint8x16_t'
  166 |             Vec128<uint8_t, 16>(vreinterpretq_s16_u8(exp16)))
      |                                                      ^~~~~
      |                                                      |
      |                                                      int16x8_t
In file included from /usr/include/hwy/ops/arm_neon-inl.h:18,
                 from /usr/include/hwy/highway.h:282,
                 from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:26:
/usr/lib/gcc/aarch64-redhat-linux/11/include/arm_neon.h:5281:34: note:   initializing argument 1 of 'int16x8_t vreinterpretq_s16_u8(uint8x16_t)'
 5281 | vreinterpretq_s16_u8 (uint8x16_t __a)
      |                       ~~~~~~~~~~~^~~
In file included from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:36:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:171:54: error: cannot convert 'int16x8_t' to 'uint8x16_t'
  171 |             Vec128<uint8_t, 16>(vreinterpretq_s16_u8(exp16)))
      |                                                      ^~~~~
      |                                                      |
      |                                                      int16x8_t
In file included from /usr/include/hwy/ops/arm_neon-inl.h:18,
                 from /usr/include/hwy/highway.h:282,
                 from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:26:
/usr/lib/gcc/aarch64-redhat-linux/11/include/arm_neon.h:5281:34: note:   initializing argument 1 of 'int16x8_t vreinterpretq_s16_u8(uint8x16_t)'
 5281 | vreinterpretq_s16_u8 (uint8x16_t __a)
      |                       ~~~~~~~~~~~^~~
In file included from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:36:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:174:30: error: cannot convert 'uint8x16_t' to 'int16x8_t'
  174 |         vreinterpretq_u8_s16(pow_low), vreinterpretq_u8_s16(pow_high), 8));
      |                              ^~~~~~~
      |                              |
      |                              uint8x16_t
In file included from /usr/include/hwy/ops/arm_neon-inl.h:18,
                 from /usr/include/hwy/highway.h:282,
                 from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:26:
/usr/lib/gcc/aarch64-redhat-linux/11/include/arm_neon.h:5631:33: note:   initializing argument 1 of 'uint8x16_t vreinterpretq_u8_s16(int16x8_t)'
 5631 | vreinterpretq_u8_s16 (int16x8_t __a)
      |                       ~~~~~~~~~~^~~
In file included from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:36:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:174:61: error: cannot convert 'uint8x16_t' to 'int16x8_t'
  174 |         vreinterpretq_u8_s16(pow_low), vreinterpretq_u8_s16(pow_high), 8));
      |                                                             ^~~~~~~~
      |                                                             |
      |                                                             uint8x16_t
In file included from /usr/include/hwy/ops/arm_neon-inl.h:18,
                 from /usr/include/hwy/highway.h:282,
                 from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:26:
/usr/lib/gcc/aarch64-redhat-linux/11/include/arm_neon.h:5631:33: note:   initializing argument 1 of 'uint8x16_t vreinterpretq_u8_s16(int16x8_t)'
 5631 | vreinterpretq_u8_s16 (int16x8_t __a)
      |                       ~~~~~~~~~~^~~
In file included from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:36:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h: In function 'void jxl::N_NEON::{anonymous}::FastXYBTosRGB8(const Image3F&, const jxl::Rect&, const jxl::Rect&, uint8_t*, size_t)':
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:296:29: error: cannot convert '__Int16x8_t' to 'uint16x8_t' in initialization
  296 |       uint16x8_t r = srgb_tf(linear_r16);
      |                      ~~~~~~~^~~~~~~~~~~~
      |                             |
      |                             __Int16x8_t
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:297:29: error: cannot convert '__Int16x8_t' to 'uint16x8_t' in initialization
  297 |       uint16x8_t g = srgb_tf(linear_g16);
      |                      ~~~~~~~^~~~~~~~~~~~
      |                             |
      |                             __Int16x8_t
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:298:29: error: cannot convert '__Int16x8_t' to 'uint16x8_t' in initialization
  298 |       uint16x8_t b = srgb_tf(linear_b16);
      |                      ~~~~~~~^~~~~~~~~~~~
      |                             |
      |                             __Int16x8_t
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:301:61: error: cannot convert 'uint16x8_t' to 'int16x8_t'
  301 |           vqmovun_s16(vrshrq_n_s16(vsubq_s16(r, vshrq_n_s16(r, 8)), 6));
      |                                                             ^
      |                                                             |
      |                                                             uint16x8_t
In file included from /usr/include/hwy/ops/arm_neon-inl.h:18,
                 from /usr/include/hwy/highway.h:282,
                 from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:26:
/usr/lib/gcc/aarch64-redhat-linux/11/include/arm_neon.h:25724:24: note:   initializing argument 1 of 'int16x8_t vshrq_n_s16(int16x8_t, int)'
25724 | vshrq_n_s16 (int16x8_t __a, const int __b)
      |              ~~~~~~~~~~^~~
In file included from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:36:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:303:61: error: cannot convert 'uint16x8_t' to 'int16x8_t'
  303 |           vqmovun_s16(vrshrq_n_s16(vsubq_s16(g, vshrq_n_s16(g, 8)), 6));
      |                                                             ^
      |                                                             |
      |                                                             uint16x8_t
In file included from /usr/include/hwy/ops/arm_neon-inl.h:18,
                 from /usr/include/hwy/highway.h:282,
                 from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:26:
/usr/lib/gcc/aarch64-redhat-linux/11/include/arm_neon.h:25724:24: note:   initializing argument 1 of 'int16x8_t vshrq_n_s16(int16x8_t, int)'
25724 | vshrq_n_s16 (int16x8_t __a, const int __b)
      |              ~~~~~~~~~~^~~
In file included from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:36:
/builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_xyb-inl.h:305:61: error: cannot convert 'uint16x8_t' to 'int16x8_t'
  305 |           vqmovun_s16(vrshrq_n_s16(vsubq_s16(b, vshrq_n_s16(b, 8)), 6));
      |                                                             ^
      |                                                             |
      |                                                             uint16x8_t
In file included from /usr/include/hwy/ops/arm_neon-inl.h:18,
                 from /usr/include/hwy/highway.h:282,
                 from /builddir/build/BUILD/jpeg-xl-v0.3.7-9e9bce86164dc4d01c39eeeb3404d6aed85137b2/lib/jxl/dec_reconstruct.cc:26:
/usr/lib/gcc/aarch64-redhat-linux/11/include/arm_neon.h:25724:24: note:   initializing argument 1 of 'int16x8_t vshrq_n_s16(int16x8_t, int)'
25724 | vshrq_n_s16 (int16x8_t __a, const int __b)
      |              ~~~~~~~~~~^~~

To Reproduce

%cmake  -DENABLE_CCACHE=1 \
        -DBUILD_TESTING=OFF \
        -DINSTALL_GTEST:BOOL=OFF \
        -DJPEGXL_ENABLE_BENCHMARK:BOOL=OFF \
        -DJPEGXL_ENABLE_PLUGINS:BOOL=ON \
        -DJPEGXL_FORCE_SYSTEM_BROTLI:BOOL=ON \
        -DJPEGXL_FORCE_SYSTEM_GTEST:BOOL=ON \
        -DJPEGXL_FORCE_SYSTEM_HWY:BOOL=ON \
        -DJPEGXL_WARNINGS_AS_ERRORS:BOOL=OFF \
        -DBUILD_SHARED_LIBS:BOOL=OFF
%cmake_build -- all doc

Flags:

  CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection'
  LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '

Environment

  • OS: Fedora Rawhide
  • Compiler version: GCC 11.1.1
  • CPU type:
Architecture:                    aarch64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
CPU(s):                          5
On-line CPU(s) list:             0-4
Thread(s) per core:              1
Core(s) per socket:              5
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       APM
Model:                           2
Model name:                      X-Gene
Stepping:                        0x3
BogoMIPS:                        80.00
NUMA node0 CPU(s):               0-4
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; __user pointer sanitization
Vulnerability Spectre v2:        Vulnerable
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
  • libhwy: version 0.12.1
  • cjxl/djxl version string: v0.3.7

Full log available at https://koji.fedoraproject.org/koji/taskinfo?taskID=69038231

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions