Results 1 to 10 of 10
Hey all!
I have need of updating my gcc for testing purposes, but I want to keep my stable one (3.3.6) available as well.
Looking at an old, unrelated guide ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-19-2005 #1
Multiple GCC Installations
Hey all!
I have need of updating my gcc for testing purposes, but I want to keep my stable one (3.3.6) available as well.
Looking at an old, unrelated guide at the Gentoo site:
http://www.gentoo.org/doc/en/new-upg...gentoo-1.4.xml
I see that there is a way to install multiple gcc's and switch between them with the gcc-config tool:
Now then...as a test, I attempted to install gcc-3.3.5. When run with "-pv", I see that it will downgrade my current compiler, not install an unrelated one.This will also have the beneficial side-effect of installing the gcc-config package on your system, which can be used to switch back and forth between various installed versions of GCC.
My question is: how do I install a newer, ~x86 version of gcc while still keeping my current stable one around?
- 12-20-2005 #2Just Joined!
- Join Date
- Dec 2005
- Posts
- 6
There's an obvious answer, a rediculous answer, and a not-so-smart answer. The obvious answer is: just use the stable version...what do you need an unstable GCC for anyway? The rediculous answer: Use two installations of Gentoo. The not-so-smart answer? Well, that would be just use the unstable version, but again said...thats not too smart.
- 12-20-2005 #3
Um, first off, gcc versions > 3.3.6 now allow you to have multiple installations, managed by gcc-config (similar to java-config).
And to answer the question, I needed it so I can test out capabilities in gcj that were not around in the stable version I was using. This particularly applies to regular expressions, which were not supported until gcj 3.4. I did end up using multiple installations, but it would have been nice to not need that.
- 12-20-2005 #4
I've heard of people making gentoo 'sandboxes' where you basically follow enough of the install to create a section of your filesystem that you can chroot yourself into and play around without risking system-wide disaster.
Granted, if you want to do some really heavy system hacking this isn't a great solution, but if you just wanna play with a bleeding edge toolchain, its as close to perfect as your prob gonna get...
minus the extra day or 2 to set it up....
- 12-20-2005 #5
Yeah...that's basically what I did (I installed through my existing Gentoo installation), but I was testing out a Java GUI, so I had to install X anyway
.
But X + Fluxbox isn't too bad.
- 07-21-2006 #6Just Joined!
- Join Date
- Jul 2006
- Posts
- 2
Installing multiple versions of gcc and using one which is required
The listed below are the basic steps and you would be done.. to read more articles you can visit http://www.tarunworld.com/linux/keep...ng-them-2.html
1. Copy the bz2 file to a director say /usr/src.
2. Make a dir say named gcc 3.5 in /usr/src.
3. Untar the contents of the zip file in this directory.
4. go to the directory gcc 3.5 as cd gcc3.5
5. on shell give the command as /usr/src/gcc3.5/configure --prefix=/opt/gcc
6. on shell run make bootstrap.
7. on shell run make install(do it as root).
8. The gcc would be compiled 3 times and you might have to wait a while.
9. After the process is completed on shell run export PATH=/opt/gcc/bin:$PATH.
10. This command appends the gcc path to the environment path variable.
11. Now check gcc --v and you would get version as 3.5.
Regards
- 07-21-2006 #7Holy thread resurrection batman!
Originally Posted by sms_james
Anyway, I can simplify that process. If you have GCC 3.3.5 or greater (which you do because 3.4 is stable now) all you have to do is unmask whatever gcc you want and type
Done. It will slot it, and you can select the compiler by using eselect.Code:emerge -av gcc
- 07-29-2006 #8Just Joined!
- Join Date
- Jul 2006
- Posts
- 2
Hey sorry buddy i corrected it.. i meant to say to read more atricles... chao.. well i try urs method.. never knew it.. thx
Originally Posted by gruven
- 09-10-2006 #9Just Joined!
- Join Date
- Sep 2006
- Posts
- 3
i have latest gcc-4.1.1 following gentoo 2006.1 minimal install.
since I must use gcc-3.4.3, I installed it manulally in sperate directory and it works fine for me as long as i re-edit my Makefile to use this verion
regards
/AMM
- 09-10-2006 #10GCC is slotted on gentoo, meaning that you can have more than one version installed through portage and switch between the two (or more) freely and easily with eselect. You should just use portage to handle your GCC installations. Much easier IMO.
Originally Posted by AMM


Reply With Quote
