LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-26-2002, 08:22 PM   #1
aaronluke
Member
 
Registered: Aug 2002
Posts: 58

Rep: Reputation: 15
Installing GCC 3.1 over GCC 2.96...?


The compiler used at school is GCC 3.1 I've got 2.96 here on my Red Hat machine. So I downloaded a *.tar.bz2 file of GCC 3.1 and decompressed it. I then configured it, ran 'make bootstrap' (took an hour and a half), then ran 'make install'. Everything went just fine and I received no error messages.

Well, afterwards, at he prompt, I typed $gcc -dumpversion and was still told I was using 2.96. How do I go about making 3.1 the default compiler? Ideally, I'd like to remove all references to 2.96 if I can.

Any help you guys can offer is appreciated.
 
Old 09-26-2002, 08:34 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
ok, look up where gcc-3.1 was installed, most probably /usr/local/bin, the original is in /usr/bin, you have 2 options: make your path aware of /usr/local/bin before /usr/bin; second, verify that you have right gcc -
/usr/bin/gcc -dumpversion
/usr/local/gcc -dumpversion
and move the one that returns older version to something benign or remove it completely (mv /usr/bin/gcc /usr/bin/gcc296 or rm -f /usr/bin/gcc, as I said it's most probably in /usr/bin, then you can create a symink in /usr/bin pointed to the right gcc
 
Old 09-27-2002, 03:55 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
also, gcc might very well be CALLD gcc-3.1 or gcc3 or similar. the two versions can very happily live side by side, so they should both be accessible. "gcc" is probably just a symlink to /usr/bin/gcc-2.96 or something...
 
Old 09-27-2002, 05:28 AM   #4
GT I.N.C
Member
 
Registered: May 2002
Location: Australia, Sydney, St.Clair
Distribution: Rh 7.3
Posts: 836

Rep: Reputation: 30
i got it to work by typing gcc-3.1 on the command line (by itself) then i checked the version and it changed to 3.1 from 2.96.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare Suse/Novell 3 11-29-2004 02:13 PM
Kernel compiling: gcc-3.3 is 586, should be gcc-3.3 386 Erik Plaggenmar Linux - Software 0 10-01-2004 11:38 AM
running software built with gcc 3.0.2 on Redhat 8 - gcc 3.2 dst1989 Linux - Software 3 03-08-2004 10:23 PM
a doubt with host gcc and arm-linux-gcc renjithgopal Linux - General 1 09-11-2003 04:02 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 12:07 AM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration