LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-06-2011, 10:30 PM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
installing a second (older) gcc/g++ version (how to configure)


I'm about to build gcc-3.3.6 from source, to install on my Ubuntu 10.04LTS system. I don't want it to interfere with the gcc-4.4.3 which was installed from the Ubuntu repos, so I think I should run configure with --prefix=/usr/local/gcc-3.3.6 to keep it separate and make it easy to remove. Does this seem OK or is there a better way?

Also, will this mean that whenever I want to compile with ver. 3.3.6, I MUST use the -I compiler option to specify the headers under my gcc-3.3.6 directory, or is it OK to skip that & let the preprocessor use the headers in /usr/include?
 
Old 02-07-2011, 12:02 AM   #2
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
Quote:
... or is there a better way ?
You can just install the gcc-3.3.6 from Ubuntu Hardy : gcc-3.3
http://packages.ubuntu.com/hardy-updates/gcc-3.3
http://packages.ubuntu.com/hardy-updates/g++-3.3
By adding 'hardy' to the sources.list , or manual install.

Ubuntu is meant to have multiple compilers installed.
You get : /usr/bin/gcc-3.3 : g++-3.3 .

Quote:
MUST use the -I compiler option
No, you always have the compiler headers in a non LD_LIBRARY_PATH.
gcc-<any-version> knows where its own headers are.
( Like /usr/lib/gcc/i486-linux-gnu/<version>/include/ ).

..

Last edited by knudfl; 02-07-2011 at 12:06 AM.
 
1 members found this post helpful.
  


Reply

Tags
configuration, g++, gcc



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 an older version of gcc compiler teki Linux - Newbie 7 07-10-2010 09:50 AM
need an older gcc version parent's_basement Debian 4 12-18-2008 07:04 AM
installing older version of gcc and and adding path variables jaind Linux - Desktop 3 11-26-2006 06:18 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 - Software

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