On Aug 3, 2006, at 4:45 PM, Michael Barto wrote:
This modules fails to install from CPAN
perl -MCPAN -e 'install Net::SSH::Perl'
with error installation in installation of Math::GMP. Hence
Net::SSH::Perl module cannot be installed. This problem needs to be
corrected. Does anyone know how to get by this problem and how can
it be reported to be fixed?
This problem is also true for Sun Solaris (which I tried the same
thing on). We develop on Mac's
First, you need to install libgmp - Math::GMP is just a wrapper
around that. Ideally, Math::GMP's Makefile.PL would detect that
libgmp isn't present, and complain with an informative message
instead of just failing to compile, but it doesn't. :-( That would
absolutely be a problem worth being reported to the Math::GMP
maintainer.
Installing libgmp *might* be a bit of an adventure if you're using an
Intel Mac. Google libgmp intel mac for details - the messages I
found relate to gmp 4.2.0 and are dated April '06; the latest release
is 4.2.1, which was released in May '06, so I don't know if those
problems are still relevant or not. I'd try it out of the box
first, and then read about the problems if that fails.
I'm on an old G4, so I used the standard configure; make; make
check; sudo make install routine which built installed libgmp
without any problems.
Once you've installed libgmp, you're ready to install Math::GMP. To
do that, I needed to add to the linker flags that CPAN.pm would use.
(You may not need to do this on your Solaris machines.)
From inside the CPAN shell:
cpan o conf makepl_arg LDDLFLAGS='-bundle -undefined
dynamic_lookup -read_only_relocs suppress'
The '-read_only_relocs suppress' is the important one here - the rest
are there because I couldn't figure out how to *add* to the linker
flags that Perl uses, instead of *replacing* the whole set of them. :-(
Once I'd done that, I got a clean compile and all the self-tests passed:
cpan test Math::GMP
Running test for module Math::GMP
Running make for C/CH/CHIPT/Math-GMP-2.04.tar.gz
Is already unwrapped into directory /Users/sherm/.cpan/build/
Math-GMP-2.04
CPAN.pm: Going to build C/CH/CHIPT/Math-GMP-2.04.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Math::GMP
cp lib/Math/GMP.pm blib/lib/Math/GMP.pm
AutoSplitting blib/lib/Math/GMP.pm (blib/lib/auto/Math/GMP)
/usr/bin/perl /System/Library/Perl/5.8.6/ExtUtils/xsubpp -
typemap /System/Library/Perl/5.8.6/ExtUtils/typemap -typemap typemap
GMP.xs GMP.xsc mv GMP.xsc GMP.c
cc -c -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-
strict-aliasing -I/usr/local/include -Os -DVERSION=\2.04\ -
DXS_VERSION=\2.04\ -I/System/Library/Perl/5.8.6/darwin-thread-
multi-2level/CORE GMP.c
Running Mkbootstrap for Math::GMP ()
chmod 644 GMP.bs
rm -f blib/arch/auto/Math/GMP/GMP.bundle
LD_RUN_PATH= env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -
undefined dynamic_lookup -read_only_relocs suppress GMP.o -o blib/
arch/auto/Math/GMP/GMP.bundle -lgmp
chmod 755 blib/arch/auto/Math/GMP/GMP.bundle
cp GMP.bs blib/arch/auto/Math/GMP/GMP.bs
chmod 644 blib/arch/auto/Math/GMP/GMP.bs
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e
test_harness(0, 'blib/lib', 'blib/arch') t/*.t
t/gmppmok
All tests successful.
Files=1, Tests=350, 2 wallclock secs ( 0.49 cusr + 0.06 csys
= 0.55 CPU)
/usr/bin/make test -- OK
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net