Skip to content

Conversation

@zachlewis
Copy link
Collaborator

  • Add build recipes for certain dependencies needed for linking static OpenColorIO libs: expat, minizip-ng, pystring, and yaml-cpp

  • Add SOURCE_SUBDIR option to build_dependency_with_cmake that mimics the behavior of the FetchContent option of the same name

  • Tweak OpenColorIO build recipe to always build static libraries by default.

@lgritz
Copy link
Collaborator

lgritz commented Nov 1, 2024

Problem on Windows?

@zachlewis
Copy link
Collaborator Author

Problems on Windows, a tale older than time itself.

Just a little trouble with finding Expat's config. I haven't looked into this too carefully yet -- I'll have another go today.

@zachlewis zachlewis force-pushed the feat/static_ocio branch 6 times, most recently from 5cf8575 to c854c87 Compare November 1, 2024 19:02
@zachlewis
Copy link
Collaborator Author

So close.

I'm not quite sure what's happening here, but there seems to be a problem with reliably finding pystring after it's built.

As you can see, all the CI tests pass for c854c87;

but...

There aren't really any significant differences between the commits, just alternating between finding and re-finding pystring.

Pystring compiles really quickly. I'm wondering if there's some kind of race condition occurring, or if the "find_package" command is bumping into a cache somewhere that isn't being updated quickly enough... or... something? Maybe I'll try deferring the REQUIRED find_package to after the OCIO build...

On the bright side, stuff seems to work ~95% of the time!

@zachlewis
Copy link
Collaborator Author

Nice, putting some distance between building pystring and REQUIRED-finding it seems to more reliably pass all CI checks.

@zachlewis zachlewis marked this pull request as ready for review November 1, 2024 20:59
 * Add SOURCE_SUBDIR option to `build_dependency_with_cmake` that mimics the behavior of the FetchContent option of the same name

 * Add build recipes for certain dependencies needed for linking static OpenColorIO libs: expat, minizip-ng, pystring, and yaml-cpp

 * Tweak OpenColorIO build recipe to always build static libraries by default.

Signed-off-by: Zach Lewis <[email protected]>
If we let the build system build OCIO, its build directory should persist for the duration of the parent OIIO build. Try to find the static dependencies that OCIO builds for itself in <OCIO-build-dir>/ext/dist; and if that fails, try to build and install those same static libraries ourselves.

Signed-off-by: Zach Lewis <[email protected]>
that didn't seem to work too well.

Signed-off-by: Zach Lewis <[email protected]>
_Occasionally_, libpystring can't be re-found once it's built, and it's not clear why. Attempting various tiny changes to see if I can figure out what's going wrong where ....

Signed-off-by: Zach Lewis <[email protected]>
Really just an excuse to assess the reliability of the CI tests

Signed-off-by: Zach Lewis <[email protected]>
Triggering another CI run to assess reliability.

Signed-off-by: Zach Lewis <[email protected]>
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and seems to pass all tests now!

@lgritz lgritz merged commit 2f0caf7 into AcademySoftwareFoundation:main Nov 6, 2024
27 checks passed
@lgritz lgritz added the build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. label Nov 6, 2024
@zachlewis zachlewis deleted the feat/static_ocio branch November 10, 2024 15:42
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Nov 10, 2024
* Add build recipes for certain dependencies needed for linking static
OpenColorIO libs: expat, minizip-ng, pystring, and yaml-cpp

* Add SOURCE_SUBDIR option to `build_dependency_with_cmake` that mimics
the behavior of the FetchContent option of the same name
 
* Tweak OpenColorIO build recipe to always build static libraries by
default.

---------

Signed-off-by: Zach Lewis <[email protected]>
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Nov 10, 2024
* Add build recipes for certain dependencies needed for linking static
OpenColorIO libs: expat, minizip-ng, pystring, and yaml-cpp

* Add SOURCE_SUBDIR option to `build_dependency_with_cmake` that mimics
the behavior of the FetchContent option of the same name
 
* Tweak OpenColorIO build recipe to always build static libraries by
default.

---------

Signed-off-by: Zach Lewis <[email protected]>
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Nov 13, 2024
* Add build recipes for certain dependencies needed for linking static
OpenColorIO libs: expat, minizip-ng, pystring, and yaml-cpp

* Add SOURCE_SUBDIR option to `build_dependency_with_cmake` that mimics
the behavior of the FetchContent option of the same name
 
* Tweak OpenColorIO build recipe to always build static libraries by
default.

---------

Signed-off-by: Zach Lewis <[email protected]>
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Nov 21, 2024
* Add build recipes for certain dependencies needed for linking static
OpenColorIO libs: expat, minizip-ng, pystring, and yaml-cpp

* Add SOURCE_SUBDIR option to `build_dependency_with_cmake` that mimics
the behavior of the FetchContent option of the same name
 
* Tweak OpenColorIO build recipe to always build static libraries by
default.

---------

Signed-off-by: Zach Lewis <[email protected]>
scott-wilson pushed a commit to scott-wilson/OpenImageIO that referenced this pull request May 18, 2025
* Add build recipes for certain dependencies needed for linking static
OpenColorIO libs: expat, minizip-ng, pystring, and yaml-cpp

* Add SOURCE_SUBDIR option to `build_dependency_with_cmake` that mimics
the behavior of the FetchContent option of the same name

* Tweak OpenColorIO build recipe to always build static libraries by
default.

---------

Signed-off-by: Zach Lewis <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants