Xpra: Ticket #1328: CUDA SDK 8.0 fails to compile simple kernels

On Fedora 24:

'/opt/cuda/bin/nvcc' '-fatbin' '-c' 'xpra/codecs/cuda_common/BGRA_to_NV12.cu' '-o' \
    'xpra/codecs/cuda_common/BGRA_to_NV12.fatbin' '-std=c++11' \
    '-gencode=arch=compute_30,code=sm_30' '-gencode=arch=compute_35,code=sm_35' \
    '-gencode=arch=compute_50,code=sm_50' '-gencode=arch=compute_52,code=sm_52' \
    '-gencode=arch=compute_53,code=sm_53' '-gencode=arch=compute_60,code=sm_60' \
    '-gencode=arch=compute_61,code=sm_61' '-gencode=arch=compute_62,code=sm_62'
Error: failed to compile CUDA kernel BGRA_to_NV12
/opt/cuda/bin/..//include/math_functions.h(8897): error: cannot overload functions distinguished by return type alone
/opt/cuda/bin/..//include/math_functions.h(8901): error: cannot overload functions distinguished by return type alone
2 errors detected in the compilation of "/tmp/tmpxft_00004bd8_00000000-21_BGRA_to_NV12.compute_62.cpp1.ii".

The beta 8 SDK was fine... Looks like it doesn't support newer GCC versions very well.

Commenting out those two offending lines from math_functions.h solves the problem.



Sat, 01 Oct 2016 03:39:23 GMT - Antoine Martin: status changed; resolution set


Sat, 23 Jan 2021 05:21:15 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1328