Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Unable to install Math::BigInt::GMP on Solaris 10

Reply
Thread Tools

Unable to install Math::BigInt::GMP on Solaris 10

 
 
sumitbee@gmail.com
Guest
Posts: n/a
 
      02-21-2007
Hello Guru's:

Make fails on both version 1.18 and 1.19. I am trying to install this
to speed up Net::SSH:erl, since that is unbearably slow with the
pure perl libraries, or even Math::BigInt:ari, or
Math::BigInt::FastCalc. here is what I get when I run make:
--------------------------------------------------------------------------------------------------------------------
bash-3.00# perl Makefile.PL
Note (probably harmless): No library found for -lgmp
YAML not installed, make dist will not override metafile at
Makefile.PL line 8.
Writing Makefile for Math::BigInt::GMP
bash-3.00# make
cp lib/Math/BigInt/GMP.pm blib/lib/Math/BigInt/GMP.pm
/usr/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap /usr/
perl5/5.8.4/lib/ExtUtils/typemap -typemap typemap GMP.xs > GMP.xsc &&
mv GMP.xsc GMP.c
cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -
D_TS_ERRNO -xO3 -xspace -xildoff -DVERSION=\"1.19\" -DXS_VERSION=
\"1.19\" -KPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"
GMP.c
"GMP.xs", line 4: cannot find include file: "gmp.h"
"GMP.c", line 40: undefined symbol: mpz_t
"GMP.c", line 40: undefined symbol: RETVAL
"GMP.xs", line 34: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 35: warning: implicit function declaration:
mpz_init_set_str
"GMP.xs", line 35: cannot dereference non-pointer type
"GMP.c", line 59: undefined symbol: mpz_t
"GMP.c", line 59: undefined symbol: RETVAL
"GMP.xs", line 47: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 48: cannot dereference non-pointer type
"GMP.c", line 78: undefined symbol: mpz_t
"GMP.c", line 78: undefined symbol: RETVAL
"GMP.xs", line 60: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 61: cannot dereference non-pointer type
"GMP.c", line 97: undefined symbol: mpz_t
"GMP.c", line 97: undefined symbol: RETVAL
"GMP.xs", line 73: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 74: cannot dereference non-pointer type
"GMP.c", line 115: undefined symbol: mpz_t
"GMP.c", line 115: undefined symbol: RETVAL
"GMP.xs", line 85: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 86: warning: implicit function declaration:
mpz_init_set_ui
"GMP.xs", line 86: cannot dereference non-pointer type
"GMP.c", line 133: undefined symbol: mpz_t
"GMP.c", line 133: undefined symbol: RETVAL
"GMP.xs", line 97: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 98: cannot dereference non-pointer type
"GMP.c", line 151: undefined symbol: mpz_t
"GMP.c", line 151: undefined symbol: RETVAL
"GMP.xs", line 109: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 110: cannot dereference non-pointer type
"GMP.c", line 169: undefined symbol: mpz_t
"GMP.c", line 169: undefined symbol: RETVAL
"GMP.xs", line 121: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 122: cannot dereference non-pointer type
"GMP.c", line 188: undefined symbol: mpz_t
"GMP.c", line 188: undefined symbol: n
"GMP.c", line 192: syntax error before or at: )
"GMP.xs", line 135: warning: implicit function declaration: mpz_clear
"GMP.xs", line 135: cannot dereference non-pointer type
"GMP.xs", line 136: warning: improper pointer/integer combination: arg
#1
"GMP.c", line 212: undefined symbol: mpz_t
"GMP.c", line 212: undefined symbol: n
"GMP.c", line 223: syntax error before or at: )
"GMP.xs", line 151: warning: implicit function declaration:
mpz_sizeinbase
"GMP.xs", line 151: cannot dereference non-pointer type
"GMP.xs", line 156: warning: implicit function declaration:
mpz_get_str
"GMP.xs", line 156: cannot dereference non-pointer type
"GMP.c", line 254: undefined symbol: mpz_t
"GMP.c", line 254: undefined symbol: n
"GMP.c", line 267: syntax error before or at: )
"GMP.xs", line 184: warning: implicit function declaration: mpz_tstbit
"GMP.xs", line 184: cannot dereference non-pointer type
"GMP.xs", line 189: cannot dereference non-pointer type
"GMP.xs", line 194: cannot dereference non-pointer type
"GMP.c", line 316: undefined symbol: mpz_t
"GMP.c", line 316: undefined symbol: n
"GMP.c", line 326: syntax error before or at: )
"GMP.xs", line 230: cannot dereference non-pointer type
"GMP.xs", line 235: cannot dereference non-pointer type
"GMP.c", line 353: undefined symbol: mpz_t
"GMP.c", line 353: undefined symbol: n
"GMP.c", line 363: syntax error before or at: )
"GMP.xs", line 253: cannot dereference non-pointer type
"GMP.xs", line 258: cannot dereference non-pointer type
"GMP.c", line 390: undefined symbol: mpz_t
"GMP.c", line 390: undefined symbol: n
"GMP.c", line 400: syntax error before or at: )
"GMP.xs", line 276: cannot dereference non-pointer type
"GMP.xs", line 281: cannot dereference non-pointer type
"GMP.c", line 427: undefined symbol: mpz_t
"GMP.c", line 427: undefined symbol: n
"GMP.c", line 428: operands must have arithmetic type: op "*"
"GMP.c", line 429: undefined symbol: mod
"GMP.c", line 430: undefined symbol: RETVAL
"GMP.c", line 434: syntax error before or at: )
"GMP.c", line 441: syntax error before or at: )
"GMP.c", line 448: syntax error before or at: )
"GMP.xs", line 296: warning: improper pointer/integer combination: op
"="
"GMP.xs", line 296: warning: implicit function declaration: mpz_init
"GMP.xs", line 296: cannot dereference non-pointer type
"GMP.xs", line 297: warning: implicit function declaration: mpz_powm
"GMP.xs", line 297: cannot dereference non-pointer type
"GMP.xs", line 297: cannot dereference non-pointer type
"GMP.xs", line 297: cannot dereference non-pointer type
"GMP.c", line 460: cannot recover from previous errors
cc: acomp failed for GMP.c
*** Error code 2
make: Fatal error: Command failed for target `GMP.o'
bash-3.00#
--------------------------------------------------------------------------------------------------------------------

Version 1.18 gives similar errors. Any suggestions/advice would be
much appreciated!

Sumit

 
Reply With Quote
 
 
 
 
DJ Stunks
Guest
Posts: n/a
 
      02-22-2007
On Feb 21, 4:03 pm, (E-Mail Removed) wrote:
> Make fails on both version 1.18 and 1.19.
> <snip>
> bash-3.00# perl Makefile.PL
> Note (probably harmless): No library found for -lgmp
> YAML not installed, make dist will not override metafile at
> Makefile.PL line 8.
> Writing Makefile for Math::BigInt::GMP


Why does the creation of the makefile for Math::BigInt::GMP say that
not finding the gmp library is "probably harmless"? Seems like it
should be critical to me...

-jp

 
Reply With Quote
 
 
 
 
sumitbee@gmail.com
Guest
Posts: n/a
 
      02-22-2007
On Feb 21, 10:12 pm, Mark Pryor <(E-Mail Removed)> wrote:
> On Wed, 21 Feb 2007 19:27:19 -0800, DJ Stunks wrote:
> > On Feb 21, 4:03 pm, (E-Mail Removed) wrote:
> >> Make fails on both version 1.18 and 1.19.
> >> <snip>
> >> bash-3.00# perl Makefile.PL
> >> Note (probably harmless): No library found for -lgmp
> >> YAML not installed, make dist will not override metafile at
> >> Makefile.PL line 8.
> >> Writing Makefile for Math::BigInt::GMP

>
> > Why does the creation of the makefile for Math::BigInt::GMP say that
> > not finding the gmp library is "probably harmless"? Seems like it
> > should be critical to me...

>
> If you are on Win32, try herehttp://www.kalinabears.com.au/w32perl/math_gmp.html
>
> --
> Mark


Mark, DJ, Thank you for your comments. mark, Math::BigInt is
installed and tests succeed. I am on Solaris, and cannot seem to find
the GMP header files. From the Tel test results, it seems that v.
1.18 was the only one that passed tests on Solaris, but that is
failing for me as well. Has anyone been able to install this on
Solaris? Any other ideas as to how to speed up Net::SSH:erl?

Thanks again,
Sumit

 
Reply With Quote
 
fmurch@gmail.com
Guest
Posts: n/a
 
      02-22-2007
On Feb 22, 9:10 am, (E-Mail Removed) wrote:
> On Feb 21, 10:12 pm, Mark Pryor <(E-Mail Removed)> wrote:
> > On Wed, 21 Feb 2007 19:27:19 -0800, DJ Stunks wrote:
> > > On Feb 21, 4:03 pm, (E-Mail Removed) wrote:
> > >> Make fails on both version 1.18 and 1.19.
> > >> <snip>
> > >> bash-3.00# perl Makefile.PL
> > >> Note (probably harmless): No library found for -lgmp
> > >> YAML not installed, make dist will not override metafile at
> > >> Makefile.PL line 8.
> > >> Writing Makefile for Math::BigInt::GMP

>
> > > Why does the creation of the makefile for Math::BigInt::GMP say that
> > > not finding the gmp library is "probably harmless"? Seems like it
> > > should be critical to me...

>
> > If you are on Win32, try herehttp://www.kalinabears.com.au/w32perl/math_gmp.html

>
> > --
> > Mark

>
> Mark, DJ, Thank you for your comments. mark, Math::BigInt is
> installed and tests succeed. I am on Solaris, and cannot seem to find
> the GMP header files.


http://www.sunfreeware.com/programlistsparc10.html#gmp

-jp

 
Reply With Quote
 
sumitbee@gmail.com
Guest
Posts: n/a
 
      02-22-2007
On Feb 22, 12:51 pm, (E-Mail Removed) wrote:
> On Feb 22, 9:10 am, (E-Mail Removed) wrote:
>
>
>
>
>
> > On Feb 21, 10:12 pm, Mark Pryor <(E-Mail Removed)> wrote:
> > > On Wed, 21 Feb 2007 19:27:19 -0800, DJ Stunks wrote:
> > > > On Feb 21, 4:03 pm, (E-Mail Removed) wrote:
> > > >> Make fails on both version 1.18 and 1.19.
> > > >> <snip>
> > > >> bash-3.00# perl Makefile.PL
> > > >> Note (probably harmless): No library found for -lgmp
> > > >> YAML not installed, make dist will not override metafile at
> > > >> Makefile.PL line 8.
> > > >> Writing Makefile for Math::BigInt::GMP

>
> > > > Why does the creation of the makefile for Math::BigInt::GMP say that
> > > > not finding the gmp library is "probably harmless"? Seems like it
> > > > should be critical to me...

>
> > > If you are on Win32, try herehttp://www.kalinabears.com.au/w32perl/math_gmp.html

>
> > > --
> > > Mark

>
> > Mark, DJ, Thank you for your comments. mark, Math::BigInt is
> > installed and tests succeed. I am on Solaris, and cannot seem to find
> > the GMP header files.

>
> http://www.sunfreeware.com/programlistsparc10.html#gmp
>
> -jp- Hide quoted text -
>
> - Show quoted text -


JP, thanks for the update. I installed gmp-4.1.2, changed the
LD_LIBRARY_PATH_64 and made sure the libgmp files were in /usr/local/
lib/sparcv9, but same problem.....

 
Reply With Quote
 
Sisyphus
Guest
Posts: n/a
 
      02-23-2007

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
..
..
>
> JP, thanks for the update. I installed gmp-4.1.2, changed the
> LD_LIBRARY_PATH_64 and made sure the libgmp files were in /usr/local/
> lib/sparcv9, but same problem.....
>


Try hacking at the XS file. Where it says:

#include "gmp.h"

Change that to:

#include "/usr/local/include/sparcv9/gmp.h" // if that's where gmp.h is
located

That should at least allow gmp.h to get found. Then it's just a matter of
making libgmp.a (or the gmp .so) findable.

Probably the simplest way to build it is to do it manually. Download the
M:::BI::GMP-1.19 source from CPAN, extract to some location, cd to that
location and run:

perl Makefile.PL INC="-I/usr/local/include/sparcv9"
LIBS="-L/usr/local/lib/sparcv9 -lgmp"
make test
make install

If you don't have a 'libgmp.a' then you should be able to link directly to
the libgmp-3.so (or whatever it's called) but you would need to change the
above command to properly reflect the name of the gmp .so file. Something
like:

perl Makefile.PL INC="-I/usr/local/include/sparcv9"
LIBS="-L/usr/local/lib/sparcv9 -lgmp-3"

All of this is, of course, untested.

Is there something there that works for you ? (You should at least be able
to eradicate the error about gmp.h being not found - assuming it really is
in /usr/local/include/sparcv9.)

Cheers,
Rob


 
Reply With Quote
 
sumitbee@gmail.com
Guest
Posts: n/a
 
      02-24-2007
On Feb 22, 10:19 pm, "Sisyphus" <(E-Mail Removed)> wrote:
> <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
> .
> .
>
>
>
> > JP, thanks for the update. I installed gmp-4.1.2, changed the
> > LD_LIBRARY_PATH_64 and made sure the libgmp files were in /usr/local/
> > lib/sparcv9, but same problem.....

>
> Try hacking at the XS file. Where it says:
>
> #include "gmp.h"
>
> Change that to:
>
> #include "/usr/local/include/sparcv9/gmp.h" // if that's where gmp.h is
> located
>
> That should at least allow gmp.h to get found. Then it's just a matter of
> making libgmp.a (or the gmp .so) findable.
>
> Probably the simplest way to build it is to do it manually. Download the
> M:::BI::GMP-1.19 source from CPAN, extract to some location, cd to that
> location and run:
>
> perl Makefile.PL INC="-I/usr/local/include/sparcv9"
> LIBS="-L/usr/local/lib/sparcv9 -lgmp"
> make test
> make install
>
> If you don't have a 'libgmp.a' then you should be able to link directly to
> the libgmp-3.so (or whatever it's called) but you would need to change the
> above command to properly reflect the name of the gmp .so file. Something
> like:
>
> perl Makefile.PL INC="-I/usr/local/include/sparcv9"
> LIBS="-L/usr/local/lib/sparcv9 -lgmp-3"
>
> All of this is, of course, untested.
>
> Is there something there that works for you ? (You should at least be able
> to eradicate the error about gmp.h being not found - assuming it really is
> in /usr/local/include/sparcv9.)
>
> Cheers,
> Rob


Rob, thanks. I'll try it out on Monday and let you know.

Cheers,
Sumit

 
Reply With Quote
 
sumitbee@gmail.com
Guest
Posts: n/a
 
      02-27-2007
On Feb 24, 10:04 am, (E-Mail Removed) wrote:
> On Feb 22, 10:19 pm, "Sisyphus" <(E-Mail Removed)> wrote:
>
>
>
>
>
> > <(E-Mail Removed)> wrote in message

>
> >news:(E-Mail Removed) roups.com...
> > .
> > .

>
> > > JP, thanks for the update. I installed gmp-4.1.2, changed the
> > > LD_LIBRARY_PATH_64 and made sure the libgmp files were in /usr/local/
> > > lib/sparcv9, but same problem.....

>
> > Try hacking at the XS file. Where it says:

>
> > #include "gmp.h"

>
> > Change that to:

>
> > #include "/usr/local/include/sparcv9/gmp.h" // if that's where gmp.h is
> > located

>
> > That should at least allow gmp.h to get found. Then it's just a matter of
> > making libgmp.a (or the gmp .so) findable.

>
> > Probably the simplest way to build it is to do it manually. Download the
> > M:::BI::GMP-1.19 source from CPAN, extract to some location, cd to that
> > location and run:

>
> > perl Makefile.PL INC="-I/usr/local/include/sparcv9"
> > LIBS="-L/usr/local/lib/sparcv9 -lgmp"
> > make test
> > make install

>
> > If you don't have a 'libgmp.a' then you should be able to link directly to
> > the libgmp-3.so (or whatever it's called) but you would need to change the
> > above command to properly reflect the name of the gmp .so file. Something
> > like:

>
> > perl Makefile.PL INC="-I/usr/local/include/sparcv9"
> > LIBS="-L/usr/local/lib/sparcv9 -lgmp-3"

>
> > All of this is, of course, untested.

>
> > Is there something there that works for you ? (You should at least be able
> > to eradicate the error about gmp.h being not found - assuming it really is
> > in /usr/local/include/sparcv9.)

>
> > Cheers,
> > Rob

>
> Rob, thanks. I'll try it out on Monday and let you know.
>
> Cheers,
> Sumit- Hide quoted text -
>
> - Show quoted text -


Rob,

Changing the include to the full path to gmp.h in the xs file and
creating the makefile with the INC and LIB options as you suggested
worked. I am still getting errors on "make test" but thats a different
issue. Thanks a lot for your help!

Thanks to all others that replied as well.

Sumit

 
Reply With Quote
 
sumitbee@gmail.com
Guest
Posts: n/a
 
      03-06-2007
The solution, for anyone interested, was to install GNU make 3.81,
compile gmp-4.2 with this version of make, and then install
Math::BigInt::GMP pointing the lib and INC to the location of the
newly installed gmp-4.2.

 
Reply With Quote
 
DJ Stunks
Guest
Posts: n/a
 
      03-06-2007
On Mar 6, 12:48 pm, (E-Mail Removed) wrote:
> The solution, for anyone interested, was to install GNU make 3.81,
> compile gmp-4.2 with this version of make, and then install
> Math::BigInt::GMP pointing the lib and INC to the location of the
> newly installed gmp-4.2.


It's good to know you got it to work, but I would suggest that this
post is going to be nearly useless to some future googler unless they
come across your OP first AND the thread remains intact. In the
future perhaps you could consider full-quoting your OP and posting the
solution below.

We've all Googled issues like this but, as I'm sure you know, all one
normally finds is other people with the same problem.

$0.02
-jp

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to import package over NFS in solaris Ashok Python 1 09-23-2009 04:49 PM
'unable to execute cc: No such file or directory' with distutilson Solaris Tim Edwards Python 0 07-14-2009 09:11 AM
Help with Install of Xerces-c 2.4.0 for Solaris Jim Phelps XML 0 09-17-2004 03:10 PM
Re: solaris install of python Skip Montanaro Python 1 04-12-2004 02:17 PM
viewcvs install error on solaris bva Python 4 01-23-2004 03:59 PM



Advertisments