Building the CUDA backend on CUDA 12.8 (nvidia/cuda:12.8.0-devel-ubuntu24.04, RTX 5090 / sm_120) fails:
ds4_cuda.cu(23467): error: identifier "FLT_MAX" is undefined
ds4_cuda.cu(23821): error: identifier "FLT_MAX" is undefined
ds4_cuda.cu(24024): error: identifier "FLT_MAX" is undefined
Cause: ds4_cuda.cu uses FLT_MAX but includes only <math.h>/<limits.h>; FLT_MAX is declared in <float.h>, which nvcc 12.8 no longer pulls in transitively.
Repro:
docker run --rm --gpus all -v $PWD:/ds4 nvidia/cuda:12.8.0-devel-ubuntu24.04 \
bash -c "apt-get update && apt-get install -y build-essential && cd /ds4 && make cuda CUDA_ARCH=sm_120"
Fix: add #include <float.h> to ds4_cuda.cu — PR #666.
(Posting the searchable error text so others on newer CUDA toolchains find the one-line fix.)
Building the CUDA backend on CUDA 12.8 (
nvidia/cuda:12.8.0-devel-ubuntu24.04, RTX 5090 /sm_120) fails:Cause:
ds4_cuda.cuusesFLT_MAXbut includes only<math.h>/<limits.h>;FLT_MAXis declared in<float.h>, which nvcc 12.8 no longer pulls in transitively.Repro:
Fix: add
#include <float.h>tods4_cuda.cu— PR #666.(Posting the searchable error text so others on newer CUDA toolchains find the one-line fix.)