Copying over binaries which shared libraries are needed?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
mjmj
Posts: 9
Joined: 2018-07-05T11:50:44-07:00
Authentication code: 1152

Copying over binaries which shared libraries are needed?

Post by mjmj » 2018-07-06T07:31:02-07:00

I'm doing a multistage docker build where I build the latest imagemagick and all it's build dependencies for ubuntu 14.04 (there are a lot) and I want to copy over just the 'convert' binary and whatever shared libraries it needs to work so I don't have all the build dep cruft on my production system. Copying over the binary works but what can I do about the shared libraries?

Code: Select all

root@b3ff35c88dce:/# convert -version
convert: error while loading shared libraries: libMagickCore-7.Q16HDRI.so.6: cannot open shared object file: No such file or directory

mjmj
Posts: 9
Joined: 2018-07-05T11:50:44-07:00
Authentication code: 1152

Re: Copying over binaries which shared libraries are needed?

Post by mjmj » 2018-07-06T11:20:59-07:00

What I'm trying to do is:
A) Install in imagemagick in modular way on Ubuntu 14.04. I only need magick to support jpg & png resizing and transparency options. But there are a lot of flags to understand for a newbie.

or B) uninstall all the build-dep that aren't needed after I install from source.

snibgo
Posts: 10829
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Copying over binaries which shared libraries are needed?

Post by snibgo » 2018-07-06T13:14:42-07:00

How are you building IM? With "./configure", "make" etc, I suppose. If you want a minimum build, your ./configure options should exclude anything you don't want. Have you explored those?
snibgo's IM pages: im.snibgo.com

mjmj
Posts: 9
Joined: 2018-07-05T11:50:44-07:00
Authentication code: 1152

Re: Copying over binaries which shared libraries are needed?

Post by mjmj » 2018-07-06T14:45:33-07:00

Yeah I'm still trying to understand all the options. I really want just a png parser, resize and transparency, nothing else. As a binary if possible. I see '--disable-installed' option saying 'less secure' but with no details as to what security I'm giving up.

So far I'm using

Code: Select all

./configure --prefix /usr --disable-installed --without-tiff --without-wmf --without-lzma --without-lcms --without-jbig --without-freetype -without-dps --without-bzlib
then

Code: Select all

make && checkinstall -D --install=yes --fstrans=no --pakdir "imagemagick_build" \
  --pkgname imagemagick --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
  --pkgversion "7.0.8" && make distclean && sudo ldconfig
Not sure about freetype or bzlib yet. Just a lot for a newcomer to understand, thanks for your advice.

snibgo
Posts: 10829
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Copying over binaries which shared libraries are needed?

Post by snibgo » 2018-07-06T15:10:02-07:00

For v7.0.7-28 on Windows 8.1, "./configure --help" shows about 25 "--without" options, eg fftw, jpeg, raw and pango.

I suggest you try "--without" everything except PNG, and see if IM still does what you need.
snibgo's IM pages: im.snibgo.com

Post Reply