| 1 |
Math::GMP - High speed arbitrary size integer math |
| 2 |
|
| 3 |
To install this package, you will need a version of the GMP library. You |
| 4 |
have different alternatives: |
| 5 |
|
| 6 |
- get it at the homepage of GMP: |
| 7 |
|
| 8 |
http://www.gmplib.org/ |
| 9 |
|
| 10 |
- install a pre-compiled package provided by your distribution |
| 11 |
|
| 12 |
- let Math::GMP download and install GMP for you (thanks to Alien::GMP) |
| 13 |
|
| 14 |
After installing GMP (if you want to do it yourself), do the following: |
| 15 |
|
| 16 |
perl Makefile.PL |
| 17 |
make |
| 18 |
make test |
| 19 |
|
| 20 |
When all tests pass, install it (as root) with the following command: |
| 21 |
|
| 22 |
make install |
| 23 |
|
| 24 |
Enjoy! |
| 25 |
|
| 26 |
If you have problems, please check the platform-specific notes below. |
| 27 |
|
| 28 |
|
| 29 |
** Notes for AIX ** |
| 30 |
|
| 31 |
[email protected] notes on bug #11736 about installing on AIX 5.2: |
| 32 |
|
| 33 |
First, I had to modify the Makefile.PL so that it could see the gmp libraries by adding "-L/usr/local/lib" as below: |
| 34 |
|
| 35 |
'LIBS' => ['-L/usr/local/lib -lgmp'], # e.g., '-lm' |
| 36 |
|
| 37 |
Then, I had to change the following line in GMP.c and GMP.xs from: |
| 38 |
|
| 39 |
#include "gmp.h" |
| 40 |
to: |
| 41 |
#include </usr/local/include/gmp.h> |
| 42 |
|
| 43 |
Reinstalled gmp-4.1.4 with: |
| 44 |
|
| 45 |
./configure ABI=32 --disable-static |
| 46 |
|
| 47 |
|
| 48 |
** Notes for Mac OS X ** |
| 49 |
|
| 50 |
Rob writes on bug #19262: |
| 51 |
|
| 52 |
Error: |
| 53 |
/usr/bin/ld: /usr/local/lib/libgmp.a(mode1o.o) has local relocation entries in non-writable section (__TEXT,__text) |
| 54 |
|
| 55 |
Solution: |
| 56 |
Edit the Makefile, adding the following to LDDLFLAGS: |
| 57 |
-read_only_relocs suppress |
| 58 |
|