Build and install gcc on FEDORA 14 X84_64
2012-05-15 22:21
405 查看
This is a summary from the network.
1) Download gcc source code tarball gcc-4.7.0.tar.bz2 and mpfr source code tarball mpfr-3.1.0.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/ and then unpack them.
2) Enter the gcc-4.7.0 directory, create a new build dir, say "mkdir build".
3) Enter "build" dir, configure gcc as below (errors are expected, we need install mpfr and gmp first):
[root@localhost build]# ../configure --with-pkgversion=4.7.0 --prefix=/opt/gcc-4.7.0/ --program-suffix=47 --enable-threads=posix --disable-checking --enable-languages=c,c++
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
...
...
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
4) Enter unpacked mpfr dir, configure mpfr as below (error is expected, mpfr depends on gmp package installed):
[nasadmin@localhost mpfr-3.1.0]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
checking for TLS support... yes
checking for gmp.h... no
configure: error: gmp.h can't be found, or is unusable.
5) yum install "gmp-devel.x86_64"
6) Configure mpfr again, and then build, install
[nasadmin@localhost mpfr-3.1.0]$ ./configure
...
[nasadmin@localhost mpfr-3.1.0]$make
...
su to root and then make install
[root@localhost mpfr-3.1.0]$make install
7) Clean mpfr, and move the source code to gcc dir.
[nasadmin@localhost mpfr-3.1.0]# make distclean
[nasadmin@localhost work]$ mv mpfr-3.1.0 gcc-4.7.0
8) Configure gcc again.
[root@localhost build]#../configure --with-pkgversion=4.7.0 --prefix=/opt/gcc-4.7.0/ --program-suffix=47 --enable-threads=posix --disable-checking --enable-languages=c,c++
9) Compile the source code.
[root@localhost build]#make
....
In file included from ../../gcc/builtins.c:29:0:
../../gcc/realmpfr.h:27:17: fatal error: mpc.h: No such file or directory
10) [root@localhost work]# yum install libmpc-devel.x86_64
11) root@localhost build]#make
....
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat
-fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/share/doc/gmp-4.3.1/include -I/home/nasadmin/work/gcc-4.7.0/build/./mpfr -I/home/nasadmin/work/gcc-4.7.0/mpfr -I../../gcc/../libdecnumber
-I../../gcc/../libdecnumber/bid -I../libdecnumber ../../gcc/lto-compress.c -o lto-compress.o
../../gcc/lto-compress.c:28:18: fatal error: zlib.h: No such file or directory
12) [root@localhost work]# yum install zlib-devel.x86_64
13) root@localhost build]#make
14) Install new gcc.
[root@localhost build]#make install
http://www.linuxquestions.org/questions/linux-software-2/installing-gcc-4-4-2-on-fedora-8-a-780791/
http://www.mjmwired.net/resources/mjm-fedora-gcc.html
/article/8323071.html
1) Download gcc source code tarball gcc-4.7.0.tar.bz2 and mpfr source code tarball mpfr-3.1.0.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/ and then unpack them.
2) Enter the gcc-4.7.0 directory, create a new build dir, say "mkdir build".
3) Enter "build" dir, configure gcc as below (errors are expected, we need install mpfr and gmp first):
[root@localhost build]# ../configure --with-pkgversion=4.7.0 --prefix=/opt/gcc-4.7.0/ --program-suffix=47 --enable-threads=posix --disable-checking --enable-languages=c,c++
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
...
...
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.
4) Enter unpacked mpfr dir, configure mpfr as below (error is expected, mpfr depends on gmp package installed):
[nasadmin@localhost mpfr-3.1.0]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
checking for TLS support... yes
checking for gmp.h... no
configure: error: gmp.h can't be found, or is unusable.
5) yum install "gmp-devel.x86_64"
6) Configure mpfr again, and then build, install
[nasadmin@localhost mpfr-3.1.0]$ ./configure
...
[nasadmin@localhost mpfr-3.1.0]$make
...
su to root and then make install
[root@localhost mpfr-3.1.0]$make install
7) Clean mpfr, and move the source code to gcc dir.
[nasadmin@localhost mpfr-3.1.0]# make distclean
[nasadmin@localhost work]$ mv mpfr-3.1.0 gcc-4.7.0
8) Configure gcc again.
[root@localhost build]#../configure --with-pkgversion=4.7.0 --prefix=/opt/gcc-4.7.0/ --program-suffix=47 --enable-threads=posix --disable-checking --enable-languages=c,c++
9) Compile the source code.
[root@localhost build]#make
....
In file included from ../../gcc/builtins.c:29:0:
../../gcc/realmpfr.h:27:17: fatal error: mpc.h: No such file or directory
10) [root@localhost work]# yum install libmpc-devel.x86_64
11) root@localhost build]#make
....
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat
-fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/usr/share/doc/gmp-4.3.1/include -I/home/nasadmin/work/gcc-4.7.0/build/./mpfr -I/home/nasadmin/work/gcc-4.7.0/mpfr -I../../gcc/../libdecnumber
-I../../gcc/../libdecnumber/bid -I../libdecnumber ../../gcc/lto-compress.c -o lto-compress.o
../../gcc/lto-compress.c:28:18: fatal error: zlib.h: No such file or directory
12) [root@localhost work]# yum install zlib-devel.x86_64
13) root@localhost build]#make
14) Install new gcc.
[root@localhost build]#make install
http://www.linuxquestions.org/questions/linux-software-2/installing-gcc-4-4-2-on-fedora-8-a-780791/
http://www.mjmwired.net/resources/mjm-fedora-gcc.html
/article/8323071.html
相关文章推荐
- install win7-64 and fedora64-24 on hp540 successful
- Install and test nginx on Ubuntu 14.04
- howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL).
- How to Install WineHQ 1.5.27 on Fedora, CentOS and RHEL Linux Distributions
- Install and configure a ready for use subversion based on fedora
- MonoDevelop 1.0 on CentOS 5 and Fedora: Compiling and Install
- How to build and install Open vSwitch on a linux
- How to build and install Open vSwitch on a linux
- Install Apache OpenOffice 3.4.1 on RHEL/CentOS 6.3/5.8 and Fedora 17/16
- Install Server Backup Manager on CentOS, RHE, and Fedora
- Installing Ruby and Railswith RVM on Fedora 14
- Build and Install cx_Oracle on Mac Leopard Intel
- Install And Configure Open VSwitch On CentOS RHEL Fedora
- How to install and use GCC g++ v4.7 and C++11 on Ubuntu 12.04
- 在64位系统下安装32位ODBC驱动问题How to install and configure a 32 bit ODBC driver on a 64 bit Operating System?
- How to install VirtualBox on Fedora 17 (64 bit)
- How to install older version gcc on fedora
- Instant Run performed a full build and install since the installation on the device does not match t
- Install ImageMagick (Image Manipulation) Tool on RHEL/CentOS and Fedora 【转】
- How to Install PostgreSQL 9.5 on CentOS/RHEL 7/6/5 and Fedora 23/22