LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 11:30 PM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: xubuntu
Posts: 196

Rep: Reputation: 21
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, 01:02 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,284

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
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 01:06 AM.
 
1 members found this post helpful.
  


Reply

Tags
configuration, g++, gcc


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 an older version of gcc compiler teki Linux - Newbie 7 07-10-2010 10:50 AM
need an older gcc version parent's_basement Debian 4 12-18-2008 08:04 AM
installing older version of gcc and and adding path variables jaind Linux - Desktop 3 11-26-2006 07:18 AM
using an older version of gcc win32sux Slackware 1 05-12-2004 02:53 AM
Install older version of gcc s9902245 Linux - Newbie 1 09-16-2003 04:08 PM


All times are GMT -5. The time now is 09:02 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration