apache / arrow

Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
https://arrow.apache.org/
Apache License 2.0
14.65k stars 3.55k forks source link

[C++] Failed to build buffer_test.cc with Clang 19.1.3 #44730

Closed kou closed 5 days ago

kou commented 1 week ago

Describe the bug, including details regarding any error messages, version, and platform.

https://github.com/apache/arrow/actions/runs/11832540637/job/32972925227?pr=44621#step:7:1428

FAILED: src/arrow/CMakeFiles/arrow-buffer-test.dir/buffer_test.cc.obj 
D:\a\_temp\msys64\clang64\bin\ccache.exe D:\a\_temp\msys64\clang64\bin\c++.exe -DARROW_HAVE_RUNTIME_AVX2 -DARROW_HAVE_RUNTIME_BMI2 -DARROW_HAVE_RUNTIME_SSE4_2 -DARROW_HAVE_SSE4_2 -DUSE_IMPORT_EXPORT -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -ID:/a/arrow/arrow/build/cpp/src -ID:/a/arrow/arrow/cpp/src -ID:/a/arrow/arrow/cpp/src/generated -isystem D:/a/arrow/arrow/build/cpp/_deps/googletest-src/googlemock/include -isystem D:/a/arrow/arrow/build/cpp/_deps/googletest-src/googletest/include -isystem D:/a/arrow/arrow/cpp/thirdparty/flatbuffers/include -isystem D:/a/arrow/arrow/build/cpp/_deps/googletest-src/googletest -isystem D:/a/arrow/arrow/build/cpp/_deps/googletest-src/googlemock -Qunused-arguments -fcolor-diagnostics  -Wa,-mbig-obj -Wall -Wextra -Wdocumentation -DARROW_WARN_DOCUMENTATION -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 -mxsave -msse4.2  -O3 -DNDEBUG -O2  -std=c++17 -MD -MT src/arrow/CMakeFiles/arrow-buffer-test.dir/buffer_test.cc.obj -MF src\arrow\CMakeFiles\arrow-buffer-test.dir\buffer_test.cc.obj.d -o src/arrow/CMakeFiles/arrow-buffer-test.dir/buffer_test.cc.obj -c D:/a/arrow/arrow/cpp/src/arrow/buffer_test.cc
In file included from D:/a/arrow/arrow/cpp/src/arrow/buffer_test.cc:23:
D:/a/_temp/msys64/clang64/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
  820 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
      |                                          ^
D:/a/arrow/arrow/cpp/src/arrow/buffer_test.cc:515:30: note: in instantiation of template class 'std::basic_string<unsigned char>' requested here
  515 |   std::basic_string<uint8_t> data_str = data_array;
      |                              ^
D:/a/_temp/msys64/clang64/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
   23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
      |                             ^
In file included from D:/a/arrow/arrow/cpp/src/arrow/buffer_test.cc:23:
D:/a/_temp/msys64/clang64/include/c++/v1/string:1061:17: error: implicit instantiation of undefined template 'std::char_traits<unsigned char>'
 1061 |     __init(__s, traits_type::length(__s));
      |                 ^
D:/a/arrow/arrow/cpp/src/arrow/buffer_test.cc:515:41: note: in instantiation of function template specialization 'std::basic_string<unsigned char>::basic_string<0>' requested here

  515 |   std::basic_string<uint8_t> data_str = data_array;

      |                                         ^

D:/a/_temp/msys64/clang64/include/c++/v1/__fwd/string.h:23:29: note: template is declared here

   23 | struct _LIBCPP_TEMPLATE_VIS char_traits;

      |                             ^

2 errors generated.

Component(s)

C++

kou commented 5 days ago

This was fixed by GH-44493.