I am trying to install gmp2 as explained in https://code.google.com/p/gmpy/wiki/InstallingGmpy2 under ubuntu 12.04 LTS.
Therefore I need to compile GMP, MPFR, and MPC.
To compile GMP, according to above instructions, I need:
$ cd ~/src/gmp-5.1.0
$ ./configure --prefix=/home/case/local
$ make
$ make check
$ make install
The ./configure step worked fine, although I had to prefix the command with /bin/bash.
When I invoke the make command, I run into this error involving libtool:
/bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_
echo fib_table | sed 's/_$//'
-m32 -O2 -pedantic -fomit-frame-pointer -mtune=core2 -march=core2 -c -o fib_table.lo fib_table.c
../libtool: 1581: ../libtool: preserve_args+= --tag CC: not found
../libtool: 1: eval: base_compile+= gcc: not found
../libtool: 1: eval: base_compile+= -std=gnu99: not found
../libtool: 1: eval: base_compile+= -DHAVE_CONFIG_H: not found
../libtool: 1: eval: base_compile+= -I.: not found
../libtool: 1: eval: base_compile+= -I..: not found
../libtool: 1: eval: base_compile+= -D__GMP_WITHIN_GMP: not found
../libtool: 1: eval: base_compile+= -I..: not found
../libtool: 1: eval: base_compile+= -DOPERATION_fib_table: not found
../libtool: 1: eval: base_compile+= -m32: not found
../libtool: 1: eval: base_compile+= -O2: not found
../libtool: 1: eval: base_compile+= -pedantic: not found
../libtool: 1: eval: base_compile+= -fomit-frame-pointer: not found
../libtool: 1: eval: base_compile+= -mtune=core2: not found
../libtool: 1: eval: base_compile+= -march=core2: not found
../libtool: 1: eval: base_compile+= -c: not found
libtool: compile: you must specify a compilation command
libtool: compile: Try 'libtool --help --mode=compile' for more information. make[2]: *** [fib_table.lo] Error 1
make[2]: Leaving directory '/home/nicolas/Dropbox/crypto/gcc-lib/gmp-5.1.3/mpn'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/nicolas/Dropbox/crypto/gcc-lib/gmp-5.1.3'
make: *** [all] Error 2
I suspect that the libtool call prefixed by /bin/sh is wrong but I can not figure how to change it:
- In the MakeFile, I changed SHELL=/bin/sh to SHELL=/bin/bash: no difference
- When I "printenv SHELL", I get /bin/bash
Any idea how to complete compiling GMP?
sudo apt-get install libmpc-dev
? – Marc Glisse