develooper Front page | perl.macosx | Postings from June 2002

Re: imagemagick again: FIXED

Thread Previous
william ross
June 17, 2002 13:24
Re: imagemagick again: FIXED
Message ID:
oh well. with the help of some monkeys and typewriters i seem to have 
made perlmagick work.

I just had to add -lxml2 to the LIBS. it's likely that's because i did 
something stupid before which led to the installation happening in a 
different context to the usual one, but it is a different version of the 
fink package, so it may be that a different set of dependencies comes in 
with it.

Just in case that's the case, and the instructions need updating, i'll 
recap. but i'd strongly advise people to try the original instructions 
first. they're at

1. Install ImageMagick from the source using fink (which will need to be 
told to use the unstable tree: the stable version is rather old, and 
anyway a binary package won't leave the necessary source files behind)
2. Unpack /sw/src/ImageMagick-5.4.5.tar.gz
3. cd to /sw/src/ImageMagick-5.4.5/PerlMagick/
4. edit Makefile.PL like so:

< foreach $delegate (qw/ bzlib fpx jp2 jpeg lcms mpeg png ps tiff ttf x 
xfig zlib/) {
 > foreach $delegate (qw/ ps tiff ttf x zlib/) {
<    'INC'	=> '-I../ -I.. -I/usr/include/libxml2 
-I/usr/include/freetype2 -D_REENTRANT -D_FILE_OFFSET_BITS=64 
-I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11',
 >    'INC'      => '-I../ -I.. -I/sw/include -I/usr/include/freetype2 
-I/usr/include/freetype2 -D_REENTRANT -D_FILE_OFFSET_BITS=64 
-I/usr/local/include -I/X11',
<    'LIBS'	=> ['-L/usr/lib -L/usr/lib -L/usr/local/lib 
-L/usr/X11R6/lib -L/home/cristy/ImageMagick/magick -lMagick -llcms 
-ltiff -lfreetype -ljasper -ljpeg -lpng -lfpx -ldpstk -ldps -lXext -lXt 
-lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm'],
 >    'LIBS'     => ['-L/sw/lib -L/usr/lib -L/usr/local/lib 
-L/usr/X11R6/lib -L/home/cristy/ImageMagick/magick -lMagick -ltiff 
-lfreetype  -ljasper  -lpng  -ldpstk -ldps -lXext -lXt  -lSM -lICE -lX11 
-lbz2  -lz -lpthread  -lm -lxml2'],
<    # 'PERLMAINCC'	=> 'gcc',
 >    # 'PERLMAINCC'	=> 'cc',

sorry if this is the wrong format. i'm a diff novice.
most of those changes are from Randal's original message, by the way. i 
just added -lxml2.

5. you should then be able to install perlmagick in the usual way.

hope this helps someone. if only me, next time.


ps. none of which explains why i was getting png and bz library errors 
before. i did something accidentally right at some point which made them 
turn into xml library errors and then managed to get rid of those. still 
mostly fumbling for light switches here :(

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About