Help with compiling Math::GMP on AIX 5.3
Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 18:18:03 von btna
Hello All,
I am not sure what I am missing but I think it must be something
simple. I am trying to install Net::SSH::Perl and it requires
Math::GMP which I have downloaded and when trying to install I get the
following errors:
(Note: I have successfully downloaded and installed GMP following the
standard instruction as and I have added the -L/usr/local/lib to the
LIBS in the Makefile.PL
Any help will be appreciated it!!
Thanks
BTNA
Math-GMP-2.04> perl Makefile.PL
Writing Makefile for Math::GMP
Math-GMP-2.04> make
/usr/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME"
=> "Math::GMP", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" =>
[]);'
cc_r -c -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -
qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -
q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"2.04\" -DXS_VERSION=
\"2.04\" "-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" GMP.c
Running Mkbootstrap for Math::GMP ()
chmod 644 GMP.bs
rm -f blib/arch/auto/Math/GMP/GMP.so
LD_RUN_PATH="" ld -bhalt:4 -bM:SRE -bI:/usr/opt/perl5/lib/
5.8.2/aix-thread-multi/CORE/perl.exp -bE:GMP.exp -bnoentry -lpthreads -
lc_r GMP.o -o blib/arch/auto/Math/GMP/GMP.so -L/usr/local/lib -lgmp
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_init
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_sqrt
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_tstbit
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_init_set
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fac_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_ior
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_xor
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_and
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fib_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_gcd
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_pow_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_jacobi
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_cmp
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_mod
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_tdiv_qr
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fdiv_q
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_mul
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_sub
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_add
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fdiv_r_2exp
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fdiv_r
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_powm
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_fdiv_q_2exp
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_mul_2exp
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_get_si
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_add_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_get_ui
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_sizeinbase
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_get_str
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_clear
ld: 0711-317 ERROR: Undefined symbol: .__gmpz_init_set_str
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
make: 1254-004 The error code from the last command is 8.
Stop.
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 20:06:43 von usenet
On Sep 12, 9:18 am, btna wrote:
> [problems installing Math::GMP]
I had this same problem (also AIX 5.3). I was able to build Math::GMP
after I copied /usr/local/include/gmp.h to the directory (top level)
where I was building Math::GMP.
--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 21:00:48 von btna
On Sep 12, 2:06 pm, use...@DavidFilmer.com wrote:
> On Sep 12, 9:18 am, btna wrote:
>
> > [problems installing Math::GMP]
>
> I had this same problem (also AIX 5.3). I was able to build Math::GMP
> after I copied /usr/local/include/gmp.h to the directory (top level)
> where I was building Math::GMP.
>
> --
> The best way to get a good answer is to ask a good question.
> David Filmer (http://DavidFilmer.com)
David,
Thank you . I copied the gmp.h to the directory where I was building
it . It has the following:
COPYING.LIB GMP.exp_old MANIFEST blib t
Changes GMP.o Makefile gmp.h typemap
GMP.bs GMP.xs Makefile.PL lib
GMP.c INSTALL Makefile.old libgmp.la
GMP.exp LICENSE README pm_to_blib
I still have the same errors. Is this the directory you are talking
about?
Thanks for your response.
BTNA
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 21:02:53 von Benoit Lefebvre
I'm having some problems too compiling Math::GMP.. (Required by a
requirement of Net::SSH::Perl)
I have no gmp.h in my system.
Anyone have an idea in what package it is ?
Thanks,
--Ben
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 21:12:46 von usenet
On Sep 12, 12:00 pm, btna wrote:
> I still have the same errors. Is this the directory you are talking
> about?
Yes. OK, verify that you have this in your Makefile.PL (with the -
lgmp flag):
'LIBS' => ['-L/usr/local/lib -lgmp'],
What is your $CFLAGS? I used this:
export CFLAGS="-g -O2 -mcpu=powerpc"
Also, /usr/vacpp/bin is in your $PATH, right?
--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 21:14:37 von usenet
On Sep 12, 12:02 pm, Benoit Lefebvre
wrote:
> I have no gmp.h in my system.
You must build GMP before you can install Math::GMP.
http://www.swox.com/gmp/
--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 21:14:53 von usenet
On Sep 12, 12:02 pm, Benoit Lefebvre
wrote:
> I have no gmp.h in my system.
You must build GMP before you can install Math::GMP.
http://www.swox.com/gmp/
--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 21:20:46 von Ben Morrow
Quoth btna :
> On Sep 12, 2:06 pm, use...@DavidFilmer.com wrote:
> > On Sep 12, 9:18 am, btna wrote:
> >
> > > [problems installing Math::GMP]
> >
> > I had this same problem (also AIX 5.3). I was able to build Math::GMP
> > after I copied /usr/local/include/gmp.h to the directory (top level)
> > where I was building Math::GMP.
>
> Thank you . I copied the gmp.h to the directory where I was building
> it . It has the following:
>
> COPYING.LIB GMP.exp_old MANIFEST blib t
> Changes GMP.o Makefile gmp.h typemap
> GMP.bs GMP.xs Makefile.PL lib
> GMP.c INSTALL Makefile.old libgmp.la
> GMP.exp LICENSE README pm_to_blib
>
> I still have the same errors. Is this the directory you are talking
> about?
Have you cleaned up the old GMP.c/GMP.o (uh, and probably GMP.exp/GMP.bs
as well, since this is AIX) from when you built before (make clean, or
simply re-extract from the tarball)? It sounds like the problem is that
the C compiler was picking up a different gmp.h from somewhere else, but
simply putting the correct header where the compiler will find it won't
make the makefile rebuild things...
Ben
Re: Help with compiling Math::GMP on AIX 5.3
am 12.09.2007 22:43:09 von btna
On Sep 12, 3:20 pm, Ben Morrow wrote:
> Quoth btna :
>
>
>
>
>
> > On Sep 12, 2:06 pm, use...@DavidFilmer.com wrote:
> > > On Sep 12, 9:18 am, btna wrote:
>
> > > > [problems installing Math::GMP]
>
> > > I had this same problem (also AIX 5.3). I was able to build Math::GMP
> > > after I copied /usr/local/include/gmp.h to the directory (top level)
> > > where I was building Math::GMP.
>
> > Thank you . I copied the gmp.h to the directory where I was building
> > it . It has the following:
>
> > COPYING.LIB GMP.exp_old MANIFEST blib t
> > Changes GMP.o Makefile gmp.h typemap
> > GMP.bs GMP.xs Makefile.PL lib
> > GMP.c INSTALL Makefile.old libgmp.la
> > GMP.exp LICENSE README pm_to_blib
>
> > I still have the same errors. Is this the directory you are talking
> > about?
>
> Have you cleaned up the old GMP.c/GMP.o (uh, and probably GMP.exp/GMP.bs
> as well, since this is AIX) from when you built before (make clean, or
> simply re-extract from the tarball)? It sounds like the problem is that
> the C compiler was picking up a different gmp.h from somewhere else, but
> simply putting the correct header where the compiler will find it won't
> make the makefile rebuild things...
>
> Ben- Hide quoted text -
>
> - Show quoted text -
Thanks for the responses but no luck yet. I have the -L/usr/local/lib
and I have used the CFLAGS as David posted them. I still get the same
errors. I do a "make clean" before I start again.
I am not sure what I am missing.
BTNA
Re: Help with compiling Math::GMP on AIX 5.3
am 13.09.2007 09:17:21 von usenet
On Sep 12, 1:43 pm, btna wrote:
> Thanks for the responses but no luck yet.
I Googled around and found an old usenet archive website with a very
similar problem:
http://www.issociate.de/board/goto/630875/GMP::Math_...PLEAS E_HELP!!.html
And you appear to be the OP for that old thread. Is this the same
machine you were building on back in Feb 2005? Are some remnants of
old stuff still lying around?
--
The best way to get a good answer is to ask a good question.
David Filmer (http://DavidFilmer.com)
Re: Help with compiling Math::GMP on AIX 5.3
am 13.09.2007 12:08:06 von Heinrich.Mislik
In article <1189613883.180684.193860@w3g2000hsg.googlegroups.com>, btna@terra.com says...
>
>
>Hello All,
>
>I am not sure what I am missing but I think it must be something
>simple. I am trying to install Net::SSH::Perl and it requires
>Math::GMP which I have downloaded and when trying to install I get the
>following errors:
Check wether libgmp.a has objects for the correct object mode. Try:
ar -X64 t /usr/local/lib/libgmp.a
or
ar -X32 t /usr/local/lib/libgmp.a
You should get a list for -X32 since your perl is 32-bit (seen from -q32 in your CFLAGS). If nothing is there for -X32 then rebuild libgmp with OBJECT_MODE=32.
Cheers
Heinrich
--
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140
Re: Help with compiling Math::GMP on AIX 5.3
am 13.09.2007 17:27:47 von btna
On Sep 13, 6:08 am, Heinrich.Mis...@univie.ac.at (Heinrich Mislik)
wrote:
> In article <1189613883.180684.193...@w3g2000hsg.googlegroups.com>, b...@terra.com says...
>
>
>
> >Hello All,
>
> >I am not sure what I am missing but I think it must be something
> >simple. I am trying to install Net::SSH::Perl and it requires
> >Math::GMP which I have downloaded and when trying to install I get the
> >following errors:
>
> Check wether libgmp.a has objects for the correct object mode. Try:
>
> ar -X64 t /usr/local/lib/libgmp.a
>
> or
>
> ar -X32 t /usr/local/lib/libgmp.a
>
> You should get a list for -X32 since your perl is 32-bit (seen from -q32 in your CFLAGS). If nothing is there for -X32 then rebuild libgmp with OBJECT_MODE=32.
>
> Cheers
>
> Heinrich
>
> --
> Heinrich Mislik
> Zentraler Informatikdienst der Universitaet Wien
> A-1010 Wien, Universitaetsstrasse 7
> Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140
Thanks for the reply.
David, This is a new server. I managed to get the other server to work
fine 2 years ago. This is a new server just installed with AIX 5.3
Heinrich,
I did what you suggested:
the -X32 did not return anything. However, the -X64 returned a bunch
of objects. So, I set the env variable:
# export OBJECT_MODE=32
and recompiled gmp. When I do he -X32, I still don't see anything but
now when I do -X64, I see only:
libgmp.so.3
I tried recompiling Mat::GMP and get of course the same undefined
errors.
Do you know how I could specify -q32 when compiling Math::GMP? or do
you have any other ideas for me? I am really not sure what else I can
try.
Thanks again for the replies.
BTNA
Re: Help with compiling Math::GMP on AIX 5.3
am 13.09.2007 17:57:01 von Heinrich.Mislik
In article <1189697267.430667.200860@d55g2000hsg.googlegroups.com>, btna@terra.com says...
>the -X32 did not return anything. However, the -X64 returned a bunch
>of objects. So, I set the env variable:
># export OBJECT_MODE=32
>and recompiled gmp. When I do he -X32, I still don't see anything but
>now when I do -X64, I see only:
>libgmp.so.3
Now you built a shared library but still for 64 bit.
I think gmp always builds 64 bit since this is in configure:
xlc_aix64_cflags="-O2 -q64 -qtune=pwr3 -qmaxmem=20000"
So I see two choices:
Try hacking configure to build gmp in 32bit.
Build your own perl with 64 bit. I prefer to build my own perl anyway.
good luck
Heinrich
--
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140