LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 01-09-2009, 09:05 AM   #1
teki
LQ Newbie
 
Registered: Dec 2008
Location: Rijeka, Croatia
Distribution: Fedora 10
Posts: 9

Rep: Reputation: 0
How to install an older version of gcc compiler


hello!
i'm using Fedora 10.
i need to instal an older version of gcc compiler. my default version is
Quote:
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
i have already installed compact-gcc-34, but the compilation didn't pass. now, on other computer it apparently works with
Quote:
gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
the problem is that i cannot install this 4.1. gcc. here's what happens when i try to install it:
Quote:
[root@jimi Download]# yum install gcc-c++-4.1.2-33.i386.rpm
Loaded plugins: refresh-packagekit
skype | 951 B 00:00
fedora | 2.8 kB 00:00
rpmfusion-free-updates | 2.7 kB 00:00
rpmfusion-free | 2.7 kB 00:00
updates | 2.3 kB 00:00
Setting up Install Process
Parsing package install arguments
Examining gcc-c++-4.1.2-33.i386.rpm: gcc-c++-4.1.2-33.i386
gcc-c++-4.1.2-33.i386.rpm: does not update installed package.
Nothing to do
any suggestions?
 
Old 01-10-2009, 02:03 AM   #2
teki
LQ Newbie
 
Registered: Dec 2008
Location: Rijeka, Croatia
Distribution: Fedora 10
Posts: 9

Original Poster
Rep: Reputation: 0
i also tried this:
Quote:
[root@jimi Download]# rpm --install gcc-c++-4.1.2-33.i386.rpm
warning: gcc-c++-4.1.2-33.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
gcc = 4.1.2-33 is needed by gcc-c++-4.1.2-33.i386
libstdc++ = 4.1.2-33 is needed by gcc-c++-4.1.2-33.i386
libstdc++-devel = 4.1.2-33 is needed by gcc-c++-4.1.2-33.i386
maybe someone has any idea how to fix this...
 
Old 01-10-2009, 05:38 AM   #3
teki
LQ Newbie
 
Registered: Dec 2008
Location: Rijeka, Croatia
Distribution: Fedora 10
Posts: 9

Original Poster
Rep: Reputation: 0
so i tried another thing:
Quote:
[root@jimi Download]# rpm --install --nodeps gcc-c++-4.1.2-33.i386.rpm
here's what i get:
Quote:
warning: gcc-c++-4.1.2-33.i386.rpm: Header V3 DSA signature: NOKEY, key ID bb4b29a7
package gcc-c++-4.3.2-7.i386 (which is newer than gcc-c++-4.1.2-33.i386) is already installed
file /usr/bin/c++ from install of gcc-c++-4.1.2-33.i386 conflicts with file from package gcc-c++-4.3.2-7.i386
file /usr/bin/g++ from install of gcc-c++-4.1.2-33.i386 conflicts with file from package gcc-c++-4.3.2-7.i386
file /usr/bin/i386-redhat-linux-c++ from install of gcc-c++-4.1.2-33.i386 conflicts with file from package gcc-c++-4.3.2-7.i386
file /usr/bin/i386-redhat-linux-g++ from install of gcc-c++-4.1.2-33.i386 conflicts with file from package gcc-c++-4.3.2-7.i386
file /usr/share/man/man1/g++.1.gz from install of gcc-c++-4.1.2-33.i386 conflicts with file from package gcc-c++-4.3.2-7.i386
is there a way to install in another directory so there is no conflict? or do i have to replace gcc-c++-4.3.2-7.i386 with an older version?
 
Old 01-11-2009, 04:43 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The package 'gcc-c++-4.1.2-33.i386.rpm' provides no file
by name 'gcc' but '/usr/bin/c++ , for c++ code only.
For c++ I recommend 'compat-gcc-34-c++'

I'd guess, that a modified gcc-4.1.2-33.i386.rpm from Fedora 8
http://download.fedora.redhat.com/pu...6/os/Packages/
will work in Fedora 10, works with no problems in Fedora 9.
EDIT: Suse gcc41 works. See link below. Post #6.
'cpp-4.1.2-33.i386.rpm' is also needed.

The method is to unpack the rpm's, remove conflicting files,
rename files in /usr/bin, and the most important before use :
# 'chmod -R 0755 <everything>'

The modified result can be copied into Fedora 10, or repacked
to be installed with # 'rpm -Uvh <package> <package>'

I made 2 rpm's, compat41-gcc-4.1.2-33 i386 ( 250 kB ) and
compat41-cpp-4.1.2-33 i386 ( 2.4 MB )
EDIT : For gcc / g++ 4.1 : Use the suse gcc41 packages. Post #6.
http://download.opensuse.org/distrib...oss/suse/i586/
....
Example command using the above :
'CC=gcc-4.1 CXX=g++34 ./configure'
....

Last edited by knudfl; 07-05-2010 at 10:13 AM.
 
Old 07-04-2010, 10:00 PM   #5
thinhtelecom
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Rep: Reputation: 0
Smile

Hi !

I am using Fedora 11. Now I want to install gcc 3.3; however, I still don't know specific steps to do it.

Could you give me some advices.
Thanks in advanced !
 
Old 07-05-2010, 02:38 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@ thinhtelecom , post # 5. Welcome to LQ. ..

1) yum install rpm
.. to be sure you have a version with lzma.
( The oldest version has no lzma decompression.)

2)
http://download.opensuse.org/distrib...oss/suse/i586/
cpp33-3.3.3-15.3.i586.rpm gcc33-3.3.3-15.3.i586.rpm
gcc33-c++-3.3.3-15.3.i586.rpm libstdc++33-devel-3.3.3-15.3.i586.rpm
And may be libstdc++33-3.3.3-15.3.i586.rpm.
..
 
Old 07-10-2010, 09:40 AM   #7
thinhtelecom
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
@ thinhtelecom , post # 5. Welcome to LQ. ..

1) yum install rpm
.. to be sure you have a version with lzma.
( The oldest version has no lzma decompression.)

2)
http://download.opensuse.org/distrib...oss/suse/i586/
cpp33-3.3.3-15.3.i586.rpm gcc33-3.3.3-15.3.i586.rpm
gcc33-c++-3.3.3-15.3.i586.rpm libstdc++33-devel-3.3.3-15.3.i586.rpm
And may be libstdc++33-3.3.3-15.3.i586.rpm.
..
Thanks !

I installed these packages, but how can I confirm whether the gcc 3.3 was installed successfully.

Regards,
 
Old 07-10-2010, 09:50 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The testing commands are :
gcc-3.3 -v
g++-3.3 -v

Using gcc-3.3 : gcc-3.3 <code>.c

When you have a Makefile : make CC=gcc-3.3 CXX=g++-3.3
..
 
  


Reply



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
need an older gcc version parent's_basement Debian 4 12-18-2008 07:04 AM
install or upgrade newer or older gcc version saistain Linux - Software 1 10-19-2007 10:26 PM
kernel build problems -how to install older gcc version? kpachopoulos Fedora 3 07-04-2005 08:56 AM
using an older version of gcc win32sux Slackware 1 05-12-2004 01:53 AM
Install older version of gcc s9902245 Linux - Newbie 1 09-16-2003 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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