Skip to content

Silent fallback to the bundled OpenJPH when the system OpenJPH is a newer minor version #2806

Closed

Description

@bim-ba

If the system has OpenJPH 0.33.0, OpenEXR 3.5.3 quietly builds its bundled OpenJPH 0.32 instead of using the system library. The build output gives no warning, so a distribution can ship the wrong library without noticing. Arch did this in openexr 3.5.3-2.

Why the fallback happens

cmake/OpenEXRSetup.cmake asks for openjph 0.32.0 in two ways:

  • find_package(openjph 0.32.0 CONFIG QUIET). OpenJPH's generated version file accepts only the same major.minor, so 0.33.0 is rejected.
  • pkg_check_modules(... openjph=0.32.0). This requires an exact match, so 0.33.0 is rejected too.

Both lookups fail, and the fallback prints only a STATUS line (openjph was not found, using vendored code).

Consequence

The bundled copy built with GCC LTO crashes with SIGILL when the library loads, on CPUs without AVX-512. Details and a proposed fix are in the OpenJPH issue: aous72/OpenJPH#416 (fix: aous72/OpenJPH#417). Arch fixed its package by removing the version from find_package (3.5.3-3).

Suggestion

When a system OpenJPH is found but rejected on version, print message(WARNING ...) with the found and the required version. An option that turns this into an error would also help packagers.

I can send a pull request for the warning if you want it.

Activity

  1. cary-ilm commented on Nov 4, 2026

    @cary-ilm
    Member

    See #2813, that should address this. Thanks for calling this to our attention.

  2. cary-ilm commented on Nov 15, 2026

    @cary-ilm
    Member

    Should be resolved in v3.5.4. Feel free to reopen if this doesn't fix the issue for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions