PerlMagick + Lion

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
krazydad
Posts: 2
Joined: 2012-02-22T00:13:00-07:00
Authentication code: 8675308

PerlMagick + Lion

Post by krazydad »

I recently upgraded to Lion, and as often happens when I upgrade my Mac OS, reinstalling ImageMagick + PerlMagick is proving to be a bear. I have a ton of great Perl+ImageMagick scripts and I hate to abandon them.

I used to install PerlMagick with macports (port install imagemagick +perl) but the current version of macports is broken on the latest version of xcode, and
the older versions of xcode don't seem to be downloading from apple (or are downloading horrendously slowly).

The homebrew version of imagemagick is fine for the command-line tools, but doesn't compile with the perl extensions (this has been broken for over a year now).

I was able to install 6.7.5 from the binaries linked here: http://www.imagemagick.org/script/binary-releases.php

but can't get perl extensions installed that work with them. The CPAN version of Image::Magick won't install.

None of the versions of PerlMagick that are included on the mirrors seem up to date.

Does anyone have PerlMagick working under Lion? If so, how did you install it?


Thanks!
dmnc
Posts: 1
Joined: 2012-06-11T12:57:28-07:00
Authentication code: 13

Re: PerlMagick + Lion

Post by dmnc »

Did you ever make any progress with this?

I'd really like to get PerlMagick working too.

I've been using homebrew which seems to disable perl, although removing that argument from the install doesn't seem to help. CPAN is having a world of trouble.

Would love to get this working.
krazydad
Posts: 2
Joined: 2012-02-22T00:13:00-07:00
Authentication code: 8675308

Re: PerlMagick + Lion

Post by krazydad »

I finally got this working today (March 7, 2013) after over a year without PerlMagick working.

I recently upgraded to a new machine, so I tried again.

This time, this is what I did.

1. I installed homebrew, ran brew doctor, and brew upgrade.

2. I installed imagemagick via homebrew.

brew install imagemagick

3. I then tried installing perlmagick via cpan, this did not work.
sudo cpan # DID NOT WORK
> install Image::Magick # DID NOT WORK

This produces some compilation warnings (like "implicit declaration of function 'AutoOrientImage' is invalid in C99 "),
and then has a bunch of link errors, of which this one is typical.

ld: warning: ignoring file /usr/local/lib/libMagickCore-Q16.dylib, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /usr/local/lib/libMagickCore-Q16.dylib

4. I looked up this error, and saw that someone suggested installing the 64-bit version of Qt. I tried installing Qt, via homebrew:
brew install qt # NO EFFECT
which installed okay, but it had no effect on the CPAN installation. I retried installing via CPAN and got the same errors.

5. The next method worked. I downloaded the PerlMagick archive from here:

http://www.imagemagick.org/download/perl/

I then unpacked the file

tar xvf PerlMagick-6.82.0.tar.gz

And followed the instructions in the read.me, namely.
cd PerlMagick-6.82
perl Makefile.pl
make
sudo make install

During the make, I saw the same compilation warnings, but NO LINKER ERRORs. Huzzah.

I than ran some of my old scripts, and lo and behold, they work!

I don't know what's changed since a year ago, but I'm glad it's working again. I have a hazy recollection that the CPAN installer has never worked for me. I suspect
it's not configured for macs properly.

krazydad
Post Reply