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

Peter J. Acklam pjacklam@online.no
Thu Oct 9 11:15:00 GMT 2003


"Gerrit @ cygwin" <cygwin@cygwin.com> wrote:

> This ia a problem with MakeMaker.  It just looks for .a
> libraries and doesn't see the .dll.a import library, I thought
> it was fixed, which version of perl are you using?

I am using Perl 5.8.0-5, with MakeMaker version 6.17.

> As a workaround try creating a symlink libgmp.dll.a libgmp.a or
> create an empty libgmp.a in /usr/lib.

I made the symlink

   /usr/lib/libgmp.a -> /usr/lib/libgmp.dll.a

and it now builds, but with many errors:

   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: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-mu
   lti-64int/CORE/libperl.dll.a -lgmp
   gcc -shared -o  GMP.dll -Wl,--out-implib=libGMP.dll.a 
-Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388
   608 \
   -s -L/usr/local/lib GMP.o  
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/libperl.dll.a -lgmp
   Creating library file: libGMP.dll.a
   mv GMP.dll libGMP.dll.a blib/arch/auto/Math/BigInt/GMP/
   chmod 755 blib/arch/auto/Math/BigInt/GMP/GMP.dll
   cp GMP.bs blib/arch/auto/Math/BigInt/GMP/GMP.bs
   chmod 644 blib/arch/auto/Math/BigInt/GMP/GMP.bs
     /usr/bin/make  -- OK

The "make test" step fails with zillion errors:

   Running make test
   /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
   t/bigfltpm....# Test 1 got: 'Math::BigInt::Calc' (t/bigfltpm.inc at line 3)
   #   Expected: 'Math::BigInt::GMP'
   t/bigfltpm....FAILED test 1
           Failed 1/1627 tests, 99.94% okay
   t/bigintg.....Can't load '../blib/arch/auto/Math/BigInt/GMP/GMP.dll' for 
module Math::BigInt::GMP: dlopen: Win32 error 9
   98 at /usr/lib/perl5/5.8.0/cygwin-multi-64int/DynaLoader.pm line 229.
    at t/bigintg.t line 18
   Compilation failed in require at t/bigintg.t line 18.
   BEGIN failed--compilation aborted at t/bigintg.t line 18.
   t/bigintg.....dubious
           Test returned status 255 (wstat 65280, 0xff00)
   DIED. FAILED tests 1-117
           Failed 117/117 tests, 0.00% okay
   t/bigintpm....ok 1/2365# Test 2 got: <UNDEF> (bigintpm.inc at line 193)
   #   Expected: '1234-345'
   # Test 3 got: <UNDEF> (bigintpm.inc at line 193 fail #2)
   t/bigintpm....NOK 3#   Expected: '3'
   [...]

Peter

-- 
Peter J. Acklam - pjacklam@online.no - http://home.online.no/~pjacklam


--
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/



More information about the Cygwin mailing list