protonscr

Build issues with Clang in /subprojects/dxil-spirv/subprojects/dxbc-spirv/tests/util/test_util_small_vector.cpp

vkd3dclosed
HansKristian-Work/vkd3d-proton#2579 · opened 2025-08-15 by ms178 · updated 2025-08-15 · 1 comments · github
Mms178 2025-08-15 github

With the latest llvm-mingw toolchain (llvm-mingw-20250812-msvcrt-ubuntu-22.04-x86_64 but also with llvm-mingw-20250613-ucrt-ubuntu-22.04-x86_64) and latest vkd3d-proton-mingw-git (a4025e22ecc181018bef711ceb9e8ff251898466), I see the following build error on CachyOS:

In file included from ../../vkd3d-proton/subprojects/dxil-spirv/subprojects/dxbc-spirv/tests/util/test_util_small_vector.cpp:1:
../../vkd3d-proton/subprojects/dxil-spirv/subprojects/dxbc-spirv/tests/util/../../util/util_small_vector.h:294:29: error: no member named 'max' in namespace 'std'; did you mean 'fmax'?
  294 |     m_state.capacity = std::max(size(), EmbeddedCapacity);
      |                             ^~~
      |                             fmax
/opt/llvm-mingw/llvm-mingw-20250812-msvcrt-ubuntu-22.04-x86_64/x86_64-w64-mingw32/include/c++/v1/cmath:448:9: note: 'fmax' declared here
  448 | using ::fmax _LIBCPP_USING_IF_EXISTS;
      |         ^
In file included from ../../vkd3d-proton/subprojects/dxil-spirv/subprojects/dxbc-spirv/tests/util/test_util_small_vector.cpp:1:
../../vkd3d-proton/subprojects/dxil-spirv/subprojects/dxbc-spirv/tests/util/../../util/util_small_vector.h:393:76: error: no member named 'max' in namespace 'std'; did you mean 'fmax'?
  393 |     if (!std::is_same_v<Allocator, Allocator_> || other.capacity() <= std::max(N, N_)) {
      |                                                                            ^~~
      |                                                                            fmax
/opt/llvm-mingw/llvm-mingw-20250812-msvcrt-ubuntu-22.04-x86_64/x86_64-w64-mingw32/include/c++/v1/cmath:448:9: note: 'fmax' declared here
  448 | using ::fmax _LIBCPP_USING_IF_EXISTS;
      |         ^
2 errors generated.
Mms178 2025-08-15 github

That was quick, it doesn't reproduce any longer after the latest push from today. Closing.

Nothing extracted yet.