Monday, August 17, 2015

Building GCC requires GMP 4.2+, MPFR 2.4+ and MPC 0.8.0+

This article addresses how to build the latest version of these three libraries(GMP, MPFR, and MPC)
at the time, they are GMP6.1.0, MPFR3.1.3, and MPC1.0.3

GMP: https://gmplib.org/
MPFR: http://www.mpfr.org/mpfr-current/#download
MPC: http://www.multiprecision.org/index.php?prog=mpc&page=download

Note: build these libraries in the above order, which means GMP > MPFR > MPC.

1.GMP
GMP has a dependency on M4, we should install this dependency library first:
sudo apt-get install M4
GMP also need to install texinfo otherwise it will pop a error message(saying you are missing makeinfo)
sudo apt-get install texinfo
2. MPFR has a dependency on aclocal
sudo apt-get install autotools-dev automake
All pre-work should have been done, now we can do ./configure and make && make install.

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH


1 comment:

  1. Thank you!

    One thing to add only, the command

    make && make install

    was giving me "permission denied" even with sudo, so I had to run

    sudo make
    sudo make install

    ReplyDelete