LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 05-22-2004, 01:31 PM   #1
KDel
LQ Newbie
 
Registered: Apr 2004
Distribution: Suse 8.1
Posts: 11

Rep: Reputation: 0
DOWNgrade gcc. How?


I need to downgrade my gcc from 3.2(i think) to a 2.9xx version. Is 2.95-3 a good one?
How shall i do this?
I'm new to linux and i dont even know how to build gcc.
So some detailed instructions will be highly appreciated
 
Old 05-22-2004, 01:45 PM   #2
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Rep: Reputation: 30
why?

i would try just installing the new version over the old one, but when i had tried to upgrade gcc it didnt work.

to follow the standard install procedure, download the source to say /usr/src, then type:
Code:
cd /usr/src
tar -zxf gccsourcename.tar.gz
OR
tar -jxf gccsourcename.tar.bz2
cd gccsourcefoldername
./configure --prefix=/usr/local
make bootstrap
make install
 
Old 05-22-2004, 03:41 PM   #3
KDel
LQ Newbie
 
Registered: Apr 2004
Distribution: Suse 8.1
Posts: 11

Original Poster
Rep: Reputation: 0
thanx.
a more detailed answer someone?
 
Old 05-22-2004, 03:53 PM   #4
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
Quote:
Originally posted by drigz
why?

i would try just installing the new version over the old one, but when i had tried to upgrade gcc it didnt work.

to follow the standard install procedure, download the source to say /usr/src, then type:
Code:
cd /usr/src
tar -zxf gccsourcename.tar.gz
OR
tar -jxf gccsourcename.tar.bz2
cd gccsourcefoldername
./configure --prefix=/usr/local
make bootstrap
make install
drigz please provide some more deatil to this. i am tring to install gcc from source on a RH9 system. yes i can put in the CD, but id like to learn how to install from source as RH is no longer supporting RH9, and i dont want to move to Fedora.

what is the /usr/src dir? is that the user source? also please see this thread for what i have done, and were i am on the install of the gcc most recient source code install.

how do i know what to name the srcdir and where do i put the objdir, and could you explain a bit more in detail as to what those are, how best to name them, etc...

thank you for all the help. this should also help the original poster with his questions.

or please e-mail answere directions to xindal@yahoo.com

Last edited by Lleb_KCir; 05-22-2004 at 03:58 PM.
 
Old 05-22-2004, 04:09 PM   #5
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Rep: Reputation: 30
im sorry, thats all i know about it. i would have given more detail if i could.
 
Old 05-22-2004, 04:12 PM   #6
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
Quote:
Originally posted by drigz
im sorry, thats all i know about it. i would have given more detail if i could.
tis ok, if we could get one of the linux masters around here to point us in the right direction, that would be a godsend for me at least, and im guessing for the OP too.
 
Old 05-22-2004, 04:18 PM   #7
KDel
LQ Newbie
 
Registered: Apr 2004
Distribution: Suse 8.1
Posts: 11

Original Poster
Rep: Reputation: 0
hm ok,lets redifine my problem. I need to compile gcc 2.95. I have gcc 3.2 i think installed from the cd.
How do i compile the gcc? I've read some posts here and the instructions at the gcc site,but i dont understand anything!
If someone could give me some simple instructions or a site that has some,it would be really cool
thanx
 
Old 05-22-2004, 04:21 PM   #8
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
mind if i ask why you are dropping down to 2.95 from the 3.2 line? i have not installed yet, but if there are issues with the 3.2 line id like to know.
 
Old 05-22-2004, 04:30 PM   #9
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I would advise you not to put gcc-2.95 in /usr/local as /usr/local/bin is probably in your $PATH so you will have two versions of gcc in your $PATH, one in /usr/bin and one in /usr/local/bin. This may cause problems. I would suggest that you install it somewhere out of the way, such as /opt/gcc-2.95. That way there is less chance of confusion. When you need to use it you can temporarily set the variable
export CC=/opt/gcc-2.95/bin/gcc
Install gcc-2.95 in /opt by doing
Code:
tar xzf gcc-2.95.3.tar.gz &&
mkdir gcc-build &&
cd gcc-build &&
../gcc-2.95.3/configure --prefix=/opt/gcc-2.95 --enable-languages=c,c++ &&
make bootstrap &&
make install
 
