LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-06-2009, 02:44 AM   #1
Suranjit
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 7

Rep: Reputation: 0
g++ 3.4.4 installation problem in Ubuntu 9.04!!!


Dear All,

I am a new user and I'm using Ubuntu 9.04 in my laptop. The C++ compiler that was installed by default is g++ 4.3.3.
But for some urgent cause I need to install g++ 3.4.4. I have to run some .cc code (ns-2.29 broadcast algorithms) which were written in g++ 3.4.4.

Could anyone please tell me how can I install g++ 3.4.4 and remove g++ 4.3.3?

Your help is really appreciated.
Thanks,
Suranjit
 
Old 10-06-2009, 03:29 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Suranjit View Post
Dear All,

I am a new user and I'm using Ubuntu 9.04 in my laptop. The C++ compiler that was installed by default is g++ 4.3.3.
But for some urgent cause I need to install g++ 3.4.4. I have to run some .cc code (ns-2.29 broadcast algorithms) which were written in g++ 3.4.4.

Could anyone please tell me how can I install g++ 3.4.4 and remove g++ 4.3.3?

Your help is really appreciated.
Thanks,
Suranjit
Here's the problem. If you succeeded in installing the old compiler, it wouldn't run. If it ran against all odds, it would not compile the target program for lack of legacy libraries. If it compiled the program against all odds, the program then wouldn't run.

The solution is to find an updated version of the original program's source code. I offer this advice after years of trying to provide legacy applications in the face of compiler changes that invalidated my source code.
 
Old 10-06-2009, 04:01 AM   #3
Suranjit
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lutusp View Post
Here's the problem. If you succeeded in installing the old compiler, it wouldn't run. If it ran against all odds, it would not compile the target program for lack of legacy libraries. If it compiled the program against all odds, the program then wouldn't run.

The solution is to find an updated version of the original program's source code. I offer this advice after years of trying to provide legacy applications in the face of compiler changes that invalidated my source code.
-->
Thank you for your suggestion. There are no updates for those codes and I tried to compile those codes with g++ 4.4.3 but unfortunately there were some errors such as "...... : error: expected `)' before ‘*’ token" but when I checked the code I was not able to find any bug.... Still now I am wondering how to fix those errors to run those codes !!!!!!!!!
 
Old 10-06-2009, 04:37 AM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Suranjit View Post
-->
Thank you for your suggestion. There are no updates for those codes and I tried to compile those codes with g++ 4.4.3 but unfortunately there were some errors such as "...... : error: expected `)' before ‘*’ token" but when I checked the code I was not able to find any bug.... Still now I am wondering how to fix those errors to run those codes !!!!!!!!!
If you are determined to compile this application and if there really are no updates by the originator, you will have to edit the source to make it comply with current standards.

Most such errors are pretty easy to sort out, especially is you understand C or C++ as applicable.
 
Old 10-06-2009, 08:14 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
There's no easy way to install g++3.4 on Ubuntu 9.04. You could compile it from source though.
 
Old 10-06-2009, 03:39 PM   #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
You can have as many compilers as you want, but Ubuntu 9.04 has
a limited selection compared to earlier versions.
'g++-4.1' can be installed from the repo.
'g++-3.4' is available from "hardy-updates"
http://packages.ubuntu.com/hardy-updates/g++-3.4

sudo dpkg -i \
cpp-3.4_3.4.6-6ubuntu5_i386.deb g++-3.4_3.4.6-6ubuntu5_i386.deb \
gcc-3.4_3.4.6-6ubuntu5_i386.deb gcc-3.4-base_3.4.6-6ubuntu5_i386.deb \
libstdc++6-dev_3.4.6-6ubuntu5_i386.deb

Examples using g++-3.4 :
./configure CXX=g++-3.4
make CXX=g++-3.4
.....
 
Old 10-06-2009, 05:21 PM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by knudfl View Post
'g++-3.4' is available from "hardy-updates"
But Hardy is 8.04 and he's on 9.04, that's two full releases old. I highly doubt that the packages will install cleanly.
 
Old 10-06-2009, 05:51 PM   #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
@ AlucardZero

The packages shown in post # 6 are installed on my
Ubuntu 9.04 and 'g++-3.4' works perfectly.

A lot of old packages will work with no problems
on a current version of a Linux OS.
.....
 
Old 10-09-2009, 01:15 AM   #9
Suranjit
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu 9.04
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks all for your quick replies.
I discussed with my Prof and he suggested me to modify those code instead of spending my time on installing g++-3.4.4, because it could generate other problems (he wrote those code for ns-2.29 and it was compiled on g++ 3.4.4). I hope that I will be able to modify those codes soon.

Thanks again.

>> Suranjit <<
 
Old 10-09-2009, 03:08 AM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you might want to read the gcc porting guide
to gcc 4.3
http://gcc.gnu.org/gcc-4.3/porting_to.html
and to gcc 4.4
http://gcc.gnu.org/gcc-4.4/porting_to.html

manuals
http://gcc.gnu.org/onlinedocs/
 
  


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
Ubuntu Installation problem yogusmilu Linux - Newbie 14 08-08-2008 12:16 AM
ubuntu 7.04 installation problem ChrisNoXmas Ubuntu 1 08-16-2007 08:20 AM
Problem during Ubuntu 6.10 installation impel123 Linux - Software 2 04-26-2007 11:26 PM
Ubuntu Installation Problem Norvegia Ubuntu 4 09-26-2005 01:25 PM
Ubuntu installation problem Tsukasa7 Linux - Newbie 5 09-05-2005 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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