GH-49569: [CI][Python][C++] Add check targetting Apple clang on deciding whether to use std::bit_width or std::log2p1#49570
Conversation
…ciding whether to use std::bit_width or std::log2p1
|
@github-actions crossbow submit test-r-macos-as-cran test-ubuntu-22.04-cpp-emscripten |
|
|
|
Revision: 066bf57 Submitted crossbow builds: ursacomputing/crossbow @ actions-576a7cbdce
|
|
@github-actions crossbow submit test-r-macos-as-cran test-ubuntu-22.04-cpp-emscripten |
|
Revision: a982f19 Submitted crossbow builds: ursacomputing/crossbow @ actions-d0624cbd1c
|
|
Failing job is now successful: |
|
@github-actions crossbow submit test-r-macos-as-cran test-ubuntu-22.04-cpp-emscripten |
|
Revision: 4736f08 Submitted crossbow builds: ursacomputing/crossbow @ actions-025f27de49
|
kou
left a comment
There was a problem hiding this comment.
+1
I didn't know __apple_build_version__!
|
After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit ba273ca. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
… deciding whether to use std::bit_width or std::log2p1 (apache#49570) ### Rationale for this change Clang 15.0.7 (/opt/homebrew/bin/clang++) - Homebrew LLVM fails compiling with: ``` FAILED: [code=1] CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o /opt/homebrew/bin/ccache /opt/homebrew/bin/clang++ -DARROW_HAVE_NEON -DARROW_PYTHON_EXPORTING -Darrow_python_EXPORTS -I/Users/runner/work/arrow/arrow/build/python/pyarrow/src -I/var/folders/gj/d1t24fg93wbdl854js_qwvb00000gn/T/tmpj20nqu3c/build/pyarrow/src -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -I/tmp/local/include -I/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/_core/include -fno-aligned-new -Wall -Wno-unknown-warning-option -Wno-pass-failed -march=armv8-a -Qunused-arguments -fcolor-diagnostics -fno-omit-frame-pointer -Wno-unused-variable -Wno-maybe-uninitialized -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-missing-declarations -Wno-sometimes-uninitialized -Wno-return-type-c-linkage -g -O0 -std=c++20 -arch arm64 -mmacosx-version-min=12 -fPIC -Wno-parentheses-equality -MD -MT CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o -MF CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o.d -o CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o -c /Users/runner/work/arrow/arrow/build/python/pyarrow/src/arrow/python/arrow_to_pandas.cc In file included from /Users/runner/work/arrow/arrow/build/python/pyarrow/src/arrow/python/arrow_to_pandas.cc:34: In file included from /tmp/local/include/arrow/array.h:41: In file included from /tmp/local/include/arrow/array/array_base.h:26: In file included from /tmp/local/include/arrow/array/data.h:32: /tmp/local/include/arrow/util/bit_util.h:145:15: error: no member named 'log2p1' in namespace 'std' return std::log2p1(x - 1); ~~~~~^ 1 error generated. ``` This seems to be the case of clang not having `__cpp_lib_bitops` defined but `std::log2p1` having been removed. ### What changes are included in this PR? Check for `__apple_build_version__` instead of `__clang__` so non Apple Clang just uses `std::bit_width` ### Are these changes tested? Via CI ### Are there any user-facing changes? No * GitHub Issue: apache#49569 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
… deciding whether to use std::bit_width or std::log2p1 (apache#49570) ### Rationale for this change Clang 15.0.7 (/opt/homebrew/bin/clang++) - Homebrew LLVM fails compiling with: ``` FAILED: [code=1] CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o /opt/homebrew/bin/ccache /opt/homebrew/bin/clang++ -DARROW_HAVE_NEON -DARROW_PYTHON_EXPORTING -Darrow_python_EXPORTS -I/Users/runner/work/arrow/arrow/build/python/pyarrow/src -I/var/folders/gj/d1t24fg93wbdl854js_qwvb00000gn/T/tmpj20nqu3c/build/pyarrow/src -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -I/tmp/local/include -I/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/numpy/_core/include -fno-aligned-new -Wall -Wno-unknown-warning-option -Wno-pass-failed -march=armv8-a -Qunused-arguments -fcolor-diagnostics -fno-omit-frame-pointer -Wno-unused-variable -Wno-maybe-uninitialized -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-missing-declarations -Wno-sometimes-uninitialized -Wno-return-type-c-linkage -g -O0 -std=c++20 -arch arm64 -mmacosx-version-min=12 -fPIC -Wno-parentheses-equality -MD -MT CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o -MF CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o.d -o CMakeFiles/arrow_python.dir/pyarrow/src/arrow/python/arrow_to_pandas.cc.o -c /Users/runner/work/arrow/arrow/build/python/pyarrow/src/arrow/python/arrow_to_pandas.cc In file included from /Users/runner/work/arrow/arrow/build/python/pyarrow/src/arrow/python/arrow_to_pandas.cc:34: In file included from /tmp/local/include/arrow/array.h:41: In file included from /tmp/local/include/arrow/array/array_base.h:26: In file included from /tmp/local/include/arrow/array/data.h:32: /tmp/local/include/arrow/util/bit_util.h:145:15: error: no member named 'log2p1' in namespace 'std' return std::log2p1(x - 1); ~~~~~^ 1 error generated. ``` This seems to be the case of clang not having `__cpp_lib_bitops` defined but `std::log2p1` having been removed. ### What changes are included in this PR? Check for `__apple_build_version__` instead of `__clang__` so non Apple Clang just uses `std::bit_width` ### Are these changes tested? Via CI ### Are there any user-facing changes? No * GitHub Issue: apache#49569 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
Rationale for this change
Clang 15.0.7 (/opt/homebrew/bin/clang++) - Homebrew LLVM fails compiling with:
This seems to be the case of clang not having
__cpp_lib_bitopsdefined butstd::log2p1having been removed.What changes are included in this PR?
Check for
__apple_build_version__instead of__clang__so non Apple Clang just usesstd::bit_widthAre these changes tested?
Via CI
Are there any user-facing changes?
No