Bug 107063

Summary: "ld: library not found for -lopenjp2" on MacOS
Product: poppler Reporter: Tom Duck <tomduck>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Tom Duck 2018-06-28 15:06:46 UTC
The following error occurs during `make` on MacOS High Sierra 10.13.5:

    ld: library not found for -lopenjp2

The library is in /usr/local/lib and was installed from source:

    $ cd /usr/local/lib
    $ ls -1 *libopenjp2*
    libopenjp2.2.3.0.dylib*
    libopenjp2.7.dylib@
    libopenjp2.a
    libopenjp2.dylib@

Inspection of CMakeFiles/poppler.dir/link.txt in the poppler build directory shows lots of fully resolved paths, and two references to `-lopenjp2`.  I removed them both and added the following path instead:

    /usr/local/lib/libopenjp2.dylib

After this the build and install complete successfully.
Comment 1 GitLab Migration User 2018-08-21 10:48:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/382.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.