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

Discussion in 'Perl Misc' started by sumitbee@gmail.com, Feb 21, 2007.

  1. Guest

    Hello Guru's:

    Make fails on both version 1.18 and 1.19. I am trying to install this
    to speed up Net::SSH::perl, since that is unbearably slow with the
    pure perl libraries, or even Math::BigInt::pari, 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
     
    , Feb 21, 2007
    #1
    1. Advertising

  2. DJ Stunks Guest

    On Feb 21, 4:03 pm, 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
     
    DJ Stunks, Feb 22, 2007
    #2
    1. Advertising

  3. Guest

    On Feb 21, 10:12 pm, Mark Pryor <> wrote:
    > On Wed, 21 Feb 2007 19:27:19 -0800, DJ Stunks wrote:
    > > On Feb 21, 4:03 pm, 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::perl?

    Thanks again,
    Sumit
     
    , Feb 22, 2007
    #3
  4. Guest

    On Feb 22, 9:10 am, wrote:
    > On Feb 21, 10:12 pm, Mark Pryor <> wrote:
    > > On Wed, 21 Feb 2007 19:27:19 -0800, DJ Stunks wrote:
    > > > On Feb 21, 4:03 pm, 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
     
    , Feb 22, 2007
    #4
  5. Guest

    On Feb 22, 12:51 pm, wrote:
    > On Feb 22, 9:10 am, wrote:
    >
    >
    >
    >
    >
    > > On Feb 21, 10:12 pm, Mark Pryor <> wrote:
    > > > On Wed, 21 Feb 2007 19:27:19 -0800, DJ Stunks wrote:
    > > > > On Feb 21, 4:03 pm, 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.....
     
    , Feb 22, 2007
    #5
  6. Sisyphus Guest

    <> wrote in message
    news:...
    ..
    ..
    >
    > 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
     
    Sisyphus, Feb 23, 2007
    #6
  7. Guest

    On Feb 22, 10:19 pm, "Sisyphus" <> wrote:
    > <> wrote in message
    >
    > news:...
    > .
    > .
    >
    >
    >
    > > 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
     
    , Feb 24, 2007
    #7
  8. Guest

    On Feb 24, 10:04 am, wrote:
    > On Feb 22, 10:19 pm, "Sisyphus" <> wrote:
    >
    >
    >
    >
    >
    > > <> wrote in message

    >
    > >news:...
    > > .
    > > .

    >
    > > > 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
     
    , Feb 27, 2007
    #8
  9. Guest

    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.
     
    , Mar 6, 2007
    #9
  10. DJ Stunks Guest

    On Mar 6, 12:48 pm, 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
     
    DJ Stunks, Mar 6, 2007
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-2?Q?Rafa=B3?= Maj Raf256

    Something like bigint / GMP?

    =?ISO-8859-2?Q?Rafa=B3?= Maj Raf256, Mar 17, 2005, in forum: C++
    Replies:
    5
    Views:
    824
    Alex Vinokur
    Mar 19, 2005
  2. =?ISO-8859-2?Q?Rafa=B3?= Maj Raf256

    Something like bigint / GMP?

    =?ISO-8859-2?Q?Rafa=B3?= Maj Raf256, Mar 17, 2005, in forum: C Programming
    Replies:
    12
    Views:
    632
    Chris Croughton
    Mar 18, 2005
  3. MaggotChild
    Replies:
    1
    Views:
    194
    MaggotChild
    Oct 28, 2009
  4. Sal
    Replies:
    2
    Views:
    256
  5. VK
    Replies:
    15
    Views:
    1,335
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page