jcupitt / docker-builds Goto Github PK
View Code? Open in Web Editor NEWVarious sample dockerfiles
Various sample dockerfiles
Hi,
trying to build pdfium on High Sierra (and eventually libvips with the support enabled) but the build ends to
ERROR at //pdfium.gni:73:1: Assertion failed.
assert(!pdf_is_complete_lib || !is_component_build,
^-----
pdf_is_complete_lib=true requires is_component_build=false
I changed the build command to
gn gen "${BUILD_RES}" --args='pdf_bundle_freetype = true pdf_enable_v8 = false pdf_enable_xfa = false pdf_use_skia = false pdf_use_skia_paths = false is_component_build = true pdf_is_complete_lib = false pdf_is_standalone = false use_sysroot = false'
(changed pdf_is_complete_lib = false
and added pdf_is_standalone = false
)
as the google documentation described here: https://pdfium.googlesource.com/pdfium/
Is this OK or am I heading towards big problems?
I can produce tar.gz precisely the same as this: https://github.com/jcupitt/docker-builds/blob/master/pdfium/data/package/libpdfium-master-linux-x64.tar.gz, except the 3 .so files in the root of lib are .dylibs.
Thanks a lot for this library!
I'm pretty new to this so sorry by advance if the question is dumb.
I'm planning to use sharp with a custom build of libvips with poppler (as PDFium seems a bit tricky).
I've added the following to the docker build and it seems to work.
apt-get install software-properties-common
add-apt-repository -y ppa:cran/poppler
apt-get update
apt-get install -y libpoppler-cpp-dev
Is this sufficent?
Many thanks!
I followed the steps and added the layer to my lambda function.
But i'm getting this error.
/var/task/main: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or directory
See felixbuenemann/vips-alpine#3 (comment)
Since the problem also appears even when based on the Dockerfile from this repo I decided to create the Issue here.
I have been using libvips
with poppler
until now but since it sometimes generates corrupted images from pdfs I thought to give a try and use libvips
with Pdfium
. I generated the Pdfium
files as described in the README: https://github.com/jcupitt/docker-builds/blob/master/pdfium/README.md. (Tried both ways)
First I copied the generated files to appropriate locations like:
lib
to /usr/local/lib/
include
to /usr/local/include/
Then downloaded the latest libvips: https://github.com/libvips/libvips/releases/tag/v8.7.4
and tried to install.
Anyway $ ./configure
couldn't recognize the files but worked fine by running:
./configure --with-pdfium-includes=/usr/local/include --with-pdfium-libraries=/usr/local/lib
Pdfium is enabled: PDF import with PDFium yes
The problem is that when I now run: make
it fails with this exception:
*** static library /usr/local/lib/pdfium-obj/libformfiller.a is not portable!
libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o -Wl,--whole-archive resample/.libs/libresample.a arithmetic/.libs/libarithmetic.a colour/.libs/libcolour.a conversion/.libs/libconversion.a convolution/.libs/libconvolution.a deprecated/.libs/libdeprecated.a foreign/.libs/libforeign.a freqfilt/.libs/libfreqfilt.a histogram/.libs/libhistogram.a draw/.libs/libdraw.a iofuncs/.libs/libiofuncs.a morphology/.libs/libmorphology.a mosaicing/.libs/libmosaicing.a create/.libs/libcreate.a -Wl,--no-whole-archive /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so -lpng16 -ltiff -ljpeg -lgmodule-2.0 -lexpat -lpangoft2-1.0 -lpango-1.0 -lfontconfig /usr/lib/x86_64-linux-gnu/libfreetype.so -lgsf-1 -lxml2 -lfftw3 -lorc-0.4 -llcms2 -lgif -lrsvg-2 -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo /usr/local/lib/pdfium-obj/libpdfium.a /usr/local/lib/pdfium-obj/libfpdfapi.a /usr/local/lib/pdfium-obj/libfxge.a /usr/local/lib/pdfium-obj/libfpdfdoc.a /usr/local/lib/pdfium-obj/libfxcrt.a /usr/local/lib/pdfium-obj/libfx_agg.a /usr/local/lib/pdfium-obj/libfxcodec.a /usr/local/lib/pdfium-obj/libfx_lpng.a /usr/local/lib/pdfium-obj/libfx_libopenjpeg.a /usr/local/lib/pdfium-obj/libfx_lcms2.a /usr/local/lib/pdfium-obj/libfx_freetype.a /usr/local/lib/pdfium-obj/libjpeg.a /usr/local/lib/pdfium-obj/libfdrm.a /usr/local/lib/pdfium-obj/libpwl.a /usr/local/lib/pdfium-obj/libbigint.a /usr/local/lib/pdfium-obj/libformfiller.a -L/usr/local/lib -lIlmImf -lImath -lHalf -lIex -lIexMath -lIlmThread -lopenslide -lcfitsio -lpthread -lwebpmux -lwebp -L/usr/lib/x86_64-linux-gnu/hdf5/serial/lib -lmatio -lhdf5 -lz -lexif -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/7/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crtn.o -g -O2 -Wl,--export-dynamic -pthread -pthread -fopenmp -Wl,-soname -Wl,libvips.so.42 -o .libs/libvips.so.42.9.5
g++: error: /usr/local/lib/pdfium-obj/libpdfium.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfpdfapi.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfxge.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfpdfdoc.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfxcrt.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfx_agg.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfxcodec.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfx_lpng.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfx_libopenjpeg.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfx_lcms2.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfx_freetype.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libjpeg.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libfdrm.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libpwl.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libbigint.a: No such file or directory
g++: error: /usr/local/lib/pdfium-obj/libformfiller.a: No such file or directory
Makefile:737: recipe for target 'libvips.la' failed
make[3]: *** [libvips.la] Error 1
Any chance this would compile and run on openjdk:8-jre-alpine? Tried modifying the amazonlinux2 and libvips-openjpeg-alpine dockerfile to not avail. Thanks
vips: error while loading shared libraries: libvips.so.42: cannot open shared object file:
Hi
First, I'm a webdeveloper, not a c/c++ developer.
But my question is:
in the way you are copying deps on libvips-amazonlinux2-sharp/build/vips.sh are you not losing some deps of deps?
readelf -d $base
This code above shouldn't be ...
ldd libvips-cpp.so.42 | sed -nE "s/^[^\/\n]*(\/[^ ]+)(.*)/\1/p" | xargs cp -t $(dist_dir)
??
AWS lambda now has arm64v8 support, any chance of building vips+sharp for this platform?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.