Skip to content

Commit 13ea9ca

Browse files
committed
allow building RV with older version of OIIO
Newer version of RV (>=2022.3.0) is crashing randomly on startup. After few trial and error the combination that seems to work is to build cortex for RV by using OIIO libraries packaged with RV. That library is older enough so to not contain OpenImageIO_Util library which is assumed to exist in SConstruct configuration. These changes will allow to use that older version. There still occasional "double memory free" crushes on application close. But I could not yet figure out how to address that. Theoretically that crash is because of incompatible version of boost. However, using proper version of boost doesn't seem enough.
1 parent 996cbc1 commit 13ea9ca

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

SConstruct

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ o.Add(
260260
"",
261261
)
262262

263+
o.Add(
264+
BoolVariable( "WITH_OIIO_UTIL", "Build with OpenImageIO_Util", True ),
265+
)
266+
263267
# Blosc options
264268

265269
o.Add(
@@ -1858,13 +1862,14 @@ imageEnvPrepends = {
18581862
],
18591863
"LIBS" : [
18601864
"OpenImageIO$OIIO_LIB_SUFFIX",
1861-
"OpenImageIO_Util$OIIO_LIB_SUFFIX",
18621865
],
18631866
"CXXFLAGS" : [
18641867
"-DIECoreImage_EXPORTS",
18651868
systemIncludeArgument, "$OIIO_INCLUDE_PATH"
18661869
]
18671870
}
1871+
if imageEnv.get( "WITH_OIIO_UTIL", True ):
1872+
imageEnvPrepends["LIBS"].append( "OpenImageIO_Util$OIIO_LIB_SUFFIX" )
18681873

18691874
imageEnv.Prepend( **imageEnvPrepends )
18701875
# Windows uses PATH for to find libraries, we must append to it to make sure we don't overwrite existing PATH entries.
@@ -2216,11 +2221,12 @@ if env["WITH_GL"] and doConfigure :
22162221
os.path.basename( imageEnv.subst( "$INSTALL_LIB_NAME" ) ),
22172222
os.path.basename( sceneEnv.subst( "$INSTALL_LIB_NAME" ) ),
22182223
"OpenImageIO$OIIO_LIB_SUFFIX",
2219-
"OpenImageIO_Util$OIIO_LIB_SUFFIX",
22202224
"GLEW$GLEW_LIB_SUFFIX",
22212225
"boost_wave$BOOST_LIB_SUFFIX",
22222226
]
22232227
)
2228+
if glEnv.get( "WITH_OIIO_UTIL", True ):
2229+
glEnv.Append( LIBS = [ "OpenImageIO_Util$OIIO_LIB_SUFFIX", ] )
22242230

22252231
if env["PLATFORM"]=="darwin" :
22262232
glEnv.Append(

config/ie/options

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ oiioRoot = os.path.join( "/software", "apps", "OpenImageIO", oiioVersion, platfo
196196
OIIO_INCLUDE_PATH = os.path.join( oiioRoot, "include" )
197197
OIIO_LIB_PATH = os.path.join( oiioRoot, "lib64" )
198198
OIIO_LIB_SUFFIX = IEEnv.BuildUtil.libSuffix( "OpenImageIO", oiioLibSuffix )
199+
WITH_OIIO_UTIL = "true"
199200

200201
FREETYPE_LIB_PATH = os.path.join( "/software", "tools", "lib", platform, compiler, compilerVersion )
201202
FREETYPE_INCLUDE_PATH = "/usr/include/freetype2"
@@ -436,6 +437,9 @@ if targetApp=="rv" :
436437
# the default `OIIO_INCLUDE_PATH` value.
437438
OIIO_LIB_PATH = rvLibs
438439
OIIO_LIB_SUFFIX = rvReg.get( "OpenImageIOLibSuffix", OIIO_LIB_SUFFIX )
440+
# current version of OIIO used by RV doesn't include the Util library
441+
# this variable will tell the build process to not require it
442+
WITH_OIIO_UTIL = rvReg.get( "WithOpenImageIOUtil", WITH_OIIO_UTIL )
439443

440444
# find doxygen
441445
DOXYGEN = os.path.join( "/software/apps/doxygen", os.environ["DOXYGEN_VERSION"], platform, "bin", "doxygen" )

0 commit comments

Comments
 (0)