raulcd opened a new pull request, #49570:
URL: https://github.com/apache/arrow/pull/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?
   
   I am unsure whether `_LIBCPP_VERSION` should be defined for all cases so we 
add a new check to validate whether `_LIBCPP_VERSION` is defined and `>= 12000` 
as this contains the commit that implements `std::bit_width`:
   
   
https://github.com/llvm/llvm-project/commit/1a036e9cc82a7f6d6f4675d631fa5eecd8748784
   
   If `_LIBCPP_VERSION` is undefined or `<12000` we continue with the existing 
logic.
   
   ### Are these changes tested?
   
   Via CI
   
   ### Are there any user-facing changes?
   
   No


-- 
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]

Reply via email to