Skip to content

Commit 9654922

Browse files
committed
Arnold output driver : Don't link to libai.so
This was causing crashes at render shutdown in Gaffer unless we either used `RTLD_GLOBAL` or we used `LD_PRELOAD=libai.so`. The crashes were always during deallocation, so I suspect that we were getting mismatched allocation/deallocation between Arnold's allocator and our own.
1 parent 17562fc commit 9654922

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SConstruct

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2995,6 +2995,10 @@ arnoldPythonModuleEnv.Append(
29952995
arnoldDriverEnv = arnoldEnv.Clone( IECORE_NAME = "ieOutputDriver" )
29962996
arnoldDriverEnv["SHLIBPREFIX"] = ""
29972997
arnoldDriverEnv["SHLIBSUFFIX"] = ".so" if env["PLATFORM"] != "win32" else ".dll"
2998+
if env["PLATFORM"]=="darwin" :
2999+
# Symbols we need from `libai.dylib` will be resolved at runtime when Arnold
3000+
# loads the driver.
3001+
arnoldDriverEnv.Append( LINKFLAGS = "-Wl,-undefined,dynamic_lookup" )
29983002

29993003
haveArnold = False
30003004

@@ -3041,7 +3045,6 @@ if doConfigure :
30413045

30423046
arnoldDriverEnv.Append(
30433047
LIBS = [
3044-
"ai",
30453048
os.path.basename( coreEnv.subst( "$INSTALL_LIB_NAME" ) ),
30463049
os.path.basename( imageEnv.subst( "$INSTALL_LIB_NAME" ) ),
30473050
os.path.basename( arnoldEnv.subst( "$INSTALL_LIB_NAME" ) ),

0 commit comments

Comments
 (0)