Cant build Cuda/Optix kernels, Opensuse

Hi, since some time I cant build Cuda kernels anymore.

Compiling CUDA kernel ...
"/usr/local/cuda/bin/nvcc" -arch=sm_75 --cubin "/home/user/blender-git/build_linux/bin/3.1/scripts/addons/cycles/source/kernel/device/cuda/kernel.cu" -o "/home/user/.cache/cycles/kernels/c
ycles_kernel_sm_75_B8A2925333FA08CDC1235824636A4E87.cubin" -m64 --ptxas-options="-v" --use_fast_math -DNVCC -I"/user/pepo/blender-git/build_linux/bin/3.1/scripts/addons/cycles/source" -DWI
TH_NANOVDB
/usr/include/stdio.h(183): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(195): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(217): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(254): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(279): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(288): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(297): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(303): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(309): error: attribute "__malloc__" does not take arguments

/usr/include/stdio.h(824): error: attribute "__malloc__" does not take arguments

/usr/include/stdlib.h(565): error: attribute "__malloc__" does not take arguments

/usr/include/stdlib.h(569): error: attribute "__malloc__" does not take arguments

/usr/include/stdlib.h(797): error: attribute "__malloc__" does not take arguments

13 errors detected in the compilation of "/home/user/blender-git/build_linux/bin/3.1/scripts/addons/cycles/source/kernel/device/cuda/kernel.cu".
Failed to execute compilation command, see console for details.

gcc (SUSE Linux) 11.2.1
Toolkit 11.4
Optix 7.3.0

If you need more information I will try to add it.

I would be grateful for help, mib
EDIT:
CMakeCache.txt (139.9 KB)

1 Like

I have the same problem here Ubuntu 22
CUDA 11.4.1
OptiX 7.3.0

Rocky 8 Linux works though

Hi, please open a new thread about the Ubuntu problem.
I don´t have a Cuda card anymore and cant help here.

Cheers, mib

1 Like

Thanks I guess same thread is no harm,
also compiling with CUDA does not require an Nvidia card :smile: (I used the to think the same):
https://github.com/Bforartists/Bforartists/wiki/Installing-CUDA-11.4.1-Toolkit-only-(no-driver,-no-Nvidia-GPU-needed)-Linux,

I think the problem with Ubuntu is its glibc version, according to this, CUDA 11.4.1 won’t work,
so I guess a solution is to use a newer like 11.6 on Ubuntu (or OpenSUSE), or so, but this might drop support for some older cards at runtime

Confirmed 11.5.1 works on Ubuntu 22, will likely also fix the problem on OpenSUSE