LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-14-2005, 03:56 AM   #1
winterhunter
Member
 
Registered: Oct 2005
Distribution: Ubuntu Edgy
Posts: 58

Rep: Reputation: 15
Updating GCC


Hi,

I've just downloaded the latest stable version of GCC, and have some questions:

Do I have to recompile the libraries if I install it over the old version?

If I install it in a different directory, how do I "choose" which version of gcc should make use afterwards?

Thanks!
 
Old 10-14-2005, 10:04 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Since you are using SuSE, you should have d/l'd an rpm of the gcc package. Upgrading SuSE would then be as easy as "rpm -U <packagename>" to upgrade an already installed package. But, since you chose instead to compile a source package, there is no way to upgrade the already installed package. You will end up with parallel installations of gcc. Figuring out how to tell other packages how to use the new gcc give me a headache just thinking about it.

If you insist on using source packages in SuSE, at least, get the .src.rpm (source rpm) and build an installable binary rpm for SuSE from that.

If you must do it the hard way, with tarballs, please consider using stow or encap to ease the process. Both will create a directory in /usr, into which each will install source packages, each in it's own sub-directory. When you want to upgrade a source package using either of those applications, each will check the already installed package under its control, and upgrade to the new source package.

Note: each will only work for its own sub-directories, and not for sub-directories created by the other!
 
Old 10-14-2005, 11:33 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
i think it's not a good idea to overwrite your gcc

gcc is often not reverse compatable

i say install the new one in --prefix=/opt/gcc-x.x.x so it does not interfear
then either use PATH variable (put the path to the one you want to use first)
or set the variable CC to the version you want to use.

remenber when you compile gcc with an older version you have to use
make bootstrap
so it can go back and compile itself a few times and weed out the code from the old version
 
  


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
Trouble with updating in FC3 and setting up GCC habanerosky Linux - Newbie 3 02-27-2005 07:47 PM
updating gcc - am I specifying correct directories mullera Linux - Software 0 01-13-2005 10:07 AM
Are there any issues on updating gcc (-> 3.3.3) hp_tux Slackware 16 03-25-2004 11:36 PM
updating gcc boku Programming 6 09-01-2002 05:45 AM
Updating gcc 2.96 Doalwa Linux - Newbie 4 08-10-2002 04:35 PM


All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration