PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6k stars 1.18k forks source link

Build failure on latest dev due to missing OpenEXR dependency of OpenImageIO #3143

Closed DDoS closed 2 months ago

DDoS commented 2 months ago

Description of Issue

The dev branch doesn't build because OpenImageIO can't find OpenEXR. This is because commit 5332d627cb28991e812acd67b8971e87367d9191 removed the OpenEXR path from the OpenImageIO CMake variables (-DOPENEXR_ROOT=...), and attempted to turn off the feature using -DUSE_OPENEXR=OFF. Unfortunately this is a required dependency of OpenImageIO v2.3.21.0, and the flag USE_OPENEXR doesn't exist.

See <install path>/src/OpenImageIO-2.3.21.0/src/cmake/externalpackages.cmake:

# IlmBase & OpenEXR
checked_find_package (OpenEXR REQUIRED
                      VERSION_MIN 2.0
                      RECOMMEND_MIN 2.2
                      RECOMMEND_MIN_REASON "for DWA compression"
                      PRINT IMATH_INCLUDES OPENEXR_INCLUDES)

As the message on the previous code mentions, I think this still builds for some people because it's instead finding a system install of OpenImageIO.

Also even the latest version of OpenImageIO required OpenEXR, see: https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/8ae48b280439abae6b971062e9413be938469b3d/src/cmake/externalpackages.cmake#L63, so I believe this commit should just be reverted.

Steps to Reproduce

  1. Make sure you don't have OpenImageIO installed anywhere
  2. Use CMake 3.29 (might not make a difference, but that's what I used).
  3. Perform a clean build of commit 5332d627cb28991e812acd67b8971e87367d9191
  4. Build should fail on the OpenImageIO dependency

System Information (OS, Hardware)

Package Versions

dev@5332d627cb28991e812acd67b8971e87367d9191

Build Flags

python -u build_scripts/build_usd.py --generator Ninja --build-variant relwithdebuginfo --build build/Release install/Release --tests --cmake-build-args="-DPXR_ENABLE_VULKAN_SUPPORT=ON -DPXR_BUILD_GPU_SUPPORT=ON"

sunyab commented 2 months ago

Hi, thanks for filing the issue -- we ran into the same problems as well and have a fix that will be pushed up to the dev branch shortly.

DDoS commented 2 months ago

Feel free to close this then. Thanks.

sunyab commented 2 months ago

Closing this out per comments above. Thanks!