perlbrew and Image::Magick

Chisel chisel at chizography.net
Wed Apr 6 22:38:48 BST 2011


I don't know if it's perlbrew specific, or just a good way to encounter the
problem but I'm stumped.

I'm seeing the same thing with a 5.12.2 and 5.12.3 brewed perl; everything's
under Ubuntu or Linux Mint.

If anyone has any ideas or suggestions to what I've done wrong, or how to
Make It Work I'd really appreciate them.

Suggestions to 'use something else' will be more helpful if I know what the
'something else' should be.

I'd need drop-in or not-to-hard-to-write replacements for:

 * Catalyst::Plugin::Upload::Image::Magick
 * Catalyst::Plugin::Upload::Image::Magick::Thumbnail

I'm mostly using is_image() and scaling features.

I've pasted lots of technical stuff below so people can see what I've done
so far.

Chiz


__DATA__

➔ cpanm Image::Magick
--> Working on Image::Magick
Fetching
http://search.cpan.org/CPAN/authors/id/J/JC/JCRISTY/PerlMagick-6.67.tar.gz... OK
Configuring PerlMagick-6.67 ... OK
Building and testing PerlMagick-6.67 ... FAIL


➔ more /home/chisel/.cpanm/build.log
cpanm (App::cpanminus) 1.4004 on perl 5.012002 built for x86_64-linux
Work directory is /home/chisel/.cpanm/work/1302124855.30513
You have make /usr/bin/make
You have LWP 5.837
You have /bin/tar: tar (GNU tar) 1.25
Copyright © 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Image::Magick on cpanmetadb ...
--> Working on Image::Magick
Fetching
http://search.cpan.org/CPAN/authors/id/J/JC/JCRISTY/PerlMagick-6.67.tar.gz
-> OK
Unpacking PerlMagick-6.67.tar.gz
Entering PerlMagick-6.67
META.yml not found or unparsable. Fetching META.yml from search.cpan.org
Configuring PerlMagick-6.67
Running Makefile.PL
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lm
Writing Makefile for Image::Magick
-> OK
Finding PREREQ from Makefile ...
Building and testing PerlMagick-6.67
cp Magick.pm blib/lib/Image/Magick.pm
AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick)
/home/chisel/perl5/perlbrew/perls/perl-5.12.2/bin/perl
/home/chiz/perl5/perlbrew/perls/perl-5.12.2/lib/5.12.2/ExtUtils/xsub
pp  -typemap
/home/chiz/perl5/perlbrew/perls/perl-5.12.2/lib/5.12.2/ExtUtils/typemap
Magick.xs > Magick.xsc && mv Magick.x
sc Magick.c
cc -c  -I/usr/include/ImageMagick -I../ -I.. -I"/usr/include/ImageMagick"
-I/usr/include/ImageMagick -fopenmp -fopenmp -g
-O2 -Wall -pthread -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BIT
S=64 -O2   -DVERSION=\"6.6.7\" -DXS_VERSION=\"6.6.7\" -fPIC
"-I/home/chiz/perl5/perlbrew/perls/perl-5.12.2/lib/5.12.2/x86_6
4-linux/CORE"  -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Magick.xs: In function ‘XS_Image__Magick_Smush’:
Magick.xs:13519:5: warning: implicit declaration of function ‘SmushImages’
Magick.xs:13519:10: warning: assignment makes pointer from integer without a
cast
Running Mkbootstrap for Image::Magick ()
chmod 644 Magick.bs
rm -f blib/arch/auto/Image/Magick/Magick.so
LD_RUN_PATH="/usr/lib" cc  -L../magick/.libs -lMagickCore -shared -O2
-L/usr/local/lib -fstack-protector Magick.o  -o blib/
arch/auto/Image/Magick/Magick.so     \
       -lMagickCore -lperl      \

/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Image/Magick/Magick.so] Error 1
-> FAIL Installing Image::Magick failed. See /home/chisel/.cpanm/build.log
for details.


[2003][chisel at metropolis:PerlMagick-6.67-EzIQo2]➔ LD_RUN_PATH="/usr/lib" cc
-L../magick/.libs -lMagickCore -shared -O2 -L/usr/local/lib
-fstack-protector Magick.o  -o blib/arch/auto/Image/Magick/Magick.so
-lMagickCore -lperl -L/home/chiz/perl5/perlbrew/build/perl-5.12.2
/usr/bin/ld: /home/chiz/perl5/perlbrew/build/perl-5.12.2/libperl.a(op.o):
relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a
shared object; recompile with -fPIC
/home/chiz/perl5/perlbrew/build/perl-5.12.2/libperl.a: could not read
symbols: Bad value
collect2: ld returned 1 exit status



➔ perl -V
Summary of my perl5 (revision 5 version 12 subversion 2) configuration:

  Platform:
    osname=linux, osvers=2.6.35-22-generic, archname=x86_64-linux
    uname='linux metropolis 2.6.35-22-generic #34-ubuntu smp sun oct 10
09:26:05 utc 2010 x86_64 gnulinux '
    config_args='-de -Dprefix=/home/chiz/perl5/perlbrew/perls/perl-5.12.2'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
    ccversion='', gccversion='4.4.5', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.12.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.12.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'


Characteristics of this binary (from libperl):
  Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_64_BIT_ALL
                        USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO
                        USE_PERL_ATOF
  Built under linux
  Compiled at Oct 16 2010 23:56:59
  %ENV:

PERL5LIB="/home/chisel/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:/home/chisel/perl5/lib/perl5"
    PERL_MM_OPT="INSTALL_BASE=/home/chisel/perl5"
  @INC:
    /home/chisel/perl5/lib/perl5/x86_64-linux-gnu-thread-multi
    /home/chisel/perl5/lib/perl5/x86_64-linux
    /home/chisel/perl5/lib/perl5

/home/chiz/perl5/perlbrew/perls/perl-5.12.2/lib/site_perl/5.12.2/x86_64-linux
    /home/chiz/perl5/perlbrew/perls/perl-5.12.2/lib/site_perl/5.12.2
    /home/chiz/perl5/perlbrew/perls/perl-5.12.2/lib/5.12.2/x86_64-linux
    /home/chiz/perl5/perlbrew/perls/perl-5.12.2/lib/5.12.2
    .

-- 
Chisel
e: chisel at chizography.net
w: http://chizography.net


More information about the london.pm mailing list