[poppler] cmake can't find fontconfig, although it's installed

Valerio Messina efa at iol.it
Thu Jan 2 18:15:54 UTC 2020


compilers and make look only for -dev packages, they include files like:
/usr/include/something.h

On your system apparently you have the package:
libopenjp2-7
but not the:
libopenjp2-7-dev

$ apt list libopenjp*dev
Listing... Done
libopenjp2-7-dev/bionic-updates,bionic-security,now 
2.3.0-2build0.18.04.1 amd64 [installed]


Valerio

On 01/02/20 18:41, Knute Snortum wrote:
> Thanks, that got me further.  But now cmake is looking for
> libopenjpeg2 but can't find it.  I can't find any package on my system
> that has "openjpeg" in the name.
> 
> CMake Warning at CMakeLists.txt:204 (find_package):
>    By not providing "FindOpenJPEG.cmake" in CMAKE_MODULE_PATH this project has
>    asked CMake to find a package configuration file provided by "OpenJPEG",
>    but CMake did not find one.
> 
>    Could not find a package configuration file provided by "OpenJPEG" with any
>    of the following names:
> 
>      OpenJPEGConfig.cmake
>      openjpeg-config.cmake
> 
>    Add the installation prefix of "OpenJPEG" to CMAKE_PREFIX_PATH or set
>    "OpenJPEG_DIR" to a directory containing one of the above files.  If
>    "OpenJPEG" provides a separate development package or SDK, be sure it has
>    been installed.
> 
> 
> CMake Error at CMakeLists.txt:207 (message):
>    Install libopenjpeg2 before trying to build poppler.  You can also decide
>    to use the internal unmaintained JPX decoder or none at all.
> 
> 
> -- Configuring incomplete, errors occurred!
> See also "/home/knute/Sources/poppler-0.83.0/build/CMakeFiles/CMakeOutput.log".
> See also "/home/knute/Sources/poppler-0.83.0/build/CMakeFiles/CMakeError.log".
> knute at knute-NUC7PJYH:~/Sources/poppler-0.83.0/build$ sudo apt install
> libopenjpeg2
> [sudo] password for knute:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Unable to locate package libopenjpeg2
> knute at knute-NUC7PJYH:~/Sources/poppler-0.83.0/build$ apt list libopenjpeg*
> Listing... Done
> knute at knute-NUC7PJYH:~/Sources/poppler-0.83.0/build$ apt list *openjpeg*
> Listing... Done
> 
> It looks like I do have a package called libopenjp2-7 installed (is
> that for Python 2.7?)  But cmake doesn't find it or can't use it.
> 
> $ apt search openjpeg
> Sorting... Done
> Full Text Search... Done
> glymur-bin/eoan,eoan 0.8.18-1 all
>    Python tools for accessing JPEG2000 files - scripts
> 
> libopenjp2-7/eoan-updates,eoan-security,now 2.3.0-2build0.19.10.1
> amd64 [installed,automatic]
>    JPEG 2000 image compression/decompression library
> 
> libopenjp2-7-dev/eoan-updates,eoan-security 2.3.0-2build0.19.10.1 amd64
>    development files for OpenJPEG, a JPEG 2000 image library
> 
> libopenjp3d7/eoan-updates,eoan-security 2.3.0-2build0.19.10.1 amd64
>    JP3D (JPEG 2000 / Part 10) image compression/decompression library
> 
> libopenjpip7/eoan-updates,eoan-security 2.3.0-2build0.19.10.1 amd64
>    JPEG 2000 Interactive Protocol
> 
> python3-glymur/eoan,eoan 0.8.18-1 all
>    Python tools for accessing JPEG2000 files
> 
> 
> ---
> Knute Snortum
> (via Gmail)
> 
> On Thu, Jan 2, 2020 at 9:14 AM Valerio Messina <efa at iol.it> wrote:
>>
>> check you have the lib-dev package:
>> $ apt list libfontconfig*
>> Listing... Done
>> libfontconfig1/bionic,now 2.12.6-0ubuntu2 amd64 [installed]
>> libfontconfig1-dev/bionic,now 2.12.6-0ubuntu2 amd64 [installed]
>>
>> Valerio
>>
>>
>>
>> On 12/31/19 17:33, Knute Snortum wrote:
>>> poppler 0.83.0
>>> Ubuntu 19.10
>>>
>>> When running "cmake .." I get the following message:
>>>
>>> -- Checking for module 'fontconfig'
>>> --   No package 'fontconfig' found
>>> CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137
>>> (message):
>>>     Could NOT find Fontconfig (missing: FONTCONFIG_LIBRARIES
>>>     FONTCONFIG_INCLUDE_DIR)
>>> Call Stack (most recent call first):
>>>     /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378
>>> (_FPHSA_FAILURE_MESSAGE)
>>>     cmake/modules/FindFontconfig.cmake:45 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>>>     CMakeLists.txt:127 (find_package)
>>>
>>> However, fontconfig is installed on my system:
>>>
>>> $ apt list fontconfig
>>> Listing... Done
>>> fontconfig/eoan,now 2.13.1-2ubuntu2 amd64 [installed]
>>> fontconfig/eoan 2.13.1-2ubuntu2 i386
>>>
>>> Any ideas on how to proceed?
>>>
>>> (I am an end user, not a developer.  Poppler is used in Frescobaldi
>>> which I am installing)
>>>
>>> TIA
>>>
>>> ---
>>> Knute Snortum
>>> (via Gmail)
>>> _______________________________________________
>>> poppler mailing list
>>> poppler at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/poppler
>>>
>>
>>
>> --
>> Valerio
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/poppler


-- 
Valerio


More information about the poppler mailing list