Skip to content

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Oct 4, 2025

When using NVCC with Clang as the host compiler (nvcc -ccbin=clang-17), including fmt currently fails (at least on Linux) with

include/fmt/base.h(423): error: identifier "_BitInt" is undefined
  template <int N> using bitint = _BitInt(N);

This PR disables the use of _BitInt in that case.

I was thinking it might be related to NVCC requiring the use of libstdc++ and prohibiting libc++ in most cases, but forcing libc++ with -Xcompiler=-stdlib=libc++ -D_ALLOW_UNSUPPORTED_LIBCPP did not get rid of the error.

I'm guessing it has not cropped up earlier due the use of fmt with CUDA code probably not being too common and Nvidia generally recommending GCC over Clang as the host compiler.

@vitaut vitaut merged commit b580360 into fmtlib:master Oct 6, 2025
41 checks passed
@vitaut
Copy link
Contributor

vitaut commented Oct 6, 2025

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants