Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-28-2005, 11:22 PM   #1
Registered: May 2005
Posts: 47

Rep: Reputation: 15
downgrade of GCC version


i need to downgrade the GCC version from 3.2 to v.2.95. Then i download the gcc v.2.95.3 from GCC homepage.

after i run...
$make install

i check the version of the GCC, it still is the version 3.2.

[root@H733-00011 gcc-2.95.3]# gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

How could i confirm the installation has been completed? And how could i know that the gcc compiler is using v.2.95.3 but not v.3.2?

thx for help
Old 06-29-2005, 12:22 AM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
If you didn't set the --prefix argument to ./configure, the new gcc got installed in /usr/local/bin instead of /usr/bin. Try /usr/local/bin/gcc --version. If that's the case, you can either put /usr/local/bin ahead of /usr/bin in your PATH or set the CC environment variable to point to /usr/local/bin/gcc.

BTW there's nothing wrong with having two versions of gcc on your system, and it may be a bad idea to ditch your system's default C compiler.
Old 06-29-2005, 12:39 AM   #3
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
Unless you have a very good reason, I would avoid installing gcc 2.95. It's been deprecated for a while now, hell gcc 4 was released in April.
Old 06-29-2005, 01:27 AM   #4
Registered: May 2005
Posts: 47

Original Poster
Rep: Reputation: 15
thx for ur suggestion.

In fact, i don't want to use gcc v.2.95, but it is required by Oracle Client 9i OCCI. I can't use others version to conn the Oracle via OCCI. The only solution provided by the oracle forum is using gcc v.2.95.....s
Old 06-29-2005, 01:30 AM   #5
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
Well if your'e running Oracle, you're probably running it on a supported OS like RH AS, right? Well there are gcc compat packages on the CDs that should do what you want.
Old 06-29-2005, 01:30 AM   #6
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
it's not quite that easy to compile gcc 2.95
but first it's good you jusy did ./configure
that put the new gcc in /usr/local
and left your system compiler in /usr
you really don't want to overwrite your system compiler and you didn't bravo
now when you want to use gcc 2.95.3 you do
export PATH=/usr/local/gcc-2.95.3/bin:$PATH
export CC=/usr/local/gcc-2.95.3/bin/gcc
and your system will use it
next time you install another compiler remember to do ./configure --prefix=/opt/gcc-x.xx.x
or you overwrite your second one gcc 2.95 in /usr/local

OK back to compiling gcc-2.95.3
i think you should run that compile and install again so everything is ok just overtop of what you did
you are compiling one compiler with another version compiler so there needs to be some extra passes
so the 2.95 is all 2.95 and not just half 2.95 with code from the other compiler in it so after we get it going we ask it to compile itself "bootstrap" twice more and check itself against itself. Also i give you some other configuration options so you get threading and whatnot. (always check ./configure ---help especially if you have some special needs like languages or whatever) i only do for c and c++ which is all i use
there are some common patches to use in doing this and i think for your situation 3.2.1 to 2.95.3
i would use (i really think i have this right for your compiler version just do a fresh untar and start over if this compile fails because of these patches) i don't think the build will work at all without the first one. so go here
and get
the first one fixes some symbol problems and the second keeps it from trying to rearange glibc headers for itself in it's private directory
now on to the build
from within the gcc directory after you untar it and with the patches in the directory above
patch -Np1 -i ../gcc-2.95.3-1.patch 
patch -Np1 -i ../gcc-2.95.3-no-fixinc.patch
mkdir ../gcc-build 
cd ../gcc-build
now for the configure -- this is all one command
../gcc-2.95.3/configure \
--enable-shared --enable-languages=c,c++ \
now to build and it will take some time
if this fails try
"make bootstrap4" to give it yet another pass (i think -- it's been along time since i had to do that)
make bootstrap
now as root from here on out
make install
ln -sf gcc /usr/local/bin/cc
make sure /usr/local/lib is in
and run
as root
and one last thing to make some symlinks
run this to identify the lib name (all one command)
L=`find /usr/local/lib -name "*libstdc++*.so" -type f` &&
IL=`basename $L`
now make some links so the libs will run some precompiled packages
ln -sf $IL /usr/local/lib/ 
ln -sf $IL /usr/local/lib/ 
ln -sf $IL /usr/local/lib/
all done
Old 06-29-2005, 01:46 AM   #7
Registered: May 2005
Posts: 47

Original Poster
Rep: Reputation: 15
thx for foo_bar_foo detail replay!!!

now i will try ur method to do it, but unluck, the link of the patch has broken.....

about the Noth suggestion, i m using RedHat 9.2 , in my part, i only need to do the client programming part. No database server should be installed.s
Old 06-29-2005, 02:10 AM   #8
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
drag -- possibly that patch below it
is the older ones replacement is why they took the first one down
i'd try that
it's from 2003-10-05
so it certainly seems to be from the right period or close

i can't find the older one anywhere either -- seems like if was still usefull they would leave it up ?


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
how can I downgrade Perl version on redhat 9.0 ? rainvory Linux - Software 8 05-02-2017 11:09 PM
DOWNgrade gcc. How? KDel Linux - Software 25 10-29-2009 02:53 AM
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 03:54 PM
gcc downgrade: help required ludwig W Linux - Software 12 03-31-2003 03:09 AM
any recomendations to downgrade GCC 2.96 to 2.95? Hano Linux - Distributions 2 06-09-2002 03:11 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:02 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