Page 1 of 1

Struggling to install PNG delegate

Posted: 2016-03-14T20:56:56-07:00
by gvanto
Having a lot of trouble getting PNG delegate included during IM compilation:
http://askubuntu.com/questions/745660/i ... l-problems

Have spent many hours on this with no luck.

Help much appreciated,

thanks
gvanto

Re: Struggling to install PNG delegate

Posted: 2016-03-16T03:11:24-07:00
by HairyDalek
HI,
I had similar problems the other week getting my Mac to do much the same. Even though I had the pnglib all compiled and ready to go, it wasn’t being built into ImageMagick. It seems that I had to add an extra command to achieve this:
export PKG_CONFIG_PATH=/Users/paul/Desktop/ImageMagick-6.9.3-7/png/
You probably need CPPFLAGS and LDFLAGS defined for the png library too.

I actually wrote a shell script to help me as there seemed to be a massively large number of steps to get where I wanted to be (a build of IM that I could take in a folder anywhere). This is what I have, and it‘s the result of a day long game of whack-a-mole I was playing to get things to work. It’s a combination of various suggestions and answers to similar problems I found, so it’s probably messy (this is well out of my comfort zone - I started this knowing nothing much about compiling software).

Code: Select all

#!/usr/bin/env bash
MYPATH=$PATH
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
cd ~/Desktop
mkdir ImageMagick-Final
tar xvzf ImageMagick.tar.gz
cd ImageMagick-6.9.3-7
tar xvzf ~/Desktop/jpegsrc.v9a.tar.gz
mv jpeg-9a jpeg
tar xvzf ~/Desktop/libpng-1.6.21.tar.gz
mv libpng-1.6.21 png
cd png
./configure --disable-shared --disable-dependency-tracking --enable-static=no --prefix="/Users/paul/Desktop/ImageMagick-6.9.3-7/png" 
make clean;make
make install
cd ../jpeg
./configure --disable-shared --disable-dependency-tracking --enable-static=no  --prefix="/Users/paul/Desktop/ImageMagick-6.9.3-7/jpeg" 
make clean;make
make install
cd ../
export PKG_CONFIG_PATH=/Users/paul/Desktop/ImageMagick-6.9.3-7/png/

./configure --disable-installed --disable-shared --enable-delegate-build --disable-dependency-tracking --with-x=no --without-perl --with-freetype=no --with-magick-plus-plus=no --without-frozenpaths --with-bzlib=no --with-png=yes --with-jpeg=yes --prefix=/Users/paul/Desktop/ImageMagick-Final  LDFLAGS="-L/Users/paul/Desktop/ImageMagick-6.9.3-7/png" CPPFLAGS='-I/Users/paul/Desktop/ImageMagick-6.9.3-7/png' 

make clean;make
make install
echo ""
echo $PATH
export PATH=$MYPATH
echo ""
echo $PATH
Hopefully you can see what I am up to and use/amend to your needs.

Re: Struggling to install PNG delegate

Posted: 2016-03-16T17:48:10-07:00
by gvanto
thanks HairyDalek!

andrew.46's response worked for me here: http://askubuntu.com/questions/745660/i ... l-problems