google / highway

Performance-portable, length-agnostic SIMD with runtime dispatch
Apache License 2.0
4.13k stars 315 forks source link

arm64/gcc-13: error: this operation requires the SVE ISA extension #2250

Closed malaterre closed 3 months ago

malaterre commented 3 months ago

I cannot build highway on arm64. Seems to fails with the following error:

FAILED: CMakeFiles/math_test.dir/hwy/contrib/math/math_test.cc.o 
/usr/bin/c++ -DHWY_SHARED_DEFINE -I"/<<PKGBUILDDIR>>" -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -DHWY_BROKEN_EMU128=0 -mstrict-align -Wdate-time -D_FORTIFY_SOURCE=2 -O3 -DNDEBUG -std=c++17 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fmerge-all-constants -Wall -Wextra -Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor -Wcast-align -fmath-errno -fno-exceptions -Wno-psabi -Werror -DHWY_IS_TEST=1 -DGTEST_HAS_PTHREAD=1 -MD -MT CMakeFiles/math_test.dir/hwy/contrib/math/math_test.cc.o -MF CMakeFiles/math_test.dir/hwy/contrib/math/math_test.cc.o.d -o CMakeFiles/math_test.dir/hwy/contrib/math/math_test.cc.o -c '/<<PKGBUILDDIR>>/hwy/contrib/math/math_test.cc'
In file included from /<<PKGBUILDDIR>>/hwy/tests/test_util-inl.h:28,
                 from /<<PKGBUILDDIR>>/hwy/contrib/math/math_test.cc:31,
                 from /<<PKGBUILDDIR>>/hwy/foreach_target.h:163,
                 from /<<PKGBUILDDIR>>/hwy/contrib/math/math_test.cc:28:
/<<PKGBUILDDIR>>/hwy/tests/test_util.h: In function ‘hwy::TypeName<double>(double, unsigned long)std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [clone .constprop.3]’:
/<<PKGBUILDDIR>>/hwy/tests/test_util.h:152:19: error: this operation requires the SVE ISA extension
  152 |   detail::TypeName(detail::MakeTypeInfo<T>(), N, string100);
      |   ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reduced:

johnplatts commented 3 months ago

There is a GCC 13 bug that happens on aarch64-linux-gnu when -O3 is enabled, and the issue can be worked around by appending -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" to the cmake command line.

malaterre commented 3 months ago

@johnplatts

There is a GCC 13 bug

I assumed no one has reported it yet. Let me further reduce it to pass the bugzilla gate keeper. Closing as invalid.

malaterre commented 3 months ago

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115556