Installing GCC reduced version GCC 4.4.6 under Linux

is recorded as follows:

1. Download the appropriate version of GCC from the official website, http://gcc.gnu.org.

2. Unpack the

# sudo tar ZXFV GCC – 4.4.6. Tar. Gz

3. Go to the unzip directory, mine is ~/local/gcc-4.4.6, and I have an executable called configure, with the following configuration:

#./configure — prefix =/usr/bin/GCC – 4.4.6 – enable – language = c, c + +, Java

(where /usr/bin/gcc-4.4.6 is the directory to install GCC, followed by –enable-language=c,c++, Java is set to install compilable language)

Notice that the configure success sign shows that the makefile was successfully generated and that you’ll have an additional makefile in your directory so you can proceed to the next


error: said GMP and MPFR

cannot be found

to download and install dependencies:
ftp://gcc.gnu.org/pub/gcc/infrastructure

GMP – 4.3.2. Tar..bz2

MPFR – 2.4.2. Tar..bz2

unzip installation dependency:

tar -jxvf gmp-4.3.2.tar.bz2

mkdir /usr/local/gmp-4.3.2

cd ./gmp-4.3.2

./configure --prefix=/usr/local/gmp-4.3.2

make

make install



tar -jxvf mpfr-2.4.2.tar.bz2

mkdir /usr/local/mpfr-2.4.2

cd ./mpfr-2.4.2

./configure --prefix=/usr/local/mpfr-2.4.2 --with-gmp=/usr/local/gmp-4.3.2

make

make install

error: m4

cannot be found
Install GMP under ubuntu

. Configure :error:no usable m4 in$path or /user/5bin solution

is easy, because you don’t have m4, just install it.

sudo apt-get install m4

4.#make

this is the longest step, so long that I couldn’t wait to go back to sleep last night…

note: error may also occur in make. Generally, it is also necessary to configure the environment or missing files. It is OK to install whatever is needed directly

5. # make install

6. After the end, establish the connection of gcc4.4.6 version, command:

# ln -s/usr/bin/GCC – 4.4.6/bin/GCC/usr/bin/GCC
Check out the current version of GCC:

#gcc –version

Read More: