AcademySoftwareFoundation / openexr

The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
http://www.openexr.com/
BSD 3-Clause "New" or "Revised" License
1.64k stars 620 forks source link

Build broken in 5 Oct 2024 commit 937a0e7: Imath no longer automatically provided #1888

Open tellypresence opened 1 month ago

tellypresence commented 1 month ago

[Updated: isolated precise commit where things broke]

Had been building OpenEXR reliably prior to commit 937a0e7, at which point a change was made and now Imath (which used to be done automatically) is no longer available, breaking the build...

Build error messages:

CMake Warning at .../openexr/cmake/OpenEXRSetup.cmake:273 (find_package):
  By not providing "FindImath.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Imath", but
  CMake did not find one.

  Could not find a package configuration file provided by "Imath" (requested
  version 3.1) with any of the following names:

    ImathConfig.cmake
    imath-config.cmake

  Add the installation prefix of "Imath" to CMAKE_PREFIX_PATH or set
  "Imath_DIR" to a directory containing one of the above files.  If "Imath"
  provides a separate development package or SDK, be sure it has been
  installed.
...
CMake Error: install(EXPORT "OpenEXR" ...) includes target "OpenEXRCore" 
    which requires target "Imath" that is not in any export set.
CMake Error: install(EXPORT "OpenEXR" ...) includes target "OpenEXR" 
    which requires target "Imath" that is not in any export set.
cary-ilm commented 1 month ago

This may be related to #1880, could you possibly test that fix? A change to FetchContent had unintended consequences.

tellypresence commented 1 month ago

This may be related to #1880, could you possibly test that fix? A change to FetchContent had unintended consequences.

Thank you for the suggestion. I tried using the code modifications in PR #1880, but still fail to build. Not sure it it's quite applicable in my case since I'm on recent version of CMake 3.30.5 (also, the library throwing errors is Imath not libdeflate)

tellypresence commented 1 month ago

By reverting line 292 in cmake/OpenEXRSetup.cmake to use FetchContent_Populate Imath again populates automatically.

[Updated] For now I will patch cmake/OpenEXRSetup.cmake to revert to FetchContent_Populate. This will allow me to stay up to date with new OpenEXR releases for the time being