GCC configure: Error: Building GCC requires GMP 4.2 +, mpfr 2.3.1 + and MCM 0.8.0

Source: Internet
Author: User
Tags gmp
Slave SVN checkout SVN: // gcc.gnu.org/svn/gcc/trunkget the latest gcccode, computation and compilation of the things about learning c++ 11, and the following problems occur during configure:
  Building GCC requires GMP 4.2 +, mpfr 2.3.1 + and MCM 0.8.0 +
   
Http://www.multiprecision.org/mpc download mpc-0.9.tar.gz          
    Bytes
    Http://ftp.gnu.org/gnu/mpfr/download mpfr-3.1.0.tar.xz.
        Install GMP first. Decompress the GMP compressed package, get the source code folder gmp-5.0.1. Create a temporary compilation folder under the folder of the same level in this folder, named temp here. Start to configure the installation options, enter the temp folder, and enter the following command for Configuration:

../Gmp-5.0.1/configure -- prefix =/usr/local/gmp-5.0.1

    Make

    Sudo make install

    The installation methods of mpfr and nmpc are similar to those of GMP. Note that the dependency options of GMP and mpfr should be added during configuration. The detailed configuration command is as follows:

../Mpfr-3.1.0/configure -- prefix =/usr/local/mpfr-3.1.0 -- With-GMP =/usr/local/gmp-5.0.1

../Mpc-0.9/configure -- prefix =/usr/local/mpc-0.9 -- With-GMP =/usr/local/gmp-5.0.1 -- With-mpfr =/usr/local/mpfr-3.1.0

After these three libraries are installed, you can start to install GCC. 

    Of course, the three libraries that have just been compiled are required during the link.

    Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/mpc-0.9/lib:/usr/local/gmp-5.0.1/lib:/usr/local/mpfr-3.1.0/lib

    Then the typical configure, make, and install three steps.

    .. /Gcc-4.7.2/configure -- prefix =/usr/local/gcc-4.7 -- enable-threads = POSIX -- disable-checking -- disable-multilib -- enable-versions ages = C, c ++ -- With-GMP =/usr/local/gmp-5.0.1 -- With-mpfr =/usr/local/mpfr-3.1.0 -- With-MPC =/usr/local/mpc-0.9

     Make

     Make check (optional)

     Sudo make install

    After a long wait:

 /Usr/local/gcc-4.7/bin/g + +-V
Use built-in specs.
Collect_gcc =/usr/local/gcc-4.7/bin/g ++
Collect_lto_wrapper =/usr/local/gcc-4.7/libexec/GCC/x86_64-unknown-linux-gnu/4.7.0/Lto-wrapper
Goals: x86_64-unknown-linux-gnu
Configuration :.. /gcc-4.7.2/configure -- prefix =/usr/local/gcc-4.7 -- enable-threads = POSIX -- disable-checking -- disable-multilib -- enable-versions ages = C, c ++ -- With-GMP =/usr/local/gmp-5.0.1 -- With-mpfr =/usr/local/mpfr-3.1.0 -- With-MPC =/usr/local/mpc-0.9
Thread model: POSIX
GCC version 4.7.0 20120113 (experimental) (GCC)


Start c ++ 11.

GCC configure: Error: Building GCC requires GMP 4.2 +, mpfr 2.3.1 + and MCM 0.8.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.