Hey, thanks for the hints, @NiCapp and @brecht, much appreciated.
My build mods:
Index: blender-git.spec
===================================================================
--- blender-git.spec (revision 111)
+++ blender-git.spec (working copy)
@@ -58,6 +58,7 @@
Source0: %{_origname}-%{version}.tar.xz
Source1: %{name}.appdata.xml
Source2: SUSE-NVIDIA-GPU-rendering.txt
+Source3: nvidia-optix-7.0.tar.xz
%if %{with python_36}
Patch1: make_python_3.6_compatible.patch
%endif
@@ -216,7 +217,7 @@
%lang_package
%prep
-%setup -q -n %{_origname}-%{version}
+%setup -q -n %{_origname}-%{version} -a3
%if %{with python_36}
%patch1 -p1
%endif
@@ -357,7 +358,9 @@
-DCYCLES_CUDA_BINARIES:BOOL=ON \
-DCYCLES_CUBIN_COMPILER:BOOL=OFF \
-DCYCLES_CUDA_BINARIES_ARCH="sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61;sm_70;sm_75" \
- -DWITH_CYCLES_DEVICE_OPTIX:BOOL=OFF
+ -DWITH_CYCLES_DEVICE_OPTIX:BOOL=ON \
+ -DOPTIX_ROOT_DIR:STRING="$(pwd)/nvidia-optix-7.0" \
+ -DOPTIX_INCLUDE_DIR:STRING="$(pwd)/nvidia-optix-7.0/include"
make %{?_smp_mflags}
that result in:
[ 14s] -- Found OptiX: /home/abuild/rpmbuild/BUILD/blender-2.83~git.20200403T103721.fe7ea8a24c8/build/nvidia-optix-7.0/include
But fails with:
[ 22s] [ 2%] Generating kernel_optix.ptx
[ 22s] cd "/home/abuild/rpmbuild/BUILD/blender-2.83~git.20200403T103721.fe7ea8a24c8/intern/cycles/kernel" && --ptx -arch=sm_30 -I /home/abuild/rpmbuild/BUILD/blender-2.83~git.20200403T103721.fe7ea8a24c8/build/nvidia-optix-7.0/include -I /home/abuild/rpmbuild/BUILD/blender-2.83~git.20200403T103721.fe7ea8a24c8/intern/cycles/kernel/.. -I /home/abuild/rpmbuild/BUILD/blender-2.83~git.20200403T103721.fe7ea8a24c8/intern/cycles/kernel/kernels/cuda --use_fast_math -o /home/abuild/rpmbuild/BUILD/blender-2.83~git.20200403T103721.fe7ea8a24c8/build/intern/cycles/kernel/kernel_optix.ptx kernels/optix/kernel_optix.cu
[ 22s] /bin/sh: --ptx: command not found
[ 22s] make[2]: *** [intern/cycles/kernel/CMakeFiles/cycles_kernel_optix.dir/build.make:284: intern/cycles/kernel/kernel_optix.ptx] Error 127
[ 22s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/blender-2.83~git.20200403T103721.fe7ea8a24c8/build'
[ 22s] make[1]: *** [CMakeFiles/Makefile2:3621: intern/cycles/kernel/CMakeFiles/cycles_kernel_optix.dir/all] Error 2
The build tries to call nvcc (I guess), but that isn’t available at build time. This is the reason for my statement above.
@brecht Without defining OPTIX_INCLUDE_DIR
, the result is:
[ 14s] -- Could NOT find OptiX (missing: OPTIX_INCLUDE_DIR)
[ 14s] -- OptiX not found, disabling it from Cycles
While at it, due to the license issues, my first attempt was to supply the SDK include tree, which might be a feasible workaround, but that fails in the same way…