Old 05-22-2004, 04:43 PM   #10
KDel
LQ Newbie
 
Registered: Apr 2004
Distribution: Suse 8.1
Posts: 11

Original Poster
Rep: Reputation: 0
yes the code is the similar to drigz's. I used his and looks like it's installed ok. I've installed it in a different dir than usr/local. The problem is that there is no bin dir in the dir i've installed gcc!!!However it looks like its installed ok...


I suppose i have to do the variable thing everytime that i have to use the 2.95 compiler. And thats ok because i only want to compile a program or two with that version.And thats the answer to Lleb's question. My problem is compatibility with an old program.
If i had problems with 3.2 i would try to upgrade,not downgrade

Last edited by KDel; 05-22-2004 at 04:51 PM.
 
Old 05-22-2004, 06:22 PM   #11
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
Quote:
Originally posted by Andrew Benton
I would advise you not to put gcc-2.95 in /usr/local as /usr/local/bin is probably in your $PATH so you will have two versions of gcc in your $PATH, one in /usr/bin and one in /usr/local/bin. This may cause problems. I would suggest that you install it somewhere out of the way, such as /opt/gcc-2.95. That way there is less chance of confusion. When you need to use it you can temporarily set the variable
export CC=/opt/gcc-2.95/bin/gcc
Install gcc-2.95 in /opt by doing
Code:
tar xzf gcc-2.95.3.tar.gz &&
mkdir gcc-build &&
cd gcc-build &&
../gcc-2.95.3/configure --prefix=/opt/gcc-2.95 --enable-languages=c,c++ &&
make bootstrap &&
make install
what is the && and what does it do?

had a great responce on my thread about installing from source, and i still dont get it 100% yet, but getting closer.

you guys are great. thanks so much for all the help.
 
Old 05-23-2004, 06:53 AM   #12
drigz
Member
 
Registered: Apr 2004
Distribution: Gentoo ~x86
Posts: 407

Rep: Reputation: 30
first command && second command

will execute the first comand and then the second. it saves time so you can just go and do something else, and when the first command (say make) is complete, second command (say make install) will start.
 
Old 05-23-2004, 07:33 AM   #13
grcunningham
Member
 
Registered: Apr 2004
Location: Florida
Distribution: RedHat 9.0/Afterstep
Posts: 103

Rep: Reputation: 15
as far as learning how to install from source, i would
reccommend that rather than a compiler or kernel
install, you might want to download some small games or
something to practice on. after you untar and unzip them
the files INSTALL and README in the source directory
will tell you what to do
 
Old 05-23-2004, 07:36 AM   #14
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
Put your distro in your profile, please.
 
Old 05-25-2004, 03:54 AM   #15
ayie
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
Code:
Configuring for a i686-pc-linux-gnuoldld host.
*** This configuration is not supported in the following subdirectories:
     target-libf2c target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar target-libobjc
    (Any other directories should still work fine.)
Created "Makefile" in /root/gcc-build using "mt-frag"
../gcc-3.3.3/configure: line 8: cc: command not found
*** The command 'cc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
i got FEDORA, i try to install gcc through ssh..... but cannot .... pls help me.
 
  


Reply


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
downgrade of GCC version nelnel Linux - Software 7 06-29-2005 01:10 AM
how to downgrade from 9.2 to 9.1 netsurf Suse/Novell 10 04-10-2005 12:44 PM
downgrade glibc subash Linux - General 8 08-14-2003 12:13 AM
gcc downgrade: help required ludwig W Linux - Software 12 03-31-2003 02:09 AM
any recomendations to downgrade GCC 2.96 to 2.95? Hano Linux - Distributions 2 06-09-2002 02:11 PM


All times are GMT -5. The time now is 02:44 AM.

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