lahwaacz opened a new issue, #47946:
URL: https://github.com/apache/arrow/issues/47946
### Describe the bug, including details regarding any error messages,
version, and platform.
Building arrow 22.0.0 with the `-DARROW_SIMD_LEVEL=NONE` CMake option leads
to these errors:
```
FAILED: [code=1]
src/arrow/CMakeFiles/arrow_util.dir/util/byte_stream_split_internal_avx2.cc.o
/usr/bin/c++ -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_AVX512
-DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_WITH_TIMING_TESTS
-DGFLAGS_IS_A_DLL=0 -DGLOG_USE_GFLAGS -DGLOG_USE_GLOG_EXPORT -DURI_STATIC_BUILD
-I/build/arrow/src/build/src -I/build/arrow/src/apache-arrow-22.0.0/cpp/src
-I/build/arrow/src/apache-arrow-22.0.0/cpp/src/generated -Wredundant-move
-Wno-noexcept-type -Wno-self-move -march=x86-64 -mtune=generic -O2 -pipe
-fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat
-Werror=format-security -fstack-clash-protection -fcf-protection
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS
-g -ffile-prefix-map=/build/arrow/src=/usr/src/debug/arrow -flto=auto
-fdiagnostics-color=always -Wall -Wno-conversion -Wno-sign-conversion
-Wdate-time -Wimplicit-fallthrough -Wunused-result -fno-semantic-interposition
-O2 -g -DNDEBUG -ftree-vectorize -ggdb -std=c++17 -fPIC -march=haswell -mavx2
-MD -MT src/arrow/CMak
eFiles/arrow_util.dir/util/byte_stream_split_internal_avx2.cc.o -MF
src/arrow/CMakeFiles/arrow_util.dir/util/byte_stream_split_internal_avx2.cc.o.d
-o
src/arrow/CMakeFiles/arrow_util.dir/util/byte_stream_split_internal_avx2.cc.o
-c
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc
In file included from /usr/include/xsimd/types/xsimd_avx2_register.hpp:15,
from
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:22:
/usr/include/xsimd/types/xsimd_avx_register.hpp:48:63: error: expected
constructor, destructor, or type conversion before ‘;’ token
48 | XSIMD_DECLARE_SIMD_REGISTER(signed char, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:49:65: error: expected
constructor, destructor, or type conversion before ‘;’ token
49 | XSIMD_DECLARE_SIMD_REGISTER(unsigned char, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:50:56: error: expected
constructor, destructor, or type conversion before ‘;’ token
50 | XSIMD_DECLARE_SIMD_REGISTER(char, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:51:66: error: expected
constructor, destructor, or type conversion before ‘;’ token
51 | XSIMD_DECLARE_SIMD_REGISTER(unsigned short, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:52:57: error: expected
constructor, destructor, or type conversion before ‘;’ token
52 | XSIMD_DECLARE_SIMD_REGISTER(short, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:53:64: error: expected
constructor, destructor, or type conversion before ‘;’ token
53 | XSIMD_DECLARE_SIMD_REGISTER(unsigned int, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:54:55: error: expected
constructor, destructor, or type conversion before ‘;’ token
54 | XSIMD_DECLARE_SIMD_REGISTER(int, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:55:69: error: expected
constructor, destructor, or type conversion before ‘;’ token
55 | XSIMD_DECLARE_SIMD_REGISTER(unsigned long int, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:56:60: error: expected
constructor, destructor, or type conversion before ‘;’ token
56 | XSIMD_DECLARE_SIMD_REGISTER(long int, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:57:74: error: expected
constructor, destructor, or type conversion before ‘;’ token
57 | XSIMD_DECLARE_SIMD_REGISTER(unsigned long long int, avx,
__m256i);
|
^
/usr/include/xsimd/types/xsimd_avx_register.hpp:58:65: error: expected
constructor, destructor, or type conversion before ‘;’ token
58 | XSIMD_DECLARE_SIMD_REGISTER(long long int, avx, __m256i);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:59:56: error: expected
constructor, destructor, or type conversion before ‘;’ token
59 | XSIMD_DECLARE_SIMD_REGISTER(float, avx, __m256);
| ^
/usr/include/xsimd/types/xsimd_avx_register.hpp:60:58: error: expected
constructor, destructor, or type conversion before ‘;’ token
60 | XSIMD_DECLARE_SIMD_REGISTER(double, avx, __m256d);
| ^
/usr/include/xsimd/types/xsimd_avx2_register.hpp:39:53: error: expected
constructor, destructor, or type conversion before ‘;’ token
39 | XSIMD_DECLARE_SIMD_REGISTER_ALIAS(avx2, avx);
| ^
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:33:15:
error: variable or field ‘ByteStreamSplitDecodeSimd’ declared void
33 | template void ByteStreamSplitDecodeSimd<xsimd::avx2, 2>(const
uint8_t*, int, int64_t,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:33:40:
error: expected ‘;’ before ‘<’ token
33 | template void ByteStreamSplitDecodeSimd<xsimd::avx2, 2>(const
uint8_t*, int, int64_t,
| ^
| ;
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:35:15:
error: variable or field ‘ByteStreamSplitDecodeSimd’ declared void
35 | template void ByteStreamSplitDecodeSimd<xsimd::avx2, 4>(const
uint8_t*, int, int64_t,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:35:40:
error: expected ‘;’ before ‘<’ token
35 | template void ByteStreamSplitDecodeSimd<xsimd::avx2, 4>(const
uint8_t*, int, int64_t,
| ^
| ;
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:37:15:
error: variable or field ‘ByteStreamSplitDecodeSimd’ declared void
37 | template void ByteStreamSplitDecodeSimd<xsimd::avx2, 8>(const
uint8_t*, int, int64_t,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:37:40:
error: expected ‘;’ before ‘<’ token
37 | template void ByteStreamSplitDecodeSimd<xsimd::avx2, 8>(const
uint8_t*, int, int64_t,
| ^
| ;
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:
In function ‘void arrow::util::internal::ByteStreamSplitEncodeAvx2Impl4(const
uint8_t*, int, int64_t, uint8_t*)’:
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:52:12:
error: ‘ByteStreamSplitEncodeSimd’ was not declared in this scope; did you
mean ‘ByteStreamSplitEncode’?
52 | return ByteStreamSplitEncodeSimd<xsimd::sse4_2, kNumStreams>(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| ByteStreamSplitEncode
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:52:51:
error: expected primary-expression before ‘,’ token
52 | return ByteStreamSplitEncodeSimd<xsimd::sse4_2, kNumStreams>(
| ^
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:53:9:
warning: left operand of comma operator has no effect [-Wunused-value]
53 | raw_values, width, num_values, output_buffer_raw);
| ^~~~~~~~~~
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:53:28:
warning: right operand of comma operator has no effect [-Wunused-value]
53 | raw_values, width, num_values, output_buffer_raw);
| ^~~~~~~~~~
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:53:40:
warning: right operand of comma operator has no effect [-Wunused-value]
53 | raw_values, width, num_values, output_buffer_raw);
| ^~~~~~~~~~~~~~~~~
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:52:64:
error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
52 | return ByteStreamSplitEncodeSimd<xsimd::sse4_2, kNumStreams>(
| ~~~~~~~~~~~^~
53 | raw_values, width, num_values, output_buffer_raw);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:
In function ‘void arrow::util::internal::ByteStreamSplitEncodeAvx2(const
uint8_t*, int, int64_t, uint8_t*)’:
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:128:12:
error: ‘ByteStreamSplitEncodeSimd’ was not declared in this scope; did you
mean ‘ByteStreamSplitEncodeAvx2’? [-Wtemplate-body]
128 | return ByteStreamSplitEncodeSimd<xsimd::avx2, kNumStreams>(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| ByteStreamSplitEncodeAvx2
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:128:49:
error: expected primary-expression before ‘,’ token [-Wtemplate-body]
128 | return ByteStreamSplitEncodeSimd<xsimd::avx2, kNumStreams>(
| ^
/build/arrow/src/apache-arrow-22.0.0/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc:128:62:
error: ISO C++ forbids comparison between pointer and integer [-Wtemplate-body]
128 | return ByteStreamSplitEncodeSimd<xsimd::avx2, kNumStreams>(
| ~~~~~~~~~~~^~
129 | raw_values, width, num_values, output_buffer_raw);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
The `ByteStreamSplitDecodeSimd` and `ByteStreamSplitDecodeSimd` functions
are defined in `byte_stream_split_internal.h` only if a suitable SIMD level is
configured:
https://github.com/apache/arrow/blob/308b007bc82da3e5e46c5abd72926a0b0ec5a3bc/cpp/src/arrow/util/byte_stream_split_internal.h#L32-L40
But here the functions seem to be used without any macro guards:
https://github.com/apache/arrow/blob/308b007bc82da3e5e46c5abd72926a0b0ec5a3bc/cpp/src/arrow/util/byte_stream_split_internal_avx2.cc#L52
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]