LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Updating GCC (https://www.linuxquestions.org/questions/linux-newbie-8/updating-gcc-372911/)

winterhunter 10-14-2005 02:56 AM

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!

bigrigdriver 10-14-2005 09:04 PM

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!

foo_bar_foo 10-14-2005 10:33 PM

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


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