[Bug 262888] graphics/poppler 21.12.0_1 Cannot Find libopenjpeg2

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 31 Mar 2022 00:08:14 UTC

Adriaan de Groot <adridg@freebsd.org> changed:

           What    |Removed                     |Added
                 CC|                            |adridg@freebsd.org

--- Comment #16 from Adriaan de Groot <adridg@freebsd.org> ---
This is quite sensitive to installed versions, paths, and filesystem order.

- I have a 12.3 VM which I installed openjpeg15 and openjpeg in (so, that's
versions 1.5 and 2.4 of the same library). This gave me two files called
OpenJPEGConfig.cmake, one in /usr/local/lib/openjpeg-1.5 and one in
/usr/local/lib/openjpeg-2.4. On this system, poppler fails to configure, as
described in this PR.
- I have a 13.0 jail with openjpeg15 and openjpeg installed, that's my
poudriere jail, and here the config files live in /usr/local/lib/openjpeg-2.4
and /usr/localshare/openjpeg. On this system, poppler can be configured and
builds just fine.

Making poppler search for a specific version, e.g. `find_package(OpenJPEG 2)`
fails because neither of the config files defines a version in a way that
standard cmake-version-checking understands.

So it comes down to: if both are installed, and in paths such that the 1.5
version is found first, things will go sideways. An underlying fix is to make
openjpeg report its version correctly to CMake -- that is a patch that makes
sense for version 2 and could be filed upstream -- and then make poppler look
for version 2 as well.

You are receiving this mail because:
You are the assignee for the bug.