Click to See Complete Forum and Search --> : upgrade gcc


littlebig
07-27-2001, 04:07 AM
i have upgrade gcc3.0 but it placed the binary in /usr/local/bin instead of /usr/lib
and when i typed gcc -v it's still give me the old verion.
how could i replace the gcc3.0 with the old one?
:confused:

sincka
07-27-2001, 05:00 AM
Ok... I think you're contradicting yourself there but I am not sure since it's 5:00 am and I've been up for more than... aahhh, I don't even know.

Anyway since you didn't specify which disto you're using I'll just say download the source from the net and there is a nice little readme in there that you read and boom :p

If you need any more help just yell. I'm sure that someone else will help you... if not I'll try in about 8-15 hrs.

littlebig
07-27-2001, 05:05 AM
i am using redhat 7 which has an unstable gcc 2.96 so i want upgrade to 3.0. but now there are 2 versions of gcc and the default gcc is 2.96
so how to change the default to 3.0?
thanks :confused:

ronmon
07-27-2001, 08:07 AM
If you built it from source, you need to run confgure like this:

./configure --prefix=/usr

That will put the binary in /usr/bin (and overwrite your old one) rather than configure's default /usr/local when you do make install.

X_console
07-27-2001, 10:04 AM
All you need to do is to rename the gcc in /usr/lib to something else. Eg: gcc.old Then symlink your new gcc to /usr/lib:

ln -s /usr/local/bin/gcc /usr/lib/gcc

Done.

sincka
07-27-2001, 04:02 PM
Originally posted by littlebig:
<STRONG>i am using redhat 7 which has an unstable gcc 2.96 so i want upgrade to 3.0. but now there are 2 versions of gcc and the default gcc is 2.96
so how to change the default to 3.0?
thanks :confused:</STRONG>

Ignore what I said and listen to the other two :p

get the source from

here (ftp://sunsite.doc.ic.ac.uk/Mirrors/sourceware.cygnus.com/pub/gcc/releases/gcc-3.0/gcc-3.0.tar.gz)

hopefully you will get it working :)

ronmon
07-27-2001, 05:07 PM
What the HAL says will work if you symlink it to /usr/bin and not /usr/lib.

Giscardo
07-31-2001, 06:18 AM
What are the advantages of upgrading to gcc 3.0?