"Can't locate loadable object for module GMP" - any ideas

J

Jasper

Hi there, I installed GNU GMP for windows and placed GMP.pm in the
directories indicated below, any ideas why perl spits this error back
at me ?? Is there something specific I need to do ?
Thanks for any assistance..

Can't locate loadable object for module GMP in @INC (@INC contains:
c:/Perl/lib c:/Perl/s
ite/lib .) at test.pl line 46
Compilation failed in require at test.pl line 46.
BEGIN failed--compilation aborted at test.pl line 46.
 
S

Sisyphus

Jasper said:
Hi there, I installed GNU GMP for windows and placed GMP.pm in the
directories indicated below, any ideas why perl spits this error back
at me ?? Is there something specific I need to do ?
Thanks for any assistance..

Can't locate loadable object for module GMP in @INC (@INC contains:
c:/Perl/lib c:/Perl/s
ite/lib .) at test.pl line 46
Compilation failed in require at test.pl line 46.
BEGIN failed--compilation aborted at test.pl line 46.

I presume you obtained 'GMP.pm' from the Demos/Perl folder. That's not
the right way to go about it. You need to cd to the Demos/Perl folder
and run in turn:
perl Makefile.PL
make test
make install

(You should replace 'make' with whatever 'perl -V:make' reports -
probably 'nmake' I'm guessing.)
That way you'll end up building and installing the *entire* module -
including the 'loadable object' which isn't being found :)

But then .... gee .... it's hard to give good advice when I have to
guess about so much .... let's just say that if you're running
ActiveState perl you can get all of the GMP stuff you need (including
the GMP dll, the GMP module, the Math::GMP module, the Math::BigInt::GMP
module, and more) from
http://www.kalinabears.com.au/w32perl/math_gmp.html .
You shouldn't have to build anything - just download and install as per
the instructions.
If you strike trouble with any of it, please let me know. (The
"instructions" make perfect sense to me, but I've been around long
enough to know that doesn't necessarily mean they're sensible :)

If you're not using ActiveState perl (or even if you are but would
prefer to build things yourself) could you tell us what 'perl -V' reports.

Cheers,
Rob
 
J

Jasper

Sisyphus said:
I presume you obtained 'GMP.pm' from the Demos/Perl folder. That's not
the right way to go about it. You need to cd to the Demos/Perl folder
and run in turn:
perl Makefile.PL
make test
make install

(You should replace 'make' with whatever 'perl -V:make' reports -
probably 'nmake' I'm guessing.)
That way you'll end up building and installing the *entire* module -
including the 'loadable object' which isn't being found :)

But then .... gee .... it's hard to give good advice when I have to
guess about so much .... let's just say that if you're running
ActiveState perl you can get all of the GMP stuff you need (including
the GMP dll, the GMP module, the Math::GMP module, the Math::BigInt::GMP
module, and more) from
http://www.kalinabears.com.au/w32perl/math_gmp.html .
You shouldn't have to build anything - just download and install as per
the instructions.
If you strike trouble with any of it, please let me know. (The
"instructions" make perfect sense to me, but I've been around long
enough to know that doesn't necessarily mean they're sensible :)

If you're not using ActiveState perl (or even if you are but would
prefer to build things yourself) could you tell us what 'perl -V' reports.

Cheers,
Rob


Yes running Activestate...I will try and install all the other GMP
software and try again...
 
J

Jasper

Hi there, I installed GNU GMP for windows and placed GMP.pm in the
directories indicated below, any ideas why perl spits this error back
at me ?? Is there something specific I need to do ?
Thanks for any assistance..

Can't locate loadable object for module GMP in @INC (@INC contains:
c:/Perl/lib c:/Perl/s
ite/lib .) at test.pl line 46
Compilation failed in require at test.pl line 46.
BEGIN failed--compilation aborted at test.pl line 46.

I went to your webpage and it failed
http://www.kalinabears.com.au/w32perl/math_gmp.html. I am using
ActiveState Perl 5.8.3 (latest) and cant get GMP to work on Windows
XP. Here are my results:

A). Math::GMP for Win32 Perl -
1 - ppm install Math-GMP.ppd - failed
2- copied In blib, find the files GMP.dll and GMP.pm.
Copy GMP.pm to your perl/site/lib/math/ folder.
Copy GMP.dll to your perl/site/lib/auto/math/gmp folder.
3- test: perl gmppm.t windows Popup ERROR message: "Failed to start
b/c libgmp-3.dll was not found, reinstalling may fix problem"

B).GMP for Win32 Perl
1- C:\temp\temp1\gmp_perl\gmp_perl>ppm install GMP.ppd
Note: Package 'GMP' is already installed.
2- perl test.pl - windows Popup ERROR message: "Failed to start b/c
libgmp-3.dll was not found, reinstalling may fix problem"

