Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Cairo 1.16 #5

Closed
mrliptontea opened this issue Nov 19, 2020 · 2 comments
Closed

Use Cairo 1.16 #5

mrliptontea opened this issue Nov 19, 2020 · 2 comments

Comments

@mrliptontea
Copy link

Hi,

First of all let me join #2 in saying thank you for this!

Secondly, there is a known bug in Cairo library: https://gitlab.freedesktop.org/cairo/cairo/-/issues/358, which for some PDFs can result in free(): invalid pointer error.

It's present in version 1.17.2 but not in 1.16. There's no later version than 1.17.2 at the moment (although the commit that enabled the bug has been since reverted), so I suggest using 1.16. It's also what's used on alpine linux package:

$ docker run --rm -i -t alpine:edge sh
/ # apk add poppler-utils
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/24) Installing libxau (1.0.9-r0)
(2/24) Installing libbsd (0.10.0-r0)
(3/24) Installing libxdmcp (1.1.3-r0)
(4/24) Installing libxcb (1.14-r1)
(5/24) Installing libx11 (1.6.12-r0)
(6/24) Installing libxext (1.3.4-r0)
(7/24) Installing libxrender (0.9.10-r3)
(8/24) Installing expat (2.2.10-r0)
(9/24) Installing brotli-libs (1.0.9-r2)
(10/24) Installing libbz2 (1.0.8-r1)
(11/24) Installing libpng (1.6.37-r1)
(12/24) Installing freetype (2.10.4-r0)
(13/24) Installing libuuid (2.36-r2)
(14/24) Installing fontconfig (2.13.1-r3)
(15/24) Installing pixman (0.40.0-r2)
(16/24) Installing cairo (1.16.0-r2)            <--
(17/24) Installing lcms2 (2.11-r0)
(18/24) Installing libjpeg-turbo (2.0.5-r1)
(19/24) Installing openjpeg (2.3.1-r5)
(20/24) Installing libgcc (10.2.1_pre0-r2)
(21/24) Installing libstdc++ (10.2.1_pre0-r2)
(22/24) Installing tiff (4.1.0-r0)
(23/24) Installing poppler (20.11.0-r0)
(24/24) Installing poppler-utils (20.11.0-r0)   <--
@carasaffi
Copy link

Hi this issue seems to be there with font config. [code 127] pdftocairo: symbol lookup error: /opt/lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var. Can you provide a fix for this?

@micronaut
Copy link

@carasaffi I was able to resolve the undefined symbol: FT_Done_MM_Var error by adding an environment variable to the Lamda function: LD_PRELOAD = /opt/lib/libfreetype.so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants