Trying to compile the [https://github.com/boberfly/GafferCycles/tree/oidn](oidn branch of gafferCycles) to get OpenImageDenoise working in Gaffer.
# Compile with vfx reference platform docker
docker run -it --mount type=bind,source=/pod/sw/compile/gaffercycles,target=/root --mount type=bind,source=/opt,target=/root/opt --entrypoint /bin/bash gaffercycles-1
# Set up env
export GAFFER_ROOT=~/opt/gaffer/gaffer
# export GAFFERCYCLES=~/opt/gaffer/extensions/gafferCycles-oidn-0.10.2-gaffer-0.54.2.0
export GAFFERCYCLES=/root/gafferCycles-oidn-0.10.2-gaffer-0.54.2.0
export LD_LIBRARY_PATH=$GAFFER_ROOT/lib
export PATH=$GAFFER_ROOT/bin:$PATH
export PYTHONHOME=~/opt/gaffer/gaffer
export GITHUB_RELEASE_TOKEN=10.2
git clone --recurse-submodules https://github.com/boberfly/GafferCycles.git
cd GafferCycles
# modify dependencies/build/build.py to bypass ssl checking so gflags compiles
import ssl
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
urllib.urlretrieve( download, archivePath, context=ctx)
scl enable devtoolset-6 bash
cd GafferCycles/dependencies
python ./build/build.py --project Gflags --buildDir $GAFFERCYCLES --forceCCompiler gcc --forceCxxCompiler g++
python ./build/build.py --project Glog --buildDir $GAFFERCYCLES --forceCCompiler gcc --forceCxxCompiler g++
python ./build/build.py --project Embree --buildDir $GAFFERCYCLES --forceCCompiler gcc --forceCxxCompiler g++
python ./build/build.py --project OpenSubdiv --buildDir $GAFFERCYCLES --forceCCompiler gcc --forceCxxCompiler g++
python ./build/build.py --project OpenImageDenoise --gafferRoot $GAFFER_ROOT --buildDir $GAFFERCYCLES --forceCCompiler gcc --forceCxxCompiler g++
cd ../build
export OPTIX_ROOT=/optix
cmake -DCMAKE_CXX_COMPILER=g++ -DGAFFER_ROOT=$GAFFER_ROOT -DCMAKE_INSTALL_PREFIX=$GAFFERCYCLES -DWITH_CYCLES_EMBREE=ON -DWITH_CYCLES_OPENSUBDIV=ON -DWITH_CYCLES_LOGGING=ON -DWITH_CYCLES_DEVICE_OPTIX=ON -DOPTIX_ROOT_DIR=$OPTIX_ROOT ..
make -j4
# error: can't find OpenImageDenoise/oidn.hpp
cp -R $GAFFERCYCLES/include/OpenImageDenoise ../include/
make -j4
export GAFFERCYCLES=/opt/gaffer/extensions/gafferCycles-oidn-0.10.2-gaffer-0.55.0.0
export GAFFER_EXTENSION_PATHS=${GAFFERCYCLES}:$GAFFER_EXTENSION_PATHS
export LD_LIBRARY_PATH=${GAFFERCYCLES}/lib:${GAFFERCYCLES}/lib64
export GAFFER_ROOT=/opt/gaffer/gaffer
exec ${GAFFER_ROOT}/bin/gaffer
ERROR : startup/gui/menus.py : Error loading OIDN module - "/opt/gaffer/extensions/gafferCycles-oidn-0.10.2-gaffer-0.55.0.0/lib/libGafferOIDN.so: undefined symbol: oidnReleaseDevice".
Traceback (most recent call last):
File "/opt/gaffer/extensions/gafferCycles-oidn-0.10.2-gaffer-0.55.0.0/startup/gui/menus.py", line 85, in <module>
import GafferOIDN
File "/opt/gaffer/extensions/gafferCycles-oidn-0.10.2-gaffer-0.55.0.0/python/GafferOIDN/__init__.py", line 37, in <module>
from _GafferOIDN import *
ImportError: /opt/gaffer/extensions/gafferCycles-oidn-0.10.2-gaffer-0.55.0.0/lib/libGafferOIDN.so: undefined symbol: oidnReleaseDevice
docker run -it --mount type=bind,source=/pod/sw/compile/gaffercycles,target=/root --mount type=bind,source=/opt,target=/root/opt --entrypoint /bin/bash gaffercycles-1
export GAFFER_ROOT=/opt/gaffer/gaffer
export GAFFERCYCLES=/gafferCycles-oidn-0.10.2-gaffer-0.55.0.0
export LD_LIBRARY_PATH=$GAFFER_ROOT/lib
export PATH=$GAFFER_ROOT/bin:$PATH
export PYTHONHOME=/opt/gaffer/gaffer
export GITHUB_RELEASE_TOKEN=10.2
export OPTIX_ROOT=/opt/optix/NVIDIA-OptiX-SDK-7.0.0-linux64
cd ~/GafferCycles/dependencies python ./build/build.py --project Gflags --buildDir $GAFFERCYCLES --buildType debug --forceCCompiler gcc --forceCxxCompiler g++ python ./build/build.py --project Glog --buildDir $GAFFERCYCLES --buildType debug --forceCCompiler gcc --forceCxxCompiler g++ python ./build/build.py --project Embree --buildDir $GAFFERCYCLES --buildType debug --forceCCompiler gcc --forceCxxCompiler g++
python ./build/build.py --project OpenSubdiv --buildDir $GAFFERCYCLES --buildType debug --forceCCompiler gcc --forceCxxCompiler g++
RUN yum install -y compat-glew glew-devel glew libGLEW tbb tbb-devel
python ./build/build.py --project OpenImageDenoise --gafferRoot $GAFFER_ROOT --buildDir $GAFFERCYCLES --buildType debug --forceCCompiler gcc --forceCxxCompiler g++
cd ../build cmake -DCMAKE_CXX_COMPILER=g++ -DGAFFER_ROOT=$GAFFER_ROOT -DCMAKE_INSTALL_PREFIX=$GAFFERCYCLES -DWITH_CYCLES_EMBREE=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_CYCLES_OPENSUBDIV=ON -DWITH_CYCLES_LOGGING=ON -DWITH_CYCLES_DEVICE_OPTIX=ON -DOPTIX_ROOT_DIR=$OPTIX_ROOT .. make -j4
cp -R $GAFFERCYCLES/include/OpenImageDenoise ../include/
make -j4
make install