multiple versions of gcc
Mandrake 10.1 does not seem to come with any gcc compatible c++ compiler ( can anyone confirm this).
Anyways I've downloaded the latest gcc3.4.3 (with c,c++,ada and java compilers) and installed it. I built it from source and used the --program-suffix option with configure to make sure there where no conflicts with the gcc already installed (gcc-3.4.1). I guess I did not realize the consequences of my actions as all the executables in /usr/local/bin now have names such as gcc3.4.3, and g++3.4.3 etc.
I'm going to do install again without the --program-suffix option because it installs to a different directory anyways. The problem that I'm going to have is that the currently installed gcc is first on the path, so it will get executed rather that the newer version.
I wanted to remove the old gcc but : "rpm -e gcc" gives
Is there a way I can keep the older gcc while still making sure that the newer gcc is run.
Also I'm not sure what's going to happen with the documentation, old or new version now installed??
Thanks in advance.
Removing the old version is dangerous as it could cause you to kill dependancies for the distribution provided packages on your system.
Gentoo uses a program called gcc-config to allow you to switch back and forth between different gcc profiles (read: versions). It works really well. All executables are blah-version and it just symbolically links the executables without version numbers to which ever version you want, and keeps all the libraries on the machine.
I'm not sure how easy it is to set up gcc-config without the Gentoo package manager (which handles it for me:)) but you can get the source from any Gentoo mirror.
Btw, RPMFind.net has the Mandrake 10.1 RPM package for gcc's c++ compiler.
Thanks for your replies.
Looks like gcc-config is not to easy to setup on a non-gentoo system. Is gcc-config mearly a script? I went here http://www.gentoo.org/cgi-bin/viewcv...-config/files/ and downloaded gcc-config-1.4.0, made it executable and ran it but the script fails cause its looking for /etc/init.d/functions.sh.
If i proceed any further down that road I'll have a breed of linux that''s half mandrake and half gentoo :-)
I also don't want to use the 3.4.1 version of gcc because I'm obstinate and because it took me a long time to figure out how to build and install 3.4.3 from source.
So for now I will use the full name and path when using gcc.
Is it only Mandrake that suffers from this problem or is it most Linux distros? I would imagine that more distros would implement gentoo profile scheme.
|All times are GMT -5. The time now is 01:16 PM.|