llama90 opened a new issue, #38525:
URL: https://github.com/apache/arrow/issues/38525
### Describe the bug, including details regarding any error messages,
version, and platform.
When building with the option `-DARROW_BUILD_BENCHMARKS=ON`, the following
error occurs in the "cpp/src/gandiva/tests/generate_data.h" file. I am using a
`M1` MacBook.
```
FAILED:
src/gandiva/tests/CMakeFiles/gandiva-micro-benchmarks.dir/micro_benchmarks.cc.o
/opt/homebrew/bin/ccache
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-DARROW_EXTRA_ERROR_CONTEXT -DARROW_HAVE_NEON -DARROW_WITH_RE2
-DARROW_WITH_TIMING_TESTS -DARROW_WITH_UTF8PROC -DBENCHMARK_STATIC_DEFINE
-DUTF8PROC_STATIC
-I/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/src
-I/Users/lama/workspace/arrow-latest/cpp/src
-I/Users/lama/workspace/arrow-latest/cpp/src/generated -isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/gbenchmark_ep/src/gbenchmark_ep-install/include
-isystem /Users/lama/workspace/arrow-latest/cpp/thirdparty/flatbuffers/include
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/rapidjson_ep/src/rapidjson_ep-install/include
-isystem /Users/lama/workspace/arrow-latest/cpp/thirdparty/hadoop/include
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/boost_ep-prefix/src/boost_ep
-isystem /opt/homebrew/opt/openssl@3/include -isystem
/Users/lama/workspace/arrow-lates
t/cpp/cmake-build-debug/utf8proc_ep-install/include -isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/re2_ep-install/include
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/xsimd_ep/src/xsimd_ep-install/include
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/jemalloc_ep-prefix/src
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/_deps/googletest-src/googletest/include
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/_deps/googletest-src/googletest
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/_deps/googletest-src/googlemock/include
-isystem
/Users/lama/workspace/arrow-latest/cpp/cmake-build-debug/_deps/googletest-src/googlemock
-isystem /opt/homebrew/opt/llvm@16/include -fno-aligned-new
-Qunused-arguments -fcolor-diagnostics -Wall -Wextra -Wdocumentation
-Wshorten-64-to-32 -Wno-missing-braces -Wno-unused-parameter
-Wno-constant-logical-operand -Wno-return-stack-address -Wdate-
time -Wno-unknown-warning-option -Wno-pass-failed -march=armv8-a -g -Werror
-O0 -ggdb -std=c++17 -arch arm64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk
-fPIE -fcolor-diagnostics -MD -MT
src/gandiva/tests/CMakeFiles/gandiva-micro-benchmarks.dir/micro_benchmarks.cc.o
-MF
src/gandiva/tests/CMakeFiles/gandiva-micro-benchmarks.dir/micro_benchmarks.cc.o.d
-o
src/gandiva/tests/CMakeFiles/gandiva-micro-benchmarks.dir/micro_benchmarks.cc.o
-c /Users/lama/workspace/arrow-latest/cpp/src/gandiva/tests/micro_benchmarks.cc
In file included from
/Users/lama/workspace/arrow-latest/cpp/src/gandiva/tests/micro_benchmarks.cc:27:
In file included from
/Users/lama/workspace/arrow-latest/cpp/src/gandiva/tests/timed_evaluate.h:24:
/Users/lama/workspace/arrow-latest/cpp/src/gandiva/tests/generate_data.h:39:19:
error: implicit conversion loses integer precision: 'int64_t' (aka 'long long')
to 'std::linear_congruential_engine<unsigned int, 48271, 0,
2147483647>::result_type' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
Random() : gen_(::arrow::internal::GetRandomSeed()) {}
~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lama/workspace/arrow-latest/cpp/src/gandiva/tests/generate_data.h:40:41:
error: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned
long long') to 'std::linear_congruential_engine<unsigned int, 48271, 0,
2147483647>::result_type' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
explicit Random(uint64_t seed) : gen_(seed) {}
~~~~ ^~~~
2 errors generated.
```
### 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]