Subject: | 6.82's Makefile.PL needs edit to find ImageMagick 6.8.2 libraries |
Date: | Sun, 5 May 2013 09:42:35 +0100 (BST) |
To: | "bug-PerlMagick [...] rt.cpan.org" <bug-PerlMagick [...] rt.cpan.org> |
From: | Peter Gardner <geep999 [...] yahoo.co.uk> |
I just moved from ImageMagick 6.7.7 to 6.8.2 and tried to install PerlMagick-6.82
I'm on Linux - Slackware 14.0 x86_64 - using the Slackware provided build scripts for ImageMagick.
The libMagick library filenames have changed between 6.7.7 and 6.8.2.
6.7.7:
usr/lib64/libMagickCore.so.5.0.0
6.8.2
usr/lib64/libMagickCore6-Q16.so.1.0.0
make fails thus:
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: cannot find -lMagickCore-Q16
collect2: error: ld returned 1 exit status
make: *** [blib/arch/auto/Image/Magick/Magick.so] Error 1
This is fixed by editing Makefile.PL to pick up the new library names:
broken:
my $LIBS_magick = '-L/usr/local/lib -lMagickCore-Q16 -lperl -lm';
my $CCFLAGS_magick = "$Config{'ccflags'} -I/usr/include/freetype2 -fopenmp -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16";
my $LDFLAGS_magick = "-L/usr/local/lib -lMagickCore-Q16 $Config{'ldflags'} ";
my $LDDLFLAGS_magick = "-L/usr/local/lib -lMagickCore-Q16 $Config{'lddlflags'} ";
fixed:
my $LIBS_magick = '-L/usr/local/lib -lMagickCore6-Q16 -lperl -lm';
my $CCFLAGS_magick = "$Config{'ccflags'} -I/usr/include/freetype2 -fopenmp -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16";
my $LDFLAGS_magick = "-L/usr/local/lib -lMagickCore6-Q16 $Config{'ldflags'} ";
my $LDDLFLAGS_magick = "-L/usr/local/lib -lMagickCore6-Q16 $Config{'lddlflags'} ";
Cheers,
Peter