Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-27-2012, 08:54 PM   #1
Registered: Nov 2009
Location: Baton Rouge, Louisiana
Distribution: Ubuntu
Posts: 57

Rep: Reputation: 15
install gcc 3.4 along side gcc 4 problem on ubuntu 11.10

Hi all,
I have an ubuntu 11.10 server which I mainly use for text game development. I was considering using a text game codebase which is no longer supported but I have been told is easily maintainable. For that reason, I tried compiling it... but lots of errors occurred when doing so. I was told by the same people that it compiled fine under gcc 3.x, so I installed gcc 3.4 from the hardey repos. Now gcc is installed, but it can't create executibles because (so I've been told) binutils is not installed or something similar. I would just do apt-get install build-essential, but I already have that package with gcc 4, I need all the other things that work with gcc 3.4. So that leads me to my question: How to install binutils and other required software for gcc 3.4 along side all the required software for gcc 4?
Old 06-28-2012, 04:39 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,039

Rep: Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455Reputation: 3455
First : You can have as many versions of gcc as you want,
installed at the same time.

But : No old Ubuntu compilers will work in Ubuntu 11.04, 11.10 etc.
It's not about binutils or any other package :
The gcc binary is hard coded with certain search path's.
And the later Ubuntu's have got new hideaway locations for :, { crt1.o crti.o crtn.o },
"/usr/include/": asm/: bits/: gnu/: sys/ .

"gcc" has search path's for finding files in it's own directories.
The missing files can be copied or linked into "old gcc" :
Then the modifications will not alter your system files.
Example : A "gcc41-compat 11.04" modified for 11.10 ..
sudo cp -a /usr/include/i386-linux-gnu/asm/ /usr/gcc41/lib/gcc/i386-linux-gnu/4.1.2/include/ 
sudo cp -a /usr/include/i386-linux-gnu/bits/ /usr/gcc41/lib/gcc/i386-linux-gnu/4.1.2/include/
sudo cp -a /usr/include/i386-linux-gnu/gnu/ /usr/gcc41/lib/gcc/i386-linux-gnu/4.1.2/include/
sudo cp -a /usr/include/i386-linux-gnu/sys/ /usr/gcc41/lib/gcc/i386-linux-gnu/4.1.2/include/

## crt1.o  crti.o  crtn.o :
sudo cp /usr/lib/i386-linux-gnu/crt* /usr/gcc41/lib/gcc/i386-linux-gnu/4.1.2/

## /usr/gcc41/lib/ : 
sudo rm*
sudo cp /lib/i386-linux-gnu/ /usr/gcc41/lib/
## /usr/gcc41/lib/ : 
sudo ln -s
Links :
gcc41-compat 11.10
gcc34-compat 11.04


Last edited by knudfl; 06-28-2012 at 04:50 AM.


binutils, compilation, gcc, ubuntu 11.10

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install gcc when a current gcc is installed but not responding Nadishka Linux - Newbie 6 10-15-2009 03:33 PM
yum install gcc doesn't set the lastest gcc ver 4.3.x kim,jw Linux - Newbie 3 12-22-2008 11:51 PM
pkg-get install gcc ERROR: gcc unrecognized Raidmax Solaris / OpenSolaris 10 08-30-2007 12:51 PM
gcc wont install, 'failed dependencies: glibc-devel is needed by gcc-3.3.3-41' TdlSnare SUSE / openSUSE 3 11-29-2004 02:13 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration