kb47 / pdf-poppler

Convert PDF files into images using Poppler with promises. It achieves 10x faster performance compared to other PDF converters.
MIT License
50 stars 20 forks source link

Incompatible library version #2

Closed styks1987 closed 5 years ago

styks1987 commented 6 years ago

When trying to run .info()

Reason: Incompatible library version:
libpoppler.77.0.0.dylib requires version 13.0.0 or later, 
but libfontconfig.1.dylib provides version 12.0.0

MacOS 10.13.4 Node 10.10

styks1987 commented 6 years ago

Required me to update freetype brew upgrade freetype

With version 2.9.1 the above error went away.

mfripp commented 2 years ago

As of March 2022, installing the latest version of poppler (22.01) with conda seems to bring in an incompatible version of fontconfig (2.13.96). conda search --info poppler=22 indicates that poppler works with fontconfig >=2.13.1,<3.0a0, but it seems like fontconfig 2.13.96 isn't actually compatible.

This also affects other packages that use poppler, such as geopandas, which depends on fiona, which depends on libgdal, which depends on poppler. In my case, the problem showed up as this message when attempting to read data with geopandas or run import fiona:

ImportError: dlopen(~/opt/miniconda3/envs/fiona/lib/python3.10/site-packages/fiona/ogrext.cpython-310-darwin.so, 2): Library not loaded: @rpath/libfontconfig.1.dylib
  Referenced from: ~/opt/miniconda3/envs/fiona/lib/libpoppler.117.dylib
  Reason: Incompatible library version: libpoppler.117.dylib requires version 14.0.0 or later, but libfontconfig.1.dylib provides version 13.0.0

I ran conda install fontconfig=2.13.1 and that seems to have fixed it.

pkgw commented 2 years ago

See https://github.com/conda-forge/fontconfig-feedstock/issues/54 . The new versions of fontconfig actually are compatible, but there was an unexpected issue related to switching the Fontconfig build system on macOS. Some packages still need to be rebuilt to update their compatibility info, but we've done cairo, pango, and poppler, which should cover most cases.