After successfully applying the patch to GraphicsMagick using gnu "patch" i do a configure, make , make install , and use fpm to create the rpm, which i install on a clean VM, but getting error:
$gm -version gm: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory
build steps:
./configure --prefix=/usr --with-modules=yes --with-png --with-tiff --with-jpeg --with-gslib=/usr/local/share/ghostscript/9.20/lib --enable-shared=no --enable-static=no
make
make DESTDIR=/home/ec2-user/GM/tmp/project/ install
fpm -s dir -t rpm -C tmp/project --name GraphicsMagick --version 1.3.25 --iteration 4 --description "GraphicsMagick 1.3.25 on redhat 6.8" .
then, scp the rpm to another clean VM and install it as:
sudo rpm -ivh GraphicsMagick-1.3.25-4.x86_64.rpm
Also, do I also need to build all the required libs like tiff, png jpeg?
which also makes me want to ask: Does GraphicsMagick 1.3.25 support libtiff 4.0.7 ?
$ ldd /usr/bin/gm
linux-vdso.so.1 => (0x00007ffdc5bef000)
libtiff.so.5 => not found
libjpeg.so.9 => not found
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003b90c00000)
libz.so.1 => /lib64/libz.so.1 (0x00000033e9000000)
libm.so.6 => /lib64/libm.so.6 (0x00000033e9400000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00000035f9400000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000033e8400000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000033eac00000)
libc.so.6 => /lib64/libc.so.6 (0x00000033e8000000)
librt.so.1 => /lib64/librt.so.1 (0x00000033e8c00000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000033e8800000)
/lib64/ld-linux-x86-64.so.2 (0x00000033e7c00000)
If you built this on rhel/centos 6, it is transportable via this method to another rhel/centos 6 box. You problem is probably dependencies, correctly using fpm's '-d' flag repetitively, and install with yum (not rpm).
Use rpm -q --whatprovides
on your build box to back track and figure out what rpm's provide that library. Example:
rpm -q --whatprovides /usr/lib64/libxml2.so.2
libxml2-2.7.6-21.el6_8.1.x86_64
So I know that I should have added -d libxml2
to my fpm line
Then do that again for all those image library dependencies.