From 251c5599934f7dfd0b301b1a4bb4e2db32a5772d Mon Sep 17 00:00:00 2001 From: John Haddon Date: Wed, 2 Mar 2022 15:45:42 +0000 Subject: [PATCH 1/7] OpenColorIO : Fix Mac build --- OpenColorIO/config.py | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/OpenColorIO/config.py b/OpenColorIO/config.py index cda8f379cf..c27d1a21cf 100644 --- a/OpenColorIO/config.py +++ b/OpenColorIO/config.py @@ -15,6 +15,7 @@ "environment" : { + "PATH" : "{buildDir}/bin:$PATH", "LD_LIBRARY_PATH" : "{buildDir}/lib:$LD_LIBRARY_PATH", }, @@ -26,22 +27,21 @@ " -D CMAKE_CXX_STANDARD={c++Standard}" " -D CMAKE_INSTALL_PREFIX={buildDir}" " -D CMAKE_PREFIX_PATH={buildDir}" + " -D Python_ROOT_DIR={buildDir}" " -D BUILD_SHARED_LIBS=ON" " -D OCIO_BUILD_APPS=OFF" " -D OCIO_BUILD_NUKE=OFF" + " -D OCIO_BUILD_TESTS=OFF" + " -D OCIO_BUILD_GPU_TESTS=OFF" # Will need removing when we update to OpenEXR 3 " -D OCIO_USE_OPENEXR_HALF=ON" + " -D OCIO_PYTHON_VERSION={pythonMajorVersion}" " ..", "cd build && make clean && make VERBOSE=1 -j {jobs} && make install", "mkdir -p {buildDir}/python", - # OpenColorIO's CMake setup uses GNUInstallDirs, which unhelpfully - # puts the libraries in `lib64`. Move them back. We'd like to do this - # in the build itself by passing `-D CMAKE_INSTALL_LIBDIR={buildDir}/lib` - # but that breaks OpenColorIO's internal libexpat setup. - "mv {buildDir}/lib64/libOpenColorIO* {buildDir}/lib", - "mv {buildDir}/lib64/python*/site-packages/PyOpenColorIO* {buildDir}/python", + "{libCopyCommands}", "mkdir -p {buildDir}/openColorIO", "cp ../OpenColorIO-Configs-1.0_r2/nuke-default/config.ocio {buildDir}/openColorIO", @@ -58,4 +58,30 @@ ], + "platform:linux" : { + + "variables" : { + + "libCopyCommands" : + # OpenColorIO's CMake setup uses GNUInstallDirs, which unhelpfully + # puts the libraries in `lib64`. Move them back. We'd like to do this + # in the build itself by passing `-D CMAKE_INSTALL_LIBDIR={buildDir}/lib` + # but that breaks OpenColorIO's internal libexpat setup. + "mv {buildDir}/lib*/libOpenColorIO* {buildDir}/lib;" + "mv {buildDir}/lib*/python*/site-packages/PyOpenColorIO* {buildDir}/python", + + } + + }, + + "platform:osx" : { + + "variables" : { + + "libCopyCommands" : "", + + } + + }, + } From 525c550e27c2df50e7ee75c07536884b3a3a458f Mon Sep 17 00:00:00 2001 From: John Haddon Date: Wed, 2 Mar 2022 15:46:28 +0000 Subject: [PATCH 2/7] OpenEXR : Fix mac build --- OpenEXR/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenEXR/config.py b/OpenEXR/config.py index 93208943dd..bb9246537b 100644 --- a/OpenEXR/config.py +++ b/OpenEXR/config.py @@ -33,7 +33,12 @@ " -D Python_ROOT_DIR={buildDir}" " -D Python2_ROOT_DIR={buildDir}" " -D Python3_ROOT_DIR={buildDir}" + " -D Python_FIND_STRATEGY=LOCATION" + " -D Python2_FIND_STRATEGY=LOCATION" " -D Python3_FIND_STRATEGY=LOCATION" + # Stop Mac build finding a system Python 3 install + # that causes a Python 2 build to fail. + " -D Python3_FIND_VERSION_MAJOR={pythonMajorVersion}" " ." , From fc60ff0ade866a94d564e187e0ed842020280e21 Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 3 Mar 2022 10:28:17 +0000 Subject: [PATCH 3/7] Appleseed : Fix OpenImageIO linking on Mac --- Appleseed/patches/oiio.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Appleseed/patches/oiio.patch b/Appleseed/patches/oiio.patch index f8d73dea68..9f8001467e 100644 --- a/Appleseed/patches/oiio.patch +++ b/Appleseed/patches/oiio.patch @@ -8,3 +8,14 @@ #include "OpenImageIO/typedesc.h" #include "foundation/platform/_endoiioheaders.h" +--- a/cmake/modules/FindOpenImageIO.cmake 2022-03-03 10:25:16.000000000 +0000 ++++ b/cmake/modules/FindOpenImageIO.cmake 2022-03-03 10:24:35.000000000 +0000 +@@ -57,7 +57,7 @@ + # Set the output variables. + if (OPENIMAGEIO_FOUND) + set (OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR}) +- set (OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY}) ++ set (OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY} OpenImageIO_Util) + else () + set (OPENIMAGEIO_INCLUDE_DIRS) + set (OPENIMAGEIO_LIBRARIES) From 0bdbd4ac5be551806d47511671a0d28f83b1830c Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 3 Mar 2022 11:52:20 +0000 Subject: [PATCH 4/7] OpenVDB : Fix mac build This was failing since I installed Python 3 locally - CMake was preferring the Python 3 on the machine to the Python 2 in the build directory. --- OpenVDB/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenVDB/config.py b/OpenVDB/config.py index 91f40c8999..93b2ff34bf 100644 --- a/OpenVDB/config.py +++ b/OpenVDB/config.py @@ -33,6 +33,8 @@ " -D PYOPENVDB_INSTALL_DIRECTORY={buildDir}/python" " -D Python_ROOT_DIR={buildDir}" " -D Python_FIND_STRATEGY=LOCATION" + " -D Python_FIND_VERSION={pythonVersion}" + " -D Python_FIND_VERSION_MAJOR={pythonMajorVersion}" " -D BOOST_ROOT={buildDir}" " -D Boost_NO_SYSTEM_PATHS=ON" " .." From 688d55872dd945754c9abb0563bb6d9c21b4d840 Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 3 Mar 2022 11:48:41 +0000 Subject: [PATCH 5/7] Cortex : Fix IECoreUSD build --- Cortex/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Cortex/config.py b/Cortex/config.py index ee2d523a61..bd74728cfa 100644 --- a/Cortex/config.py +++ b/Cortex/config.py @@ -52,6 +52,7 @@ " APPLESEED_ROOT={buildDir}/appleseed" " APPLESEED_INCLUDE_PATH={buildDir}/appleseed/include" " APPLESEED_LIB_PATH={buildDir}/appleseed/lib" + " USD_LIB_PREFIX=usd_" " ENV_VARS_TO_IMPORT='LD_LIBRARY_PATH TERM'" " OPTIONS=''" " SAVE_OPTIONS=gaffer.options", From 06d0a9997437b3bc9307f3755fd25bdbaf234c1d Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 3 Mar 2022 12:05:53 +0000 Subject: [PATCH 6/7] OpenColorIO : Fix Python 3 build on Linux --- OpenColorIO/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenColorIO/config.py b/OpenColorIO/config.py index c27d1a21cf..ccd9d1fe97 100644 --- a/OpenColorIO/config.py +++ b/OpenColorIO/config.py @@ -28,6 +28,7 @@ " -D CMAKE_INSTALL_PREFIX={buildDir}" " -D CMAKE_PREFIX_PATH={buildDir}" " -D Python_ROOT_DIR={buildDir}" + " -D Python_FIND_STRATEGY=LOCATION" " -D BUILD_SHARED_LIBS=ON" " -D OCIO_BUILD_APPS=OFF" " -D OCIO_BUILD_NUKE=OFF" @@ -35,7 +36,7 @@ " -D OCIO_BUILD_GPU_TESTS=OFF" # Will need removing when we update to OpenEXR 3 " -D OCIO_USE_OPENEXR_HALF=ON" - " -D OCIO_PYTHON_VERSION={pythonMajorVersion}" + " -D OCIO_PYTHON_VERSION={pythonVersion}" " ..", "cd build && make clean && make VERBOSE=1 -j {jobs} && make install", From 79c7feaf14a41213af0e4f9919962be64bb45444 Mon Sep 17 00:00:00 2001 From: John Haddon Date: Thu, 3 Mar 2022 12:30:04 +0000 Subject: [PATCH 7/7] Bump version to 5.0.0a2 and update Changes.md --- Changes.md | 9 +++++++++ build.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index 86c0bda1f6..b9b54b1814 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,12 @@ +5.0.0a2 (relative to 5.0.0a1) +------- + +- Appleseed : Fixed MacOS build. +- Cortex : Fixed IECoreUSD build. +- OpenColorIO : Fixed MacOS build and Linux Python 3 build. +- OpenEXR : Fixed MacOS build. +- OpenVDB : Fixed MacOS build. + 5.0.0a1 (relative to 4.0.0) ------- diff --git a/build.py b/build.py index 7664b3ad3c..8212b45255 100755 --- a/build.py +++ b/build.py @@ -14,7 +14,7 @@ import tarfile import zipfile -__version = "5.0.0a1" +__version = "5.0.0a2" """ Config file format