linux+cycles+cuda: nvcc fatal: Value 'sm_52' is not defined for option 'gpu-architecture' I'm getting the error in the title. This has some of the same problems from here. Apparently this is an issue with an earlier version of the CUDA 6.5 toolkit, as discussed here.

However, even after installing the CUDA 7.0 toolkit, I'm still getting the following error:

"/usr/local/cuda-6.0/bin/nvcc" -arch=sm_52 -m64 --cubin "/usr/share/blender/2.74/scripts/addons/cycles/kernel/kernel.cu" -o "/home/jozxyqk/.config/blender/2.74/cache/cycles_kernel_sm52_680206C327F9D352594B0E249634D211.cubin" --ptxas-options="-v" --use_fast_math -I"/usr/share/blender/2.74/scripts/addons/cycles/kernel" -DNVCC -D__KERNEL_CUDA_VERSION__=60
nvcc fatal   : Value 'sm_52' is not defined for option 'gpu-architecture'
CUDA kernel compilation failed, see console for details.


Why is this happening?
Two reasons:


The cuda-7.0 toolkit installer failed to properly set permissions, so blender can't see the nvcc from the proper location.
When blender can't read using the symlink cuda in /usr/local/cuda/bin/nvcc it seems to search for nvcc using cuda-&lt;version&gt;/ instead. But it does it in the wrong order, also without reporting the permission issue.


Without others-readable permissions on /usr/local/cuda-7.0/, the symlink /usr/local/cuda fails and blender tries /usr/local/cuda-6.0/bin/nvcc even though a newer /usr/local/cuda-6.5/bin/nvcc exists.

The solution:

sudo chmod -R o+rX /usr/local/cuda-7.0/


Had no other toolkits been installed the error would have been:

which: no nvcc in ($PATH)
CUDA nvcc compiler not found. Install CUDA toolkit in default location.