Currect 2.79 version of Blender works with CUDA 8.0 but dev-util/nvidia-cuda-toolkit-8.x.x ebuilds are masked in the tree leading to this error when using nvidia GPU for Cycles: CUDA version 9.10 detected, build may succeed but only CUDA 8.0 is officially supported. Compiling CUDA kernel ... "nvcc" -arch=sm_21 --cubin "/usr/share/blender/2.79/scripts/addons/cycles/source/kernel/kernels/cuda/kernel.cu" -o "/tmp/petros/.cache/cycles/kernels/cycles_kernel_sm21_B1544EDCA4EDC3203244A431F50C3D14.cubin" -m64 --ptxas-options="-v" --use_fast_math -DNVCC -D__KERNEL_CUDA_VERSION__=91 -I"/usr/share/blender/2.79/scripts/addons/cycles/source" nvcc fatal : Value 'sm_21' is not defined for option 'gpu-architecture' CUDA kernel compilation failed, see console for details. Refer to the Cycles GPU rendering documentation for possible solutions: https://docs.blender.org/manual/en/dev/render/cycles/gpu_rendering.html Error: CUDA kernel compilation failed, see console for details. Blender-2.79a solves this because it works with CUDA 9. PS I tried to bump the ebuild but it uses version-specific patches (${P}-fix-build-with-OSL-1.9.x.patch) which I won't touch.
there is 2.79b
also, the fix-build-with-OSL patch is now upstream. So I removed that patch from the ebuild, renamed the ebuild; blender compiled successfully and seems working.
Created attachment 534050 [details, diff] blender-2.79b-gcc-8.patch
Created attachment 534052 [details, diff] blender-2.79b-openvdb-4.patch
Created attachment 534054 [details, diff] blender-2.79b-ebuild.patch
Created attachment 534056 [details, diff] blender-2.79b-ebuild.patch Updating patch to remove accidental changes. The last trivial diff is to replace some space characters with a tab.
Just to let you know, I'm working on Blender 2.79b. I have it working without the openvdb patch (turn off the abi3-compat use flag and remove the append in the blender ebuild). However, there is a serious OpenVDB bug (it affects python bindings in Blender) that I'm working on with upstream to try to fix. I'm also looking at OpenVDB 5.1.0 compatibility as that version has a lot of bug fixes. As soon as OpenVDB get's fixed, I can update Blender.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0b0f8fb104fdd0867db97591866bc1b5af425d6 commit b0b0f8fb104fdd0867db97591866bc1b5af425d6 Author: Jonathan Scruggs <j.scruggs@gmail.com> AuthorDate: 2018-08-15 17:44:26 +0000 Commit: Jonathan Scruggs <dracwyrm@gentoo.org> CommitDate: 2018-08-15 20:08:18 +0000 media-gfx/blender: bump to version 1.79b Add patch from Mark Wright <gienah@gentoo.org> for GCC 8 compatibility. Closes: https://bugs.gentoo.org/650592 Closes: https://bugs.gentoo.org/661066 media-gfx/blender/Manifest | 1 + media-gfx/blender/blender-2.79b.ebuild | 290 ++++++++++++++++++++++ media-gfx/blender/files/blender-2.79b-gcc-8.patch | 22 ++ 3 files changed, 313 insertions(+)