Description
Hi @pavinthan!
First, I want to second #2. Thank you for open-sourcing this lambda-layer!
I need to build libvips with poppler support. I'm using the lambci/lambda:build-go1.x
as base image as it matches the lambda environment very closely.
The lambda environment includes old versions of libraries such as libpng
(which are not included in the amazonlinux:2018.03
image).
Still, I'm building the newest version of those libraries from source as the older ones have known security problems (see libvips/libvips#1749 (comment)).
However, Poppler picks up the pre-installed (old) versions /usr/lib64/
instead of the new version from /opt/lib
during the build, e.g. it uses /usr/lib64/libpng.so
instead of /opt/lib/libpng.so
.
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.3.11")
-- Checking for module 'fontconfig'
-- Found fontconfig, version 2.13.1
-- Found Fontconfig: /usr/lib64/libfontconfig.so
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8")
-- Found PNG: /usr/lib64/libpng.so (found version "1.2.49")
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.0.3")
I can reproduce this issue using the Dockerfile from this repository by adding libpng
and libpng-devel
via yum
to the image.
Original output of Poppler build:
-- Found Freetype: /opt/lib/libfreetype.so (found version "2.10.1")
-- Checking for module 'fontconfig'
-- Found fontconfig, version 2.13.1
-- Found Fontconfig: /opt/lib/libfontconfig.so
-- Found JPEG: /opt/lib/libjpeg.so (found version "62")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8")
-- Found PNG: /opt/lib/libpng.so (found version "1.6.37")
-- Found TIFF: /opt/lib/libtiff.so (found version "4.1.0")
Output of Poppler build after installing libpng
and libpng-devel
via yum
:
-- Found Freetype: /opt/lib/libfreetype.so (found version "2.10.1")
-- Checking for module 'fontconfig'
-- Found fontconfig, version 2.13.1
-- Found Fontconfig: /opt/lib/libfontconfig.so
-- Found JPEG: /opt/lib/libjpeg.so (found version "62")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8")
-- Found PNG: /usr/lib64/libpng.so (found version "1.2.49") // <=== Poppler uses old verion instead of new one
-- Found TIFF: /opt/lib/libtiff.so (found version "4.1.0")
Question:
How can I "force" Poppler to build with a custom (new) version of a library instead of the default (old) one?
I appreciate any help on this