LinuxQuestions.org
Visit Jeremy's Blog.
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 02-21-2005, 05:14 PM   #1
Avatar33
Member
 
Registered: May 2003
Location: South Africa
Distribution: Ubuntu
Posts: 75

Rep: Reputation: 15
multiple versions of gcc


Hi all.

Mandrake 10.1 does not seem to come with any gcc compatible c++ compiler ( can anyone confirm this).
Anyways I've downloaded the latest gcc3.4.3 (with c,c++,ada and java compilers) and installed it. I built it from source and used the --program-suffix option with configure to make sure there where no conflicts with the gcc already installed (gcc-3.4.1). I guess I did not realize the consequences of my actions as all the executables in /usr/local/bin now have names such as gcc3.4.3, and g++3.4.3 etc.

I'm going to do install again without the --program-suffix option because it installs to a different directory anyways. The problem that I'm going to have is that the currently installed gcc is first on the path, so it will get executed rather that the newer version.

I wanted to remove the old gcc but : "rpm -e gcc" gives
Code:
error: Failed dependencies:
        gcc is needed by (installed) kernel-source-2.6-2.6.8.1-10mdk
Is removing the old gcc a bad idea??
Is there a way I can keep the older gcc while still making sure that the newer gcc is run.
Also I'm not sure what's going to happen with the documentation, old or new version now installed??

Thanks in advance.
Avatar
 
Old 02-21-2005, 05:29 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
Removing the old version is dangerous as it could cause you to kill dependancies for the distribution provided packages on your system.

Gentoo uses a program called gcc-config to allow you to switch back and forth between different gcc profiles (read: versions). It works really well. All executables are blah-version and it just symbolically links the executables without version numbers to which ever version you want, and keeps all the libraries on the machine.

I'm not sure how easy it is to set up gcc-config without the Gentoo package manager (which handles it for me) but you can get the source from any Gentoo mirror.
 
Old 02-21-2005, 05:31 PM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
Btw, RPMFind.net has the Mandrake 10.1 RPM package for gcc's c++ compiler.
 
Old 02-22-2005, 02:06 PM   #4
Avatar33
Member
 
Registered: May 2003
Location: South Africa
Distribution: Ubuntu
Posts: 75

Original Poster
Rep: Reputation: 15
Thanks for your replies.

Looks like gcc-config is not to easy to setup on a non-gentoo system. Is gcc-config mearly a script? I went here http://www.gentoo.org/cgi-bin/viewcv...-config/files/ and downloaded gcc-config-1.4.0, made it executable and ran it but the script fails cause its looking for /etc/init.d/functions.sh.

If i proceed any further down that road I'll have a breed of linux that''s half mandrake and half gentoo :-)

I also don't want to use the 3.4.1 version of gcc because I'm obstinate and because it took me a long time to figure out how to build and install 3.4.3 from source.

So for now I will use the full name and path when using gcc.
Is it only Mandrake that suffers from this problem or is it most Linux distros? I would imagine that more distros would implement gentoo profile scheme.

Thanks again.
Avatar
 
  


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
Need Two Versions of gcc on FC4 yellowdognerd Linux - Software 9 09-09-2005 12:46 PM
switching between gcc versions DrAMac Debian 2 08-30-2005 05:21 PM
Two gcc Versions On The Same Installation? Xian Debian 4 08-16-2005 02:07 AM
changing gcc versions SirRobbin Linux - Newbie 0 08-27-2003 09:54 AM
multiple gcc versions and selectability tincat2 Linux - Software 1 06-08-2003 02:38 AM


All times are GMT -5. The time now is 02:09 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