problem with Math::GMP
Nalina
created: 2004-06-15 01:14:47
Hi monks,

I tried to install 'Math::GMP' module on a windows 2000 system.

I got the following messages when I ran Makefile.pl

Note (probably harmless): No library found for -lgmp
Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib 
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for wsock32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for msvcrt.lib
Writing Makefile for Math::GMP

And the following error with nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        cl -c    -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST
RICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY
S -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1    -DVERSION=\"2.03\"
 -DXS_VERSION=\"2.03\"  "-IC:\Perl\lib\CORE"   GMP.c
GMP.c
C:\Perl\lib\CORE\perl.h(380) : fatal error C1083: Cannot open include file: 'sys
/types.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

20040615 Edit by [Corion]: Fixed formatting, added code tags

Re: problem with Math::GMP
created: 2004-06-15 02:14:29
Hi.
Have you see all the answers to node 361885 (your question)?
Have you read A guide to installing modules?
What's the problem?

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.
Re: problem with Math::GMP
created: 2004-06-15 02:42:07

This is a Perl XS wrapper (C code) that uses the GNU MP library. First read [Practical Guide to Compiling C-based modules under Win32] because your C compiler environment is screwed. You will know it is not FUBAR when you reduce your error messages to:

C:\Math-GMP-2.03>perl Makefile.PL
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for '-lgmp'
Writing Makefile for Math::GMP

At this stage we are missing the gmp library. This error is not harmless! GMP is not easy to compile on Win32. Go to http://www.cs.nyu.edu/exact/core/gmp/. You can get binaries for the .lib you will need here but they did not work for me. You will probably need to go the patch route, compile within VCC....

cheers

tachyon

Re^2: problem with Math::GMP
created: 2004-06-16 23:40:32
Thanks for the reply

I followed all the steps given in Practical Guide to Compiling C-based modules under Win32, also downloaded files from http://www.cs.nyu.edu/exact/core/gmp/.

I still got some errors

I got the following message when i ran makefile.pl

C:\downloads\Math-GMP-2.03>perl makefile.pl

Checking if your kit is complete...

Looks good

Writing Makefile for Math::GMP

With nmake I got an error as follows,

C:\downloads\Math-GMP-2.03>nmake

Microsoft (R) Program Maintenance Utility Version 7.10.3077

Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST RICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SY S -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"2.03\" -DXS_VERSION=\"2.03\" "-IC:\Perl\lib\CORE" GMP.c

GMP.c

c1 : warning C4349: /Gf is deprecated and will not be supported in future versio ns of Visual C++; remove /Gf or use /GF instead Running Mkbootstrap for Math::GMP ()

C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 GMP.bs

link -out:blib\arch\auto\Math\GMP\GMP.dll -dll -nologo -nodefaultlib -de bug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 GMP.obj C:\Perl\li b\CORE\perl58.lib C:\Perl\lib\CORE\gmp.lib C:\Perl\lib\CORE\oldnames.lib C:\Perl \lib\CORE\kernel32.lib C:\Perl\lib\CORE\user32.lib C:\Perl\lib\CORE\gdi32.lib C: \Perl\lib\CORE\winspool.lib C:\Perl\lib\CORE\comdlg32.lib C:\Perl\lib\CORE\advap i32.lib C:\Perl\lib\CORE\shell32.lib C:\Perl\lib\CORE\ole32.lib C:\Perl\lib\CORE \oleaut32.lib C:\Perl\lib\CORE\netapi32.lib C:\Perl\lib\CORE\uuid.lib C:\Perl\li b\CORE\wsock32.lib C:\Perl\lib\CORE\mpr.lib C:\Perl\lib\CORE\winmm.lib C:\Perl\l ib\CORE\version.lib C:\Perl\lib\CORE\odbc32.lib C:\Perl\lib\CORE\odbccp32.lib C: \Perl\lib\CORE\msvcrt.lib -def:GMP.def

Creating library blib\arch\auto\Math\GMP\GMP.lib and object blib\arch\auto\Ma th\GMP\GMP.exp

C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755 blib\arch\auto\Mat h\GMP\GMP.dll

C:\Perl\bin\perl.exe -MExtUtils::Command -e cp GMP.bs blib\arch\auto\Mat h\GMP\GMP.bs

C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 blib\arch\auto\Mat h\GMP\GMP.bs

with nmake test,

C:\downloads\Math-GMP-2.03>nmake test

I got a messge asking whether the following is ok

'The procedure entry point__gmpz_sqrt could not be located in the dynamic link library gmp.dll'

and also an error saying 'Microsoft (R) Program Maintenance Utility Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bl ib\lib', 'blib\arch')" t\gmppm.t t\gmppm....Can't load 'C:\downloads\Math-GMP-2.03\blib\arch/auto/Math/GMP/GMP.dl l' for module Math::GMP: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 229. at t\gmppm.t line 7

Compilation failed in require at t\gmppm.t line 7. BEGIN failed--compilation aborted at t\gmppm.t line 7. t\gmppm....dubious

Test returned status 255 (wstat 65280, 0xff00) FAILED--1 test script could be run, alas--no output ever seen NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2' Stop.

What do I do now?

Thanks & regards

Nalina
Re^3: problem with Math::GMP
created: 2004-06-16 23:56:52

How did you build your underlying GMP library. It looks like you have probably built/got a dynamic gmp.lib and tried to link against that. See this for an explanation of the difference between static and dynamic linking. But in essence you need to link to a static gmp.lib (which contains all the machine code) so that you can build a gmp.dll (for Perl) that can be dynamically loaded and has all the machine code (aka entry points) it needs.

If this is for Net::SSH::Perl it *may* be possible to simple s/Math::GMP/Math::BigInt/g as these modules are *almost* totally compatible.

Math::GMP was designed to be a drop-in replacement both for Math::BigInt and for regular integer arithmetic.

That may be an easier way to do it for you. If your SSH needs are modest there is plink.exe (google for Putty.exe) which gives you a command line ssh tool you might just be able to control through the shell.

cheers

tachyon

Re^4: problem with Math::GMP
created: 2004-06-22 02:02:39
Yes this is for Net::SSH::Perl. I installed GMP::BigInt and replaced Math::GMP with Math::BigInt in all the modules. But still when I execute the following script

use Net::SSH::Perl;

$host="xxx.xxx.xxx.xxx";

$username = "user";

$pass = "pass";

$ssh=Net::SSH::Perl->new($host, debug=>1, cipher=>'DES', port =>22);

$ssh->login($username, $pass);

my(@arra) = $ssh->cmd("?");

print "output: $arra\n";

I got this message with an error

$ perl cisco_pix.pl

Nalina: Reading configuration data /home/Administrator/.ssh/config

Nalina: Reading configuration data /etc/ssh_config

Nalina: Connecting to xxx.xxx.xxx.xxx, port 22.

Nalina: Remote protocol version 1.5, remote software version Cisco-1.25

Nalina: Net::SSH::Perl Version 1.25, protocol version 1.5.

Nalina: No compat match: Cisco-1.25.

Nalina: Connection established.

Nalina: Waiting for server public key.

Nalina: Received server public key (768 bits) and host key (2048 bits).

Nalina: Host 'xxx.xxx.xxx.xxx' is known and matches the host key.

Undefined subroutine &Math::GMP::sizeinbase_gmp called at /usr/lib/perl5/site_pe rl/5.8.2/Net/SSH/Perl/Util/RSA.pm line 30.



I am using Cygwin bash shell.

What is the compatible function for sizeinbase_gmp in BigInt?

Regards

Nalina
Re^3: problem with Math::GMP
created: 2004-06-17 00:29:42
http://crazyinsomniac.perlmonk.org/perl/ppm/5.8/Math-GMP.ppd

perlmonks.org content © perlmonks.org and Anonymous Monk, Nalina, PodMaster, tachyon

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03