LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2010, 10:36 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Rep: Reputation: 30
Install back version of gcc


I have Fedora 11 on my machine. It comes with gcc 4.5.
However, I am trying to compile code that require gcc 4.1.

How do I install gcc 4.1 on my machine and still have 4.5 there as well?
and how do I unstall 4.5 gcc if i need.

I was trying to use yum, but it did not work. not sure what package i need.
 
Old 04-29-2010, 12:06 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,490

Rep: Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233
The default compiler should never be removed.
( Fedora 11 has gcc-4.4.1 , not 4.5 ).

All extra compilers are made to be installed all at the same time.
# 'yum search gcc' ..will show compat-gcc-34/compat-gcc-34-c++.
Did you try using that ? ( = version 3.4.6 )

About gcc 4.1 : The Suse 11.2 compat gcc41 works perfect
in Fedora 10 - 11 - 12.
http://download.opensuse.org/distrib...oss/suse/i586/
More info here, post #3
http://www.linuxquestions.org/questi...g4ip-748530/#3

Use with e.g.: make CC=gcc-4.1 CXX=g++-4.1
.. or edit the Makefile.in ..

Porting the code to gcc 4.3 / gcc 4.4
http://gcc.gnu.org/gcc-4.3/porting_to.html
http://gcc.gnu.org/gcc-4.4/porting_to.html

Last edited by knudfl; 04-29-2010 at 10:45 AM.
 
Old 04-30-2010, 10:43 AM   #3
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
This is a very nice trick. I will try that.
Quote:
Use with e.g.: make CC=gcc-4.1 CXX=g++-4.1
.. or edit the Makefile.in ..
Now, is there a way to use yum to install the gcc 4.1 so that I do not have to deal with the dependency issue?
It looks like my "yum search gcc" shows only gcc 4.5
 
Old 04-30-2010, 02:55 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,056

Rep: Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468
most of the time there is ONLY a very small hack needed for it to build in gcc 4.3 ,and gcc4.4
see the porting guids
http://gcc.gnu.org/gcc-4.3/porting_to.html
http://gcc.gnu.org/gcc-4.4/porting_to.html

most of the time it is adding a " #INCLUDE <?????? > "
 
Old 05-01-2010, 04:07 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,490

Rep: Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233Reputation: 3233
@ John VV , post # 4 : I agree : post #4 is a duplicate of
this in post #2 : ""Porting the code to gcc 4.3 / gcc 4.4"".

Installing a compat compiler, say ten minutes.
Editing an application with 2000 files : A days work.
And errors may be injected.

> One may prefer just to install the required compat compilers.
..
 
Old 05-01-2010, 04:38 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,056

Rep: Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468Reputation: 2468
i have been finding that for the most part i have only needed to edit 2,3 to maybe 4 c files to build most source

and most of the time it is do to the need to explicitly add include's
there are a few other things and every one i have came across is documented in the porting guide

this is of course for gcc 4.1 to 4.4
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install gcc version 3 biplabbijay SUSE / openSUSE 8 03-23-2010 11:58 PM
how to install dual version gcc nilathinesh Linux - Software 4 10-06-2007 12:42 AM
Install or not install newest GCC version on Solaris 10. Zepiroth Solaris / OpenSolaris 6 05-26-2006 02:42 AM
How do I install an old version of gcc thorney Linux - Newbie 1 11-25-2005 12:10 AM
How to install old Gcc version ? vasilakis Linux - Newbie 5 06-10-2004 11:58 AM


All times are GMT -5. The time now is 01:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration