I have been following the instructions here from Hugo Desrosiers.
(Instructions pasted below)
• Install Nvidia CUDA toolkit 10.2 as per Bruno Wego's method.
wget 'https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_mac.dmg' && \
hdiutil attach cuda_10.2.89_mac.dmg \
-nobrowse \
-mountpoint \
/Volumes/CUDAMacOSXInstaller
open /Volumes/CUDAMacOSXInstaller/CUDAMacOSXInstaller.app
hdiutil detach /Volumes/CUDAMacOSXInstaller && rm ./cuda_10.2.89_mac.dmg
Prepare for a build on mac os x as per Blender instructions, quick setup. Do the
make update
make
to test the ability to build the CPU version first (and fix whatever is missing until the build works). Fix file blender/intern/cycles/device/cuda/device_cuda_impl.cpp, in function CUDADevice::compile_kernel_get_common_cflags. Add the string "-std=c++14 " as first argument of the string_printf (don't omit the trailing space!). It should look like this:
string cflags = string_printf(
"-std=c++14 "
"-m%d "
"--ptxas-options=\"-v\" "
"--use_fast_math "
"-DNVCC "
"-I\"%s\"",
machine,
include_path.c_str());
Modify the file lib/darwin/nanovdb/include/nanovdb/NanoVDB.h (that's obtained during the make update), fixing all the static_assert calls for which the 1st param is a C++ templatised value that have an extra comma by simply putting the expression in parenthesis, so the non-C++14 compiler don't get confused. This is the diff I got after the fix:
887c887
< static_assert(is_same<int, typename CoordT::ValueType>::value, "Expected \"int\" coordinate type");
---
> static_assert((is_same<int, typename CoordT::ValueType>::value), "Expected \"int\" coordinate type");
1515,1516c1515,1516
< static_assert(is_same<NodeType<0>, LeafNodeType>::value, "NodeType<0> error");
< static_assert(is_same<NodeType<3>, RootType>::value, "NodeType<3> error");
---
> static_assert((is_same<NodeType<0>, LeafNodeType>::value), "NodeType<0> error");
> static_assert((is_same<NodeType<3>, RootType>::value), "NodeType<3> error");
1594c1594
< static_assert(is_same<NodeType<NodeT::LEVEL>, NodeT>::value, "Tree::getNode: unvalid node type");
---
> static_assert((is_same<NodeType<NodeT::LEVEL>, NodeT>::value), "Tree::getNode: unvalid node type");
1611c1611
< static_assert(is_same<NodeType<NodeT::LEVEL>, NodeT>::value, "Tree::getNode: unvalid node type");
---
> static_assert((is_same<NodeType<NodeT::LEVEL>, NodeT>::value), "Tree::getNode: unvalid node type");
2425c2425
< static_assert(is_same<T, NodeT>::value, "ReadAccessor::getNode: Invalid node type");
---
> static_assert((is_same<T, NodeT>::value), "ReadAccessor::getNode: Invalid node type");
Build blender with GPU support for cycles (replace sm_61 by the CUDA Compute level your card supports):
make WITH_CYCLES_CUDA_BINARIES=ON DCYCLES_CUDA_BINARIES_ARCH=sm_61
(Instructions end)
I have got Blender to compile as far as 95%. Looking back in the terminal it seems that there is one fatal error
:
blender-git/blender/extern/audaspace/plugins/jack/JackDevice.h:36:10: fatal error: 'jack/jack.h' file not found