装gmp-4.2.4出错,请大家帮忙看看!(为了安装Net-SSH-Perl模块)

装gmp-4.2.4出错,请大家帮忙看看!(为了安装Net-SSH-Perl模块)

中午时,用CPAN自动化安装:
perl -MCPAN -e "install Net::SSH::Perl"
它已经帮我装完了Net::SSH::Perl ,但是还有一个模块,Math::GMP,这个模块需要单独下载另外一个东东,GMP,因此,我按照INSTALL上面写的,从http://www.swox.com/gmp/下载了gmp-4.2.4.tar.gz,然后安装:

第一步:configure,正常完成
第二步:make时,出现了错误,目前没有找到解决方法,要请各位帮忙看看了,谢谢:

另外想问问,你们以前安装Net:SSH:Perl的时候,是否也需要安装GMP这个东东?
我的环境是Solaris10 x86,编译器有CC,也有GCC。


root@solaris01 # make
make  all-recursive
Making all in tests
Making all in .
Making all in devel
Making all in mpn
Making all in mpz
Making all in mpq
Making all in mpf
Making all in rand
Making all in misc
Making all in cxx
Making all in mpbsd
Making all in mpn
Making all in mpz
/bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H  -I. -I. -I.. -D__GMP_WITHIN_GMP -I..     -m32 -O2 -fomit-frame-pointer -mtune=k8 -march=k8 -c -o cmp_d.lo cmp_d.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -m32 -O2 -fomit-frame-pointer -mtune=k8 -march=k8 -c cmp_d.c  -fPIC -DPIC -o .libs/cmp_d.o
Assembler: cmp_d.c
        "/var/tmp//ccIRzUFS.s", line 59 : Illegal mnemonic--------这个位置最可疑,它为什么会到/var/tmp//下面来找呢?
        Near line: "    ffreep  %st(0)"
        "/var/tmp//ccIRzUFS.s", line 59 : Syntax error
        Near line: "    ffreep  %st(0)"
        "/var/tmp//ccIRzUFS.s", line 61 : Illegal mnemonic
        Near line: "    ffreep  %st(0)"
        "/var/tmp//ccIRzUFS.s", line 61 : Syntax error
        Near line: "    ffreep  %st(0)"
        "/var/tmp//ccIRzUFS.s", line 125 : Illegal mnemonic
        Near line: "    ffreep  %st(0)"
        "/var/tmp//ccIRzUFS.s", line 125 : Syntax error
        Near line: "    ffreep  %st(0)"
*** Error code 1
make: Fatal error: Command failed for target `cmp_d.lo'
Current working directory /var/tmp2/perl/gmp-4.2.4/mpz
*** Error code 1
The following command caused the error:
set fnord $MAKEFLAGS; amf=$2; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc'; for subdir in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (cd $subdir && make  $local_target) \
   || case "$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /var/tmp2/perl/gmp-4.2.4
*** Error code 1
make: Fatal error: Command failed for target `all'

看能不能找个你平台的 gmp 二进制装上算了。

我卸载掉gcc以及跟gcc相关的包,只留下cc,然后再重新./configure,make,make check,make install,这样就所有检查都通过,并且安装成功,但是接下来我去安装Math-GMP-2.05时,它提示:
root@solaris01 # cd Math-GMP-2.05
root@solaris01 # perl Makefile.PL
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgmp
Writing Makefile for Math::GMP

==========================================================

WARNING! No GMP libraries were detected!

Please see the INSTALL file.

===========================================================

直接安装GMP的二进制包,也是一样的结果,安装成功,但是对 Math-GMP-2.05 perl Makefile.PL失败。

是否还需要设置其他环境变量,或者参数?

我的LD_LIBRARY_PATH设置是:
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

就差这一个了,请大家帮帮忙,谢谢!

以下是gmp-4.2.4, make install的结果,之前的make check,是:
==================
All 9 tests passed
==================
===================
All 10 tests passed
===================
===================
All 56 tests passed
===================


root@solaris01 # make install
make  install-recursive
Making install in tests
Making install in .
Making install in devel
Making install in mpn
Making install in mpz
Making install in mpq
Making install in mpf
Making install in rand
Making install in misc
Making install in cxx
Making install in mpbsd
Making install in mpn
Making install in mpz
Making install in mpq
Making install in mpf
Making install in printf
Making install in scanf
Making install in cxx
Making install in mpbsd
Making install in demos
Making install in calc
make  install-am
Making install in expr
Making install in tune
Making install in doc
test -z "/usr/local/info" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/info"
.././install-sh -c -m 644 './gmp.info' '/usr/local/info/gmp.info'
.././install-sh -c -m 644 './gmp.info-1' '/usr/local/info/gmp.info-1'
.././install-sh -c -m 644 './gmp.info-2' '/usr/local/info/gmp.info-2'
test -z "/usr/local/lib" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/lib"
/bin/bash ./libtool --mode=install ./install-sh -c  'libgmp.la' '/usr/local/lib/libgmp.la'
./install-sh -c .libs/libgmp.so.3.4.4 /usr/local/lib/libgmp.so.3.4.4
(cd /usr/local/lib && { ln -s -f libgmp.so.3.4.4 libgmp.so.3 || { rm -f libgmp.so.3 && ln -s libgmp.so.3.4.4 libgmp.so.3; }; })
(cd /usr/local/lib && { ln -s -f libgmp.so.3.4.4 libgmp.so || { rm -f libgmp.so && ln -s libgmp.so.3.4.4 libgmp.so; }; })
chmod +x /usr/local/lib/libgmp.so.3.4.4
./install-sh -c .libs/libgmp.lai /usr/local/lib/libgmp.la
./install-sh -c .libs/libgmp.a /usr/local/lib/libgmp.a
chmod 644 /usr/local/lib/libgmp.a
ranlib /usr/local/lib/libgmp.a
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - use the `-RLIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/include"
./install-sh -c -m 644 'gmp.h' '/usr/local/include/gmp.h'
test -z "/usr/local/include" || /var/tmp2/perl/gmp-4.2.4/install-sh -d "/usr/local/include"
make  install-data-hook

+-------------------------------------------------------------+
| CAUTION:                                                    |
|                                                             |
| If you have not already run "make check", then we strongly  |
| recommend you do so.                                        |
|                                                             |
| GMP has been carefully tested by its authors, but compilers |
| are all too often released with serious bugs.  GMP tends to |
| explore interesting corners in compilers and has hit bugs   |
| on quite a few occasions.                                   |
|                                                             |
+-------------------------------------------------------------+