Hi,
I am using ubuntu 9.10 and it comes with gcc 4.4. How can I install gcc 4.5 without screwing up my gcc 4.4. environment. I just need gcc 4.5 to compile 1 application.
Thank you.
Hi,
I am using ubuntu 9.10 and it comes with gcc 4.4. How can I install gcc 4.5 without screwing up my gcc 4.4. environment. I just need gcc 4.5 to compile 1 application.
Thank you.
The easiest way is to install into a private prefix:
configure --prefix=/some/private/prefix ...
In a private prefix, there is 0 chance you'll overwrite an existing file. You'll then need to add the prefix to your path.
A second option is to give the new binaries a suffix and to use version specific runtime libraries:
configure --program-suffix=-4.5.0 --enable-version-specific-runtime-libs
although I can't promise some other file won't be modified.
My preferred method is to have a deb-src
entry in /etc/apt/sources.list
as e.g.
# Debian sources
deb-src http://ftp.us.debian.org/debian/ unstable main contrib non-free
I can then do apt-get source foo
and fetch the appropriate package with its sources which will be unpackages. I typically add a local changelog entry (set apart by a revision number as 1.2-3local0) and rebuild. This sometimes entails building dependencies. It all depends...
I guess gcc-4.5 is currently in experimental as per this page so you would have to add experimental to the sources.list
file as well. I have not used this but it should work too:
deb-src http://ftp.debian.org/debian experimental main