I am trying to install Image::Resize on a centos webserver.
# perl -V
Summary of my perl5 (revision 5 version 14 subversion 2) configuration
+:
Platform:
osname=linux, osvers=2.6.18-274.7.1.el5.028stab095.1, archname=i68
+6-linux-thread-multi
uname='linux domain.com 2.6.18-274.7.1.el5.028stab095.1 #1 smp mon
+ oct 24 20:49:24 msd 2011 i686 i686 i386 gnulinux '
config_args='-de -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und
+ef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
+ -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_
+FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -f
+stack-protector -I/usr/local/include'
ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-51)', gcco
+sandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1
+2
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
+ lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstac
+k-protector'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_ITHREADS USE_LARGE_FILE
+S
USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
Built under linux
Compiled at Mar 8 2012 16:01:46
@INC:
/usr/local/lib/perl5/site_perl/5.14.2/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.14.2
/usr/local/lib/perl5/5.14.2/i686-linux-thread-multi
/usr/local/lib/perl5/5.14.2
/usr/local/lib/perl5/site_perl/5.8.8
/usr/local/lib/perl5/site_perl
GD tells me it is installed...
# cpan GD
CPAN: Storable loaded ok (v2.30)
Going to read '/root/.cpan/Metadata'
Database was generated on Sun, 25 Mar 2012 04:10:47 GMT
CPAN: Module::CoreList loaded ok (v2.49_02)
GD is up to date (2.46).
But I don't seem to be able to use it.
# perl -MGD -e 'print "qwe";'
Not a CODE reference at /usr/local/lib/perl5/5.14.2/i686-linux-thread-
+multi/DynaLoader.pm line 213.
END failed--call queue aborted at /usr/local/lib/perl5/site_perl/5.14.
+2/i686-linux-thread-multi/GD.pm line 213.
Compilation failed in require.
BEGIN failed--compilation aborted.
It seems like a problem others have encountered http://www.nntp.perl.org/group/perl.perl5.porters/2011/04/msg171535.html but I can't decipher an obvious solution to the problem.
Can anyone offer advice? Thank you in advance.
Edit: I found a solution by reinstalling GD declaring CCFLAGS after the make command.
I moved the GD.pm file and the tried to install GD again.
# cpan GD
Then when it failed, when to the .cpan/build directory where the GD package was and ran the following:
# perl Makefile.PM
# make CCFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
# make test
# make install
And it installed. I hope that can help someone else.