Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 09-26-2002, 09:22 PM   #1
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, 09:34 PM   #2
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
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, 04:55 AM   #3
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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, 06:28 AM   #4
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.


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 / openSUSE 3 11-29-2004 03:13 PM
Kernel compiling: gcc-3.3 is 586, should be gcc-3.3 386 Erik Plaggenmar Linux - Software 0 10-01-2004 12:38 PM
running software built with gcc 3.0.2 on Redhat 8 - gcc 3.2 dst1989 Linux - Software 3 03-08-2004 11:23 PM
a doubt with host gcc and arm-linux-gcc renjithgopal Linux - General 1 09-11-2003 05:02 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 01:07 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:34 AM.

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