Cuda not compiling

Hi, since latest library updates I cant compile cuda kernel anymore.
I add path to Pthreads and disabled USD in Cmake-Gui.
Deleted build directory.
GCC 10.1.1
Cuda 10.2

Building Blender ...
make -s -C "/home/pepo/blender-git/build_linux" -j 4 install
[  0%] Built target bf_intern_clog
[  0%] Built target bf_intern_guardedalloc
[  1%] Built target bf_intern_ghost
[  1%] Built target bf_intern_numaapi
[  2%] Built target bf_intern_memutil
[  2%] Built target datatoc
[  2%] Built target bf_intern_mikktspace
[  2%] Built target bf_intern_opensubdiv
[  2%] Built target bf_intern_glew_mx
[  2%] Built target bf_intern_sky
[  2%] Built target bf_intern_eigen
[  2%] Built target bf_intern_audaspace
[  3%] Built target bf_intern_libmv
[  3%] Built target bf_intern_dualcon
[  3%] Built target bf_intern_iksolver
[  3%] Built target bf_dna_blenlib
[  3%] Built target makesdna
[  3%] Built target extern_cuew
[  4%] Built target bf_intern_itasc
[  4%] Built target cycles_subd
[  5%] Built target cycles_util
[  5%] Built target extern_clew
[  5%] Generating filter_sm_30.cubin
[  5%] Built target bf_intern_rigidbody
[  7%] Built target cycles_osl_shaders
[  7%] Built target bf_intern_locale
[  7%] Built target bf_intern_libc_compat
[  7%] Built target bf_intern_quadriflow
[  7%] Built target bf_intern_mantaflow
[  7%] Built target extern_rangetree
[  7%] Built target extern_wcwidth
[  7%] Built target extern_curve_fit_nd
[  7%] Generating kernel_sm_30.cubin
[  8%] Built target dracoenc
[  8%] Built target extern_binreloc
[ 11%] Built target extern_bullet
[ 11%] Built target extern_glew
[ 11%] Built target extern_minilzo
/usr/include/c++/10/type_traits(1396): error: type name is not allowed

/usr/include/c++/10/type_traits(1396): error: type name is not allowed

/usr/include/c++/10/type_traits(1396): error: identifier "__is_same_as" is undefined

[ 11%] Built target extern_xdnd
[ 12%] Built target extern_lzma
[ 12%] Built target extern_gflags
[ 12%] Built target extern_glog
[ 14%] Built target audaspace
/usr/include/c++/10/type_traits(1396): error: type name is not allowed

/usr/include/c++/10/type_traits(1396): error: type name is not allowed

/usr/include/c++/10/type_traits(1396): error: identifier "__is_same_as" is undefined

3 errors detected in the compilation of "/tmp/tmpxft_00005006_00000000-6_filter.cpp1.ii".
make[3]: *** [intern/cycles/kernel/CMakeFiles/cycles_kernel_cuda.dir/build.make:186: intern/cycles/kernel/filter_sm_30.cubin] Fehler 1
make[3]: *** Es wird auf noch nicht beendete Prozesse gewartet....
[ 15%] Built target extern_quadriflow
[ 15%] Built target datatoc_icon
[ 16%] Built target extern_mantaflow
[ 17%] Built target bf_editor_animation
[ 17%] Built target bf_editor_armature
[ 21%] Built target extern_ceres
[ 21%] Built target bf_editor_curve
[ 22%] Built target bf_editor_gpencil
[ 22%] Built target bf_editor_io
[ 22%] Built target bf_editor_lattice
[ 23%] Built target bf_editor_interface
[ 23%] Built target bf_editor_gizmo_library
[ 23%] Built target bf_editor_mask
[ 23%] Built target bf_editor_metaball
[ 24%] Built target bf_editor_mesh
[ 24%] Built target bf_editor_physics
[ 25%] Built target bf_editor_object
[ 25%] Built target bf_editor_render
[ 25%] Built target bf_editor_scene
[ 26%] Built target bf_editor_sound
[ 26%] Built target bf_editor_space_action
[ 26%] Built target bf_editor_space_api
[ 26%] Built target bf_editor_sculpt_paint
[ 26%] Built target bf_editor_space_buttons
[ 26%] Built target bf_editor_space_console
[ 26%] Built target bf_editor_space_clip
[ 27%] Built target bf_editor_space_file
[ 27%] Built target bf_editor_space_graph
[ 27%] Built target bf_editor_space_image
[ 27%] Built target bf_editor_space_info
[ 27%] Built target bf_editor_space_nla
[ 28%] Built target bf_editor_space_node
[ 28%] Built target bf_editor_space_outliner
[ 28%] Built target bf_editor_space_script
[ 28%] Built target bf_editor_space_statusbar
[ 28%] Built target bf_editor_space_sequencer
[ 29%] Built target bf_editor_space_text
[ 29%] Built target bf_editor_space_userpref
[ 29%] Built target bf_editor_space_topbar
[ 29%] Built target bf_editor_undo
[ 29%] Built target bf_editor_util
3 errors detected in the compilation of "/tmp/tmpxft_0000502c_00000000-6_kernel.cpp1.ii".
[ 29%] Built target bf_editor_uvedit
make[3]: *** [intern/cycles/kernel/CMakeFiles/cycles_kernel_cuda.dir/build.make:384: intern/cycles/kernel/kernel_sm_30.cubin] Fehler 1
make[2]: *** [CMakeFiles/Makefile2:3750: intern/cycles/kernel/CMakeFiles/cycles_kernel_cuda.dir/all] Fehler 2
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
[ 30%] Built target bf_editor_screen
[ 32%] Built target bf_editor_transform
[ 35%] Built target bf_editor_datafiles
make[1]: *** [Makefile:183: all] Fehler 2
make: *** [GNUmakefile:313: all] Fehler 2

CMakeCache.txt (119.7 KB)

I can’t read German, so i don’t know if this is the error, but please look at : Wrong GCC version For CUDA (Linux) -- How to solve

This is probably not a solution to your problem, though.

Hi, thank you for the information.
I change host_config.h /usr/local/cuda/include/crt/ to skip GCC check, this work since Cuda 9.

#if __GNUC__ > 10

#error -- unsupported GNU version! gcc versions later than 8 are not supported!

#endif /* __GNUC__ > 10 */

Iirc @brecht give me the hint Years ago.

Here again there errors if I build on the fly:

Compiling CUDA kernel ...
"/usr/local/cuda/bin/nvcc" -arch=sm_30 --cubin "/home/pepo/blender-git/build_linux/bin/2.90/scripts/addons/cycl
es/source/kernel/kernels/cuda/kernel.cu" -o "/home/pepo/.cache/cycles/kernels/cycles_kernel_sm_30_E88110C48522C
542333735273837A5D1.cubin" -m64 --ptxas-options="-v" --use_fast_math -DNVCC -I"/home/pepo/blender-git/build_lin
ux/bin/2.90/scripts/addons/cycles/source"
/usr/include/c++/10/type_traits(1396): error: type name is not allowed

/usr/include/c++/10/type_traits(1396): error: type name is not allowed

/usr/include/c++/10/type_traits(1396): error: identifier "__is_same_as" is undefined

3 errors detected in the compilation of "/tmp/tmpxft_000064a4_00000000-6_kernel.cpp1.ii".
Failed to execute compilation command, see console for details.

Refer to the Cycles GPU rendering documentation for possible solutions:
https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html

Error: Failed to execute compilation command, see console for details.

GPUFrameBuffer: framebuffer status GL_FRAMEBUFFER_UNSUPPORTED

Cheers, mib

I expect CUDA 10.2 is simply not compatible with GCC 10.

Enabling WITH_CYCLES_CUBIN_COMPILER and WITH_CYCLES_CUDA_BINARIES may work.

Thank you, WITH_CYCLES_CUBIN_COMPILER and WITH_CYCLES_CUDA_BINARIES does not work.
I am just curious why it work last week before precompiled library update. :confused:
I will try to change to GCC 9.3.

Cheers, mib

Hi, after the kick from brecht I looked in your linked page again and the first solution with symlinking is working.
Cuda use GCC 9. 3 now.

Many thanks for the help, mib

1 Like