PDA

View Full Version : GCC Installation



Kynder
05-24-2002, 09:18 PM
First i'd like to say this program is great and i've had a lot of fun playing with it. My problem comes from the fact I've been having a bit of a problem with the installation of gcc 3.0.3 onto my system. I am running a fresh installation of SuSE 7.3 which came originally running gcc version 2.95.0. It seems there was something i must have forgotten during the compiling and/or installation of the software because i am currently getting these command line responses.

Starting logged into my personal account then running it as root.

# gcc --version
3.0.3
# su
password
# gcc --version
2.95.0

Now I have managed to circumvent this problem in order to compile and install SEQ by manually typing the full path name to where there is a version 3.0.3 of gcc for the export CC= and the export CXX lines so it's nothing deathly important but i certainly would like to have a more current version of the gcc software running on my linux box in the proper way now that i've taken the time to download and compile it all. I did try using the search but had no success so i was hoping someone might be able to point me in the right direction as to where i went wrong during the install process. SEQ is running like a champ without a hitch so I'm just hoping to figure out what i did wrong so that as i gain more experience working with Linux I won't make the same mistake twice.

high_jeeves
05-24-2002, 09:26 PM
Take a look at the "which" command.. it will tell you the full path of whatever command you are trying to run.. type "man which" for more information (no, I'm not talking about the sloppy joe sauce :) )...

for example, on my box "which gcc" tells me: /usr/bin/gcc

My guess is, your user account, and root account have different paths.. in your user path, gcc3 comes first, in your root path gcc2.95 comes first... if you change your path's around, you can switch this around to your hearts desire..

Edit: Type echo $PATH to see the path for the user you are currently logged in as..

--Jeeves

Cryonic
05-24-2002, 09:32 PM
"man which"? isn't that a sandwich filling? mmm, "man which"...

bonkersbobcat
05-25-2002, 01:10 AM
Also note there there is a difference between


su

and


su -

The one with the dash after it starts a new login shell which, I believe, runs the login script for the user you are su-ing to. The paths you end up with will be different depending on which syntax you use.