Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-22-2008, 07:47 PM   #1
LQ Newbie
Registered: Dec 2008
Posts: 8

Rep: Reputation: 0
yum install gcc doesn't set the lastest gcc ver 4.3.x

I'm using CentOS release 4.5 (Final), from /etc/redhat-release.

I need gcc 4.3.x, so firstly I downloaded it and did ./configure
but there were errors.
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 whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code 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 and/or MPFR 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.
Then, I just alternativly tried to 'yum install gcc', and that went well.
However, the result was not gcc 4.3.x but 3.4.6.
]# gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)
yum update gcc also did not work now, looks like that my current version
is consigered as the lastest.
What should I do?

Last edited by kim,jw; 12-22-2008 at 07:51 PM.
Old 12-22-2008, 09:23 PM   #2
Senior Member
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Ok, with most major packages RHEL/Centos will not do an upgrade across a major revision. So they will not upgrade from gcc 3.4 to gcc 4.x or phpX to phpX+1. With Gcc there is an additional problem (vs other packages) in that the entire system is built using a specific version of GCC. If you replace Gcc 3.4 with GCC 4.X you will break your entire install. You can however add(vs replacing) an additional GCC version to the system, but anything you compile with that new version of GCC to run on that machine will have to be compiled completely statically, because if you do not you will run into unresolvable dependency issues. I believe(not sure) even RHEL/Centos5 is still running 4.1. Why do you specifically need 4.3?
Old 12-22-2008, 11:29 PM   #3
LQ Newbie
Registered: Dec 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks a lot indeed.
The reason that I want to set up gcc 4.3.x is to apply a tool in my system,
of a new version which requires gcc 4.3.x, but if by that background using
the recent version at CentOS is not recommandable, then I would just use
the tool of old version.
Actually I do not what 'statical compile' means, but I feel like that if the
tool is not a MUST-USE item, it is reasonable not to use that, and I should be
just going to go with the old version.

Then, however, if I would meet the situation where I unavoidably need gcc 4.3.x or higher,
then I should use 'statical compile'. At least unless the policy or condition regarding
CentOS were changed.

In addition, is it possible to upgrade from CentOS 4.5 to higher version freely?
Otherwise I should purchase a package and install it entirely again onto the system?
Old 12-23-2008, 12:51 AM   #4
Senior Member
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Centos is always free to download/update. The jump from 4.x to 4.x+1 occurs when you do a full yum update. When you do a full X.Y to X+1.Y they still advise doing a clean install. Having cleaned up a number of people's messes that tried to jump major revision (4.7to 5.0) via yum, I would strongly suggest doing a clean install. In the long run a clean install will save you time. To be clear, I am fairly certain that even the most current RHEL/Centos(5.3 should be out in early January) is still only using gcc 4.1. Here is the site to find a mirror to download Centos 5.X:



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
yum install for gcc-c++ doesn't work aagha Fedora 6 10-14-2010 09:46 AM
Assitance with yum install gcc-c++ rjs225 Linux - Newbie 13 08-12-2010 12:58 PM
yum install gcc... nilrisi Linux - Newbie 4 07-27-2008 09:21 PM
yum install gcc problem malibuguy Linux - Newbie 1 01-15-2005 06:11 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 03:13 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration