Cannot build xmrig nvidia on Ubuntu 22.04
I have the latest drivers, cuda, and the tool kit. Cmake is fine going smoothly. I am using the following because I had a "gpu arcitechture is not compatible error"

So I cmake:

cmake .. -DCUDA_ARCH="61" -DWITH_HTTPD=OFF -DWITH_AEON=OFF (I have a 1060 so I have 6.1 architecture

then make ...

make  - then here is the error

[  1%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_extra.cu.o
/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu: In function ‘void cryptonight_extra_cpu_prepare(nvid_ctx*, uint32_t, xmrig::Algo, xmrig::Variant)’:
/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_extra.cu:416:182: warning: passing argument 5 to ‘restrict’-qualified parameter aliases with argument 6 [-Wrestrict]
  416 |         CUDA_CHECK_KERNEL(ctx->device_id, cryptonight_extra_gpu_prepare<xmrig::CRYPTONIGHT, xmrig::VARIANT_AUTO><<<grid, block >>>(wsize, ctx->d_input, ctx->inputlen, startNonce,
      |                                                                                                                                                                                 ~~   ^                            
[  3%] Building NVCC (Device) object CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o
/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_cryptonight_gpu.hpp(84): error: identifier "int2float" is undefined
    float4::x = int2float(x0.x);
                ^

/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_cryptonight_gpu.hpp(220): error: identifier "float_as_int" is undefined
    int_as_float(float_as_int(a.x) & b),
                 ^

/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_cryptonight_gpu.hpp(220): error: identifier "int_as_float" is undefined
    int_as_float(float_as_int(a.x) & b),
    ^

/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_cryptonight_gpu.hpp(230): error: identifier "float_as_int" is undefined
    int_as_float(float_as_int(a.x) | b),
                 ^

/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_cryptonight_gpu.hpp(230): error: identifier "int_as_float" is undefined
    int_as_float(float_as_int(a.x) | b),
    ^

/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_cryptonight_gpu.hpp(240): error: identifier "float_as_int" is undefined
    int_as_float(float_as_int(a.x) ^ b),
                 ^

/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_cryptonight_gpu.hpp(240): error: identifier "int_as_float" is undefined
    int_as_float(float_as_int(a.x) ^ b),
    ^

7 errors detected in the compilation of "/home/sapmi/Downloads/xmrig-nvidia/src/nvidia/cuda_core.cu".
CMake Error at xmrig-cuda_generated_cuda_core.cu.o.Release.cmake:280 (message):
  Error generating file
  /home/sapmi/Downloads/xmrig-nvidia/build/CMakeFiles/xmrig-cuda.dir/src/nvidia/./xmrig-cuda_generated_cuda_core.cu.o


make[2]: *** [CMakeFiles/xmrig-cuda.dir/build.make:77: CMakeFiles/xmrig-cuda.dir/src/nvidia/xmrig-cuda_generated_cuda_core.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: CMakeFiles/xmrig-cuda.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Seems to be a data type error. My drivers may be too new for this?



