Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Red Hat Enterprise Linux Server 6.5 installation GCC 4.9.2     - Oracle procedure or function Empty Table (Database)

- 22 Port weak passwords and SSH connection program of the Linux server (Linux)

- MySQL query performance comparison of a single truth (Database)

- Detailed Linux platform chip programming process (Programming)

- Ubuntu compiler installation R Full Record (Linux)

- Nginx start, stop, smooth start, smooth upgrade (Server)

- Build Golang development environment configuration on Ubuntu 14.04 (Linux)

- Python format string (Programming)

- Chkconfig set boot start under Linux (Linux)

- Linux iostat command example explanation (Linux)

- How to install Git client in Ubuntu (Linux)

- MySQL Basic tutorial: About varchar (N) (Database)

- How to create a remote (Linux)

- Spring multi data source configuration (Programming)

- Tab set to four spaces in Vim (Linux)

- Spark read more HBase tables a RDD (Server)

- JavaScript common array manipulation functions and usage (Programming)

- CentOS 6.6 installation certification system based on the ftp service (Server)

- Linux operating system Start Tutorial: Xmanager Remote Access Linux graphical interface (Linux)

- How to run Docker client in Windows operating system (Linux)

  Red Hat Enterprise Linux Server 6.5 installation GCC 4.9.2
  Add Date : 2018-11-21      
  Now many programmers use GCC, how can we better use GCC. At present, GCC can be used to compile C / C ++, FORTRAN, JAVA, OBJC, ADA and other language programs, you can choose to install the supported languages as required. In this paper, the RedHat Linux installation GCC4.9.2 Case (due to the requirements for use in the project development process, not with the latest version of GCC), introduced Linux GCC installation process.

Prior to installation, the system must have a cc or gcc compiler, etc., and is available, or specify the compiler on the system environment variable CC. If there is no compiler on your system, you can not install the source code form of GCC 4.9.2. If this is the case, you can find a compatible system such as RPM and other binary format GCC packages to install and use on the Internet. This article describes the installation process is based on GCC package source code form, the package itself and the installation process is equally applicable to other Linux and Unix systems.

The original system may be the GCC compiler gcc commands, libraries, header files, and so on to the system are stored in different directories. In contrast, we now recommend a GCC version of GCC installed in a separate directory. This has the advantage that it does not need to be in the future when you can easily remove an entire directory can (GCC because no uninstall feature); drawback is that the installation is complete to do some setup work to make the compiler to work properly. In this paper the use of this program to install GCC 4.9.2, and after the installation is complete, still be able to use the original version of the low GCC compiler, it can exist simultaneously and use multiple versions of GCC compiler on a system that is.

Follow the steps and setting options provided herein, even if not previously installed GCC, can also be installed on a working version of the new GCC compiler on your system.

1 Download

On the GCC website (http://gcc.gnu.org) or through an online search you can find the download resources. The latest version of GCC 4.9.2. Files available for download are generally two forms: gcc-4.9.2.tar.gz and gcc-4.9.2.tar.bz2, but compression format is not the same, exactly the same content, you can download one.

RHLinux installed gcc-4.9.2 is relatively simple, but some aspects of the installation process is the need to pay attention, otherwise, may lead to an unsuccessful installation, or installation error. Specific installation process is as follows:

First, download and unzip the gcc RPM packages to the source directory (eg /opt/gcc-4.0.1)

1. Extract the RPM package:

[Root @ linuxhost] # tar xjvf gcc-4.0.1.tar.bz2 (generating source directory after decompression /opt/gcc-4.0.1)

2. Create an installation target directory:

[Root @ linux opt] # mkdir /usr/local/gcc-4.0.1/

3, enter the installation destination directory:

[Root @ linux opt] # cd /usr/local/gcc-4.0.1/ (This step is very important, when you configure the installation files, you need to perform configure command in the target directory)

[Root @ linux opt] # pwd


4, the installation configuration file:

[Root @ linux gcc-4.0.1] # /opt/gcc-4.0.1/configure --prefix = / usr / local / gcc-4.0.1 / (This step is very important and needs in the target directory for the installation, /opt/gcc-4.0.1/ source directory execute the configure command to configure the target directory to install gcc /usr/local/gcc-4.0.1/)

creating cache ./config.cache

checking host system type ... i686-pc-linux-gnu

5, compile and install the file:

[Root @ linux gcc-4.0.1] # pwd


[Root @ linux gcc-4.0.1] # make (compile in the target directory)

6, installed gcc:

[Root @ linux gcc-4.0.1] # pwd


[Root @ linux gcc-4.0.1] # make install (installation in the target directory)

If the installation steps and commands no errors, you can certainly install successfully.

From svn checkout svn: //gcc.gnu.org/svn/gcc/trunk GCC took the latest code, and intend to compile a study to learn what things to learn C ++ 11, resulting in the following problem configure the time:
    Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
1. Download mpc-0.9.tar.gz from http://www.multiprecision.org/index.php?prog=mpc&page=download
2, ftp: //ftp.gnu.org/gnu/gmp/gmp-5.0.1.tar.bz2 Download gmp-5.0.1.tar.bz2
3, http: //ftp.gnu.org/gnu/mpfr/ download mpfr-3.1.0.tar.xz.
    To start the installation GMP. After extracting archive GMP to obtain the source code directory gmp-5.0.1. The establishment of a temporary build directory at the same level of that directory, here named temp. Then start to configure the installation option, enter the temp directory, enter the following command to configure:

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


    sudo make install

    mpfr and installation methods mpc similar to gmp. But pay attention to configure dependencies when put gmp and mpfr options added, the specific configuration commands are 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 installing these three libraries, you can officially start the install gcc.

    Of course, the link, just need to compile three lib.

    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, install trilogy.

    ../trunk/configure --prefix = / usr / local / gcc-4.7 --enable-threads = posix --disable-checking --disable-multilib --enable-languages = 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 check (optional)

      sudo make install

    After a long wait:

 /usr/local/gcc-4.7/bin/g++ -v
Use the 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
Target: x86_64-unknown-linux-gnu
Configured to: ../ trunk / configure --prefix = / usr / local / gcc-4.7 --enable-threads = posix --disable-checking --disable-multilib --enable-languages = 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 learning the C ++ 11.
- Revised OpenJDK Java Memory Model (Programming)
- Use DB2 federated access Oracle (Database)
- Use Docker containers (Linux)
- SSH port forwarding application (Server)
- The principle Httpclient4.4 (HttpClient Interface) (Programming)
- SSH without password (Linux)
- A detailed introduction to the Hadoop ecosystem (Server)
- Why do you need close contact Rust 1.0 (Programming)
- Use rfkill soft-switching and Bluetooth wireless capabilities in Linux (Linux)
- Install Oracle database error process of [INS-35172] (Database)
- Https (SSL / TLS) Detailed principles (Server)
- To configure Samba to share files with Windows under CentOS (Linux)
- Java implementation file encryption and decryption (Programming)
- Installation Elementary OS Freya to do some settings (Linux)
- Linux iptables firewall settings whitelist (RHEL 6 and CentOS 7) (Linux)
- Construction Spark source and application development environment (Server)
- Ubuntu Linux use MAC binding against ARP attacks (Linux)
- Fedora 22 install Adobe Flash Player (Linux)
- rsync + inotify to achieve real-time synchronization (Server)
- Gitblit adopted Ticket collaborative development model (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.