C).Math::BigInt::GMP for Win32 Perl
1 - ppm install Math-BigInt-GMP.ppd
result:
====================
Install 'Math-BigInt-GMP' version 1.13 in ActivePerl 5.8.3.809.
====================
Error: error downloading
'file://localhost/C%7C/temp/temp1/gmp_perl/math_bigint_gmp/MSWin
32-x86-multi-thread-5.8/Math-BigInt-GMP.tar.gz': 404 File
`C:\temp\temp1\gmp_perl\math_bi
gint_gmp\MSWin32-x86-multi-thread-5.8\Math-BigInt-GMP.tar.gz' does not
exist

2 - Copy GMP.pm to your perl/site/lib/math/bigint/ folder. - NO SUCH
FOLDER EXISTS

3- works: perl bigfltpm.t

Doesnt work: perl bigintpm.t
# Test 958 got: <UNDEF> (bigintpm.inc at line 196 fail #943)
# Expected: '4'
# Tried: '$x = Math::BigInt->new("-4");$y = Math::BigInt->new('7');$x
& $y;'
Can't locate auto/Math/BigInt/GMP/_zero.al in @INC (@INC contains:
.../blib/arch ../lib c
:/Perl/lib c:/Perl/site/lib .) at c:/Perl/lib/Math/BigInt.pm line 725
Compilation failed in require at bigintpm.t line 23, <DATA> line 1050.

Doesnt work: perl bigintg.t

C:\temp\temp1\gmp_perl\math_bigint_gmp>perl bigintg.t
Can't locate loadable object for module Math::BigInt::GMP in @INC
(@INC contains: ../blib
/arch ../lib c:/Perl/lib c:/Perl/site/lib .) at bigintg.t line 14
Compilation failed in require at bigintg.t line 14.
BEGIN failed--compilation aborted at bigintg.t line 14.
 
S

Sisyphus

asper said:
(e-mail address removed) (Jasper) wrote in message


I went to your webpage and it failed
http://www.kalinabears.com.au/w32perl/math_gmp.html. I am using
ActiveState Perl 5.8.3 (latest) and cant get GMP to work on Windows
XP. Here are my results:

A). Math::GMP for Win32 Perl -
1 - ppm install Math-GMP.ppd - failed
2- copied In blib, find the files GMP.dll and GMP.pm.
Copy GMP.pm to your perl/site/lib/math/ folder.
Copy GMP.dll to your perl/site/lib/auto/math/gmp folder.
3- test: perl gmppm.t windows Popup ERROR message: "Failed to start
b/c libgmp-3.dll was not found, reinstalling may fix problem"

You need 'libgmp-3.dll' installed in one of the folders in your path.
'libgmp-3.dll' can be got from
http://www.kalinabears.com.au/w32perl/GMP-4.1.3-mingw.tar.gz .
(That package also includes some additional files that you won't need.)

I don't know why the 'ppm install Math-GMP.ppd' would have failed. Any
error messages with that ? Does 'ppm' usually work flawlesssly for you ?

Still, if you've got GMP.pm and GMP.dll already placed in the correct
folders, then once 'libgmp-3.dll' has been placed in a folder that's in
your path, you should be able to successfully run 'perl gmppm.t' .
B).GMP for Win32 Perl
1- C:\temp\temp1\gmp_perl\gmp_perl>ppm install GMP.ppd
Note: Package 'GMP' is already installed.

Why does it think that ? Perhaps it's because you manually copied GMP.pm
into your perl installation (a coupla days back). It looks like it might
have installed properly anyway.
2- perl test.pl - windows Popup ERROR message: "Failed to start b/c
libgmp-3.dll was not found, reinstalling may fix problem"

Once again, with 'libgmp-3.dll' in place, you should be able to
succesfully run the test script.
C).Math::BigInt::GMP for Win32 Perl
1 - ppm install Math-BigInt-GMP.ppd
result:
====================
Install 'Math-BigInt-GMP' version 1.13 in ActivePerl 5.8.3.809.
====================
Error: error downloading
'file://localhost/C%7C/temp/temp1/gmp_perl/math_bigint_gmp/MSWin
32-x86-multi-thread-5.8/Math-BigInt-GMP.tar.gz': 404 File
`C:\temp\temp1\gmp_perl\math_bi
gint_gmp\MSWin32-x86-multi-thread-5.8\Math-BigInt-GMP.tar.gz' does not
exist

This is the result of an error in the '.ppd' file. I've uploaded a new
version of 'Math-BigInt-GMP-58.tar.gz' that contains a corrected '.ppd'
file. Hopefully you can now perform a succesful ppm install of this
module. (I don't think any of the other ppm packages from my website
suffer the same problem.)
2 - Copy GMP.pm to your perl/site/lib/math/bigint/ folder. - NO SUCH
FOLDER EXISTS

Create any folders (manually) that don't exist. Still - I'd prefer that
'ppm' was working for you as it's so easy to make errors when you start
manually copying (and creating folders).

I'm sort of lost with the rest - just install 'libgmp-3.dll' and see if
that provides some progress and we'll resume the struggle from there :)

Cheers,
Rob
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top