LinuxQuestions.org
Review your favorite Linux distribution.
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 07-23-2002, 09:12 AM   #1
Rex_chaos
Member
 
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240

Rep: Reputation: 30
install gcc


Hi all,
I am going to upgrade gcc to v3.0. Must I uninstall the previous one first?

I have installed gcc3.0 directly without removing the previous version. However, when I issue `g++ -v`, it still reports the previous version. So I tried to uninstall the previous version, however, system report I can't do that because of dependences. Anyway, I issue `rpm -e` to remove gcc-g++ and the some libraries finally. After have reinstalled gcc3.0 again, I can compile codes but fail in running them(report xxx.so.3 and so on missing).

How can I upgrade gcc correctly? What should I do now?

Thanks.
 
Old 07-23-2002, 09:15 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
gcc v3+ is normally called gcc3 not gcc, unless you specifically link it to that name. you should keep 2.9whatever installed aswell. they exist fine side by side.
 
Old 07-23-2002, 09:29 AM   #3
Rex_chaos
Member
 
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240

Original Poster
Rep: Reputation: 30
Do you mean I should issue gcc3 rather than gcc for compiling?
 
Old 07-23-2002, 09:40 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
most confgiure scripts will check for gcc and then gcc3. if you want to compile with gcc3 always then manually change the gcc3 symlink or just uninstall the old one
 
Old 07-23-2002, 11:08 AM   #5
Rex_chaos
Member
 
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240

Original Poster
Rep: Reputation: 30
Yes, I found that the new compiler has gcc located at other directory. I built a link point to the new compiler and everything is all right. However, when I run the compiled program which is compiling with the new compiler. Error occurs!!!

/test:relocation error: undefined symbol:_ZTVN10__cxxabiv117__class_type_infoE

I think the executable file need some libraries that have linked to the old one. I don't know what to do.
 
Old 07-23-2002, 11:32 AM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You need library path to libraries coming with new gcc. If gcc is in /usr/local/bin (default), its libraries are in /usr/local/lib. Add this directory into /etc/ld.so.conf and run ldconfig.
 
Old 07-23-2002, 12:15 PM   #7
Rex_chaos
Member
 
Registered: Aug 2001
Location: GD, GZ, China
Posts: 240

Original Poster
Rep: Reputation: 30
Still no good. I don't know why. I can't compile the old source code with new compiler now.
Do you know what cvs is? Can I use cvs to upgrade gcc? How?

Thanks.
 
  


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
cant install gcc nikoz Linux - Software 4 12-02-2004 01:23 AM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM
how to install gcc big_bailey Linux - Software 3 07-23-2004 12:47 AM
Install GCC BizHat.com Linux - Software 10 07-19-2004 04:26 PM
Must have gcc to install gcc? thafusion Linux - Software 4 05-28-2004 10:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration