This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Perl, the GMP library, and the Math::BigInt::GMP module


I have installed the latest versions of Perl and the GMP library,
and want to install the Math::BigInt::GMP Perl module which makes
use of this GMP library, but I can't make them play together.

There is a complaint "No library found for -lgmp", but I know the
library is installed.  I can also see the files:

   $ find /usr/lib /usr/local/lib -type f | grep -i gmp
   /usr/lib/libgmp.dll.a
   /usr/lib/libgmp.la
   /usr/lib/w32api/libigmpagnt.a

Below are the results from my attempt.  What am I doing wrong?
What must I do to get it working?

   cpan> install Math::BigInt::GMP
   Running install for module Math::BigInt::GMP
   Running make for T/TE/TELS/math/Math-BigInt-GMP-1.11.tar.gz
   Checksum for /.cpan/sources/authors/id/T/TE/TELS/math/Math-BigInt-GMP-1.11.tar.gz ok
   Math-BigInt-GMP-1.11/
   Math-BigInt-GMP-1.11/t/
   Math-BigInt-GMP-1.11/t/bigintg.t
   Math-BigInt-GMP-1.11/t/bigintpm.t
   Math-BigInt-GMP-1.11/t/bigintpm.inc
   Math-BigInt-GMP-1.11/t/bigfltpm.t
   Math-BigInt-GMP-1.11/t/bigfltpm.inc
   Math-BigInt-GMP-1.11/lib/
   Math-BigInt-GMP-1.11/lib/Math/
   Math-BigInt-GMP-1.11/lib/Math/BigInt/
   Math-BigInt-GMP-1.11/lib/Math/BigInt/GMP.pm
   Math-BigInt-GMP-1.11/BUGS
   Math-BigInt-GMP-1.11/TODO
   Math-BigInt-GMP-1.11/GMP.xs
   Math-BigInt-GMP-1.11/SIGNATURE
   Math-BigInt-GMP-1.11/LICENSE
   Math-BigInt-GMP-1.11/README
   Math-BigInt-GMP-1.11/Makefile.PL
   Math-BigInt-GMP-1.11/typemap
   Math-BigInt-GMP-1.11/INSTALL
   Math-BigInt-GMP-1.11/CHANGES
   Math-BigInt-GMP-1.11/CREDITS
   Math-BigInt-GMP-1.11/MANIFEST
   Removing previously used /.cpan/build/Math-BigInt-GMP-1.11

     CPAN.pm: Going to build T/TE/TELS/math/Math-BigInt-GMP-1.11.tar.gz

   Checking if your kit is complete...
   Looks good
   Note (probably harmless): No library found for -lgmp
   Writing Makefile for Math::BigInt::GMP
   cp lib/Math/BigInt/GMP.pm blib/lib/Math/BigInt/GMP.pm
   /usr/bin/perl.exe /usr/lib/perl5/5.8.0/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.0/ExtUtils/typemap -typemap typemap  GMP.xs > GMP.xsc && mv GMP.xsc GMP.c
   gcc -c   -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -DUSEIMPORTLIB -O3   -DVERSION=\"1.11\" -DXS_VERSION=\"1.11\"  "-I/usr/lib/perl5/5.8.0/
   cygwin-multi-64int/CORE"   GMP.c
   GMP.c: In function `XS_Math__BigInt__GMP_destroy':
   GMP.c:146: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP___stringify':
   GMP.c:176: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__str':
   GMP.c:219: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__as_hex':
   GMP.c:262: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__as_bin':
   GMP.c:302: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__modpow':
   GMP.c:339: warning: cast to pointer from integer of different size
   GMP.c:346: warning: cast to pointer from integer of different size
   GMP.c:353: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP_mmod_gmp':
   GMP.c:381: warning: cast to pointer from integer of different size
   GMP.c:388: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__add':
   GMP.c:417: warning: cast to pointer from integer of different size
   GMP.c:424: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__inc':
   GMP.c:453: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__dec':
   GMP.c:481: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP_sub_two':
   GMP.c:509: warning: cast to pointer from integer of different size
   GMP.c:516: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__rsft':
   GMP.c:552: warning: cast to pointer from integer of different size
   GMP.c:559: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__lsft':
   GMP.c:605: warning: cast to pointer from integer of different size
   GMP.c:612: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__mul':
   GMP.c:651: warning: cast to pointer from integer of different size
   GMP.c:658: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP_div_two':
   GMP.c:687: warning: cast to pointer from integer of different size
   GMP.c:694: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP_bdiv_two':
   GMP.c:726: warning: cast to pointer from integer of different size
   GMP.c:733: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__mod':
   GMP.c:766: warning: cast to pointer from integer of different size
   GMP.c:773: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__acmp':
   GMP.c:804: warning: cast to pointer from integer of different size
   GMP.c:811: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__is_zero':
   GMP.c:839: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__is_one':
   GMP.c:866: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__pow':
   GMP.c:896: warning: cast to pointer from integer of different size
   GMP.c:903: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__gcd':
   GMP.c:933: warning: cast to pointer from integer of different size
   GMP.c:940: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__and':
   GMP.c:969: warning: cast to pointer from integer of different size
   GMP.c:976: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__xor':
   GMP.c:1005: warning: cast to pointer from integer of different size
   GMP.c:1012: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__or':
   GMP.c:1041: warning: cast to pointer from integer of different size
   GMP.c:1048: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__fac':
   GMP.c:1080: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__copy':
   GMP.c:1109: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__is_odd':
   GMP.c:1137: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__is_even':
   GMP.c:1164: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__sqrt':
   GMP.c:1190: warning: cast to pointer from integer of different size
   GMP.c: In function `XS_Math__BigInt__GMP__root':
   GMP.c:1223: warning: cast to pointer from integer of different size
   GMP.c:1230: warning: cast to pointer from integer of different size
   Running Mkbootstrap for Math::BigInt::GMP ()
   chmod 644 GMP.bs
   rm -f blib/arch/auto/Math/BigInt/GMP/GMP.dll
   LD_RUN_PATH="" ld2  -s -L/usr/local/lib GMP.o  -o blib/arch/auto/Math/BigInt/GMP/GMP.dll  /usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/libperl.dll.a
   gcc -shared -o  GMP.dll -Wl,--out-implib=libGMP.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608 \
   -s -L/usr/local/lib GMP.o  /usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/libperl.dll.a
   Creating library file: libGMP.dll.a
   GMP.o(.text+0x1b3):GMP.c: undefined reference to `___gmpz_clear'
   GMP.o(.text+0x3e5):GMP.c: undefined reference to `___gmpz_sizeinbase'
   GMP.o(.text+0x431):GMP.c: undefined reference to `___gmpz_get_str'
   GMP.o(.text+0x700):GMP.c: undefined reference to `___gmpz_sizeinbase'
   GMP.o(.text+0x74c):GMP.c: undefined reference to `___gmpz_get_str'
   GMP.o(.text+0xa16):GMP.c: undefined reference to `___gmpz_sizeinbase'
   GMP.o(.text+0xa6a):GMP.c: undefined reference to `___gmpz_get_str'
   GMP.o(.text+0xd16):GMP.c: undefined reference to `___gmpz_sizeinbase'
   GMP.o(.text+0xd6a):GMP.c: undefined reference to `___gmpz_get_str'
   GMP.o(.text+0x11c9):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x11e6):GMP.c: undefined reference to `___gmpz_powm'
   GMP.o(.text+0x1658):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x166e):GMP.c: undefined reference to `___gmpz_fdiv_r'
   GMP.o(.text+0x1ab1):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x1ac7):GMP.c: undefined reference to `___gmpz_add'
   GMP.o(.text+0x1ad6):GMP.c: undefined reference to `___gmpz_set'
   GMP.o(.text+0x1df9):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x1e10):GMP.c: undefined reference to `___gmpz_add_ui'
   GMP.o(.text+0x20d9):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x20f0):GMP.c: undefined reference to `___gmpz_sub_ui'
   GMP.o(.text+0x2478):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x248e):GMP.c: undefined reference to `___gmpz_sub'
   GMP.o(.text+0x2897):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x28ad):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x28ef):GMP.c: undefined reference to `___gmpz_init_set_ui'
   GMP.o(.text+0x28ff):GMP.c: undefined reference to `___gmpz_pow_ui'
   GMP.o(.text+0x2915):GMP.c: undefined reference to `___gmpz_fdiv_q'
   GMP.o(.text+0x291d):GMP.c: undefined reference to `___gmpz_clear'
   GMP.o(.text+0x292d):GMP.c: undefined reference to `___gmpz_clear'
   GMP.o(.text+0x2d97):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x2dad):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x2def):GMP.c: undefined reference to `___gmpz_init_set_ui'
   GMP.o(.text+0x2dff):GMP.c: undefined reference to `___gmpz_pow_ui'
   GMP.o(.text+0x2e15):GMP.c: undefined reference to `___gmpz_mul'
   GMP.o(.text+0x2e1d):GMP.c: undefined reference to `___gmpz_clear'
   GMP.o(.text+0x2e2d):GMP.c: undefined reference to `___gmpz_clear'
   GMP.o(.text+0x3251):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x3267):GMP.c: undefined reference to `___gmpz_mul'
   GMP.o(.text+0x3276):GMP.c: undefined reference to `___gmpz_set'
   GMP.o(.text+0x3618):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x362e):GMP.c: undefined reference to `___gmpz_fdiv_q'
   GMP.o(.text+0x39f4):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x39ff):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x3a1c):GMP.c: undefined reference to `___gmpz_tdiv_qr'
   GMP.o(.text+0x3e11):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x3e27):GMP.c: undefined reference to `___gmpz_mod'
   GMP.o(.text+0x3e36):GMP.c: undefined reference to `___gmpz_set'
   GMP.o(.text+0x424a):GMP.c: undefined reference to `___gmpz_cmp'
   GMP.o(.text+0x4933):GMP.c: undefined reference to `___gmpz_cmp_ui'
   GMP.o(.text+0x4cb1):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x4cda):GMP.c: undefined reference to `___gmpz_pow_ui'
   GMP.o(.text+0x5091):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x50a7):GMP.c: undefined reference to `___gmpz_gcd'
   GMP.o(.text+0x5451):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x5467):GMP.c: undefined reference to `___gmpz_and'
   GMP.o(.text+0x5811):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x5827):GMP.c: undefined reference to `___gmpz_xor'
   GMP.o(.text+0x5bd1):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x5be7):GMP.c: undefined reference to `___gmpz_ior'
   GMP.o(.text+0x5ef9):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x5f1b):GMP.c: undefined reference to `___gmpz_fac_ui'
   GMP.o(.text+0x61e0):GMP.c: undefined reference to `___gmpz_init_set'
   GMP.o(.text+0x64f6):GMP.c: undefined reference to `___gmpz_tstbit'
   GMP.o(.text+0x6835):GMP.c: undefined reference to `___gmpz_tstbit'
   GMP.o(.text+0x6b19):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x6b28):GMP.c: undefined reference to `___gmpz_sqrt'
   GMP.o(.text+0x6e71):GMP.c: undefined reference to `___gmpz_init'
   GMP.o(.text+0x6e9a):GMP.c: undefined reference to `___gmpz_root'
   GMP.o(.text+0x84db):GMP.c: undefined reference to `___gmpz_init_set_str'
   GMP.o(.text+0x86fb):GMP.c: undefined reference to `___gmpz_init_set_str'
   GMP.o(.text+0x891b):GMP.c: undefined reference to `___gmpz_init_set_str'
   GMP.o(.text+0x8b07):GMP.c: undefined reference to `___gmpz_init_set_ui'
   GMP.o(.text+0x8cc7):GMP.c: undefined reference to `___gmpz_init_set_ui'
   collect2: ld returned 1 exit status
   perlld: *** system() failed to execute
   gcc -shared -o  GMP.dll -Wl,--out-implib=libGMP.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608 \
   -s -L/usr/local/lib GMP.o  /usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/libperl.dll.a

   make: *** [blib/arch/auto/Math/BigInt/GMP/GMP.dll] Error 1
     /usr/bin/make  -- NOT OK
   Running make test
     Can't test without successful make
   Running make install
     make had returned bad status, install seems impossible

   cpan>


Peter

-- 
Everyone has a blind spot in each eye.  I also have a deaf spot
in each ear.  If you stand at a certain place, I can't hear you.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]