This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: After installation 3.0.2
- To: pocm at rnl dot ist dot utl dot pt (Paulo J. Matos aka PDestroy)
- Subject: Re: After installation 3.0.2
- From: Harry Putnam <reader at newsguy dot com>
- Date: Wed, 31 Oct 2001 04:12:21 -0800
- Cc: gcc-help at gcc dot gnu dot org
- References: <m3bsiooypv.fsf@localhost.localdomain>
pocm@rnl.ist.utl.pt (Paulo J. Matos aka PDestroy) writes:
> Hi all,
>
>
> I'm running RedHat 7.1 and I had all the gcc3.0.0 rpms installed and I've
> just compiled and installed gcc 3.0.2.
> gcc 3.0.0 executable is in /usr/bin and gcc 3.0.2 executable is in
> /usr/local/bin
> when I run gcc I get the 3.0.0 version.
> I'm thinking about removing all the gcc 3.0.0 rpms but I don't know if
> it is safe because it might delete 3.0.2 files, I think.
>
> What should I do?
Some of the heavy hitter here can correct me if this is bad advice but
I just went through something similar also on Redhat 7.1
If you didn't give any special --prefix=SOMEPATH to ./configure then I
think it will have installed everything /usr/local. It did here. And
I think most gnu soft ware defaults to /usr/local unless told
otherwise.
Uninstalling the gcc installed by rpm will probably cause some
problems with other software. But it won't do anything to the
gcc-3.0.2 install in /usr/local. I think it would be wise to leave
the rpm install alone for a while.
You can set your PATH to avoid /usr/bin/gcc by putting /usr/local/bin
first.
Open a shell and test this out, you'll see how it works soon.
which gcc
/usr/bin/gcc
PATH=/usr/local/bin:$PATH;export PATH
which gcc
/usr/local/bin/gcc
Once you've tried it out on something by the above technique and you
see no problems, then make it permanent in your $USER acct
~/.bash_profile. Probably in /root/.bash_profile too.
I recommend that you first make copies of any files you edit in case it gets
confusing.
Here is a well known technique to keep some kind of basic record of
original configs:
Copy the file to a unique name that records the date handily too.
cp /etc/profile /etc/profile_$(date +"%m%d%H%M%S")
That will give you a handy dated backup copy that looks like:
cp file file_$(date +"%m%d%H%M%S")
ls file*
file <== edit this one.
file_1031040853
That number is MnthDayHourMinuteSecond