Skip to content

Conversation

@boberfly
Copy link
Contributor

@boberfly boberfly commented Sep 2, 2025

Description

Look for boost headers for OpenVDBs older than 12. I was getting issues along the lines of this:

C:\Users\bober\packages\openvdb\11.0.0\platform-windows\arch-AMD64\python-3.11\include\openvdb\math\Math.h(13,10): error C1083: Cannot open include file: 'boost/numeric/conversio
n/conversion_traits.hpp': No such file or directory [C:\dev\rpks\openimageio\3.0.9.0\build\df31b1486e506952d10f9e8ae1f90b5a2144114d\_OpenImageIO\working\OpenImageIO-3.0.9.0\build
\src\libOpenImageIO\OpenImageIO.vcxproj]

Not too sure if my approach is the best but it fixed it for me on Windows MSVC v143/VS2022. I was building against OpenVDB 11 but I didn't test older versions. OpenVDB 12 I did test and it wasn't needed.

Tests

Not too sure how to make one, it is more or less a compiling bugfix.

Checklist:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable. (Check if there is no
    need to update the documentation, for example if this is a bug fix that
    doesn't change the API.)
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • If I added or modified a C++ API call, I have also amended the
    corresponding Python bindings (and if altering ImageBufAlgo functions, also
    exposed the new functionality as oiiotool options).
  • My code follows the prevailing code style of this project. If I haven't
    already run clang-format before submitting, I definitely will look at the CI
    test that runs clang-format and fix anything that it highlights as being
    nonconforming.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 2, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: boberfly / name: Alex Fuller (12d2b01)

DEPS TBB
DEFINITIONS USE_OPENVDB=1)
# Note: OpenVDB older than 12 needs Boost headers.
if (OpenVDB_FOUND AND OpenVDB_VERSION LESS 12)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be VERSION_LESS

@lgritz
Copy link
Collaborator

lgritz commented Sep 2, 2025

I'm tempted to think that the extra logic here should instead all be going inside FindOpenVDB.cmake.

@lgritz
Copy link
Collaborator

lgritz commented Sep 3, 2025

Well, that kind of backfired, now it's failing a bunch of tests. I'm not quite sure why.


# Note: OpenVDB older than 12 needs Boost headers.
if (OpenVDB_VERSION VERSION_LESS 12)
checked_find_package (Boost)
Copy link
Collaborator

@lgritz lgritz Sep 3, 2025

Choose a reason for hiding this comment

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

Suggested change
checked_find_package (Boost)
find_package (Boost)

I think it's failing because checked_find_package is not recursion-safe.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, definitely. I can see how the checked_find_package is not at all safe to be called recursively.

So we either need to use find_package here instead of checked_find_package, or else move the boost logic back to externalpackages.cmake (sorry, maybe I steered you wrong).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All good @lgritz I force-pushed the find_package approach and see what the CI will do - sorry I just got some time to get back to this, and if it doesn't work I'll put it back outside...

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 to me now, sorry about the runaround

@lgritz lgritz merged commit 7aabc2b into AcademySoftwareFoundation:main Sep 6, 2025
30 checks passed
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Sep 6, 2025
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Sep 6, 2025
zachlewis pushed a commit to zachlewis/OpenImageIO that referenced this pull request Sep 16, 2025
lgritz pushed a commit to lgritz/OpenImageIO that referenced this pull request Sep 17, 2025
@lgritz lgritz added the build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. label Oct 11, 2025
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