Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / November 2003



Tip: Looking for answers? Try searching our database.

imagemagick again

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
William Ross - 13 Nov 2003 15:37 GMT
has anyone had any success installing perlmagick on panther?

I'm using the fink-and-make method, which has always worked for me  
before and is succinctly described by Randal in  
http://nntp.x.perl.org/group/perl.macosx/3812

fink on 10.3 is in some flux at the moment and they don't recommend  
installing from source 'for the next few weeks', but that's what you  
have to do in order to get a version of perlmagick which matches the  
version of imagemagick you have just installed, so that's what i did,  
and it seems to have compiled and installed without any bother. the  
command-line tools work, and the libraries all appear to have ended up  
where they should.

i then go into the perlmagick subdirectory, amend the library and  
include locations as usual and try to make it. That appears to work  
too: there are no warnings or complaints from running either the  
makefile or make. however, on make test (or installing and trying to  
use the module), I get a flood of errors like this:

/sw/temp/ImageMagick-5.5.1/PerlMagick/blib/arch/auto/Image/Magick/
Magick.bundle undefined reference to _xmlSwitchEncoding expected to be  
defined in a dynamic image

which sounds like the old dyld in new clothes? Or maybe a compiler  
mismatch? curses. I'm using the system 5.8.1rc3 that ships with  
panther, and fink 0.6.1, both of which expect to use gcc3.3, I believe.  
fink is selfupdating again at the moment, but that will take a while  
(all i can get here is 28.8) so I thought I'd enquire. any advice would  
be most welcome.

thanks

will
William Ross - 17 Nov 2003 13:41 GMT
hello again.

I've got perlmagick working, at last.

it seems that panther has some linking quirk or other than can be  
avoided by manually specifying libraries in the LIBS line of  
Makefile.PL. I found this in a completely unrelated bug report about  
installing DBD::Pg  
(http://gborg.postgresql.org/project/dbdpg/bugs/bugupdate.php?619), and  
indeed it works in this case too. If you add this to the LIBS line:

-ljpeg -lpng -lTIFF -lBZ2 -lxml2

then nearly all the loader errors in make test go away. I have no idea  
why. Anyone?

The only errors that remain are to do with linking to XDPS, and I  
believe those will only come up if you are trying to use Apple's X11  
instead of the old fink one, which includes the necessary DPS  
libraries. I suppose it shouldn't come as a surprise that the Apple  
version does not.

But it seems a much better idea to use Apple's X, if possible, and you  
can get around the DPS problem either by installing the imagemagick-nox  
package instead (which gives you no X tools, but doesn't seem to mind  
when it can't find dps), or by editing imagemagick.info to remove the  
dependency on dps from its configuration.

Here's an amended version of Randal's recipe. I'm using the unstable  
branch, but I expect the same tweaks work for the stable version as it  
seems to be the same at the moment.

1) edit  
/sw/fink/10.3/(stable|unstable)/main/finkinfo/graphics/imagemagick.info  
so that
  the ConfigureParams line has --without-dps instead of --with-dps
2) "fink install imagemagick" (This will take a while)
3) "fink list imagemagick"
4) Note the version number (n.n.n-n) by the version you have installed.
5) "cd; mkdir Build; cd Build" (getting to a scratchdir)
6) "tar xvfz /sw/src/ImageMagick-n.n.n.tar.gz; cd Image*/PerlMagick/"
7) edit Makefile.PL so that
  INC begins with -I/sw/include
  LIBS begins with -L/sw/lib
  LIBS includes -ljpeg -lpng -lTIFF -lBZ2 -lxml2
  after the path definitions (and as well as whatever other  
specifications are there)
8) "perl Makefile.PL; make all install"
9) "cd; rm -rf Build"

it still fails a few tests, as always, but it loads ok and works fine,  
as far as I can see, with the mainstream formats.

I hope this helps someone out.

will

PS. In the course of these lengthy experiments I also selfupdated to  
fink 0.6.2, and for all I know that's what made the difference, making  
these instructions completely redundant :)

On 13 Nov 2003, at 15:37, william ross wrote:

> has anyone had any success installing perlmagick on panther?
>
[quoted text clipped - 30 lines]
>
> will
William Ross - 18 Nov 2003 09:16 GMT
and here's a patch for PerlMagick/Makefile.PL. I hope it's in vaguely
the right format.

will

--- Makefile.PL.old    Tue Oct 15 02:42:49 2002
+++ Makefile.PL    Mon Nov 17 11:33:48 2003
@@ -60,13 +60,13 @@
    'DEFINE'    => '-DHAVE_CONFIG_H',     # e.g., '-DHAVE_SOMETHING'

    # Header search specfication and preprocessor flags
-   'INC'    => '-I../ -I.. -D_REENTRANT -D_FILE_OFFSET_BITS=64
-I/usr/X11R6/include -I/usr/X11R6/include/X11 -I/usr/include/freetype2
-I/usr/include/libxml2',
+   'INC'    => '-I../ -I.. -D_REENTRANT -D_FILE_OFFSET_BITS=64
-I/sw/include -I/usr/X11R6/include -I/usr/X11R6/include/X11
-I/usr/include/freetype2 -I/usr/include/libxml2',

    # Install PerlMagick binary into ImageMagick bin directory
    'INSTALLBIN'    => '/usr/local/bin',

    # Library specification
-   'LIBS'    => ['-L/usr/X11R6/lib -L/usr/lib -L/usr/lib -L/usr/local/lib
-lMagick -llcms -lfreetype -lXext -lXt -lSM -lICE -lX11 -lz -lpthread
-lm'],
+   'LIBS'    => ['-L/sw/lib -L/usr/X11R6/lib -L/usr/lib -L/usr/lib
-L/usr/local/lib -lMagick -ljpeg -lpng -lTIFF -lBZ2 -lxml2 -llcms
-lfreetype -lXext -lXt -lSM -lICE -lX11 -lz -lpthread -lm'],

    # Perl binary name (if a Perl binary is built)
    'MAP_TARGET'    => 'PerlMagick',

On 17 Nov 2003, at 13:41, william ross wrote:

> hello again.
>
> I've got perlmagick working, at last.

<snip>
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.