"ld: library not found for -lopenjp2" on MacOS
Submitted by Tom Duck
Assigned to poppler-bugs
Link to original bug (#107063)
Description
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.