Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to install an older version of gcc on Ubuntu 10.04 (Beta 2); and I'm told I can install a previous package. At present, I can't compile version gcc-3.3.x, and I'm looking to install a package.

How do I instruct apt-get to pull stuff from previous Ubuntu archives?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

/etc/apt/sources.list is the file you want.

However due to binary compatibility you're likely to have issues going back more the a release or two.

I don't have any Ubuntu machines to hand, but on Debian gcc-3.3 is in Etch (circa Q1 2007 as a legacy compiler), and gcc-3.4 is in Lenny (circa mid-2009 ditto).

If it's C your best bet is to simply install an old system and build on that. If it's C++ you're likely out of luck due to binary compatability changes.

share|improve this answer
    
What I'm really trying to do is put together a cross compiler that uses existing libraries in the embedded system. For compatibility I (think I) need to build a gcc-3.4.5 cross compiler. But compiling with gcc-4.x fails. –  Jamie Apr 29 '10 at 14:31
    
I've been playing with /etc/apt/sources.list, which is creating just as many problems as it is solving. Nonetheless, you answered the question, thanks. –  Jamie Apr 29 '10 at 14:32

Binary packages need to have matching (or equivalent) libc versions. So taking a binary package built against libc 2.2 and running it on a system with libc 2.7 isn't going to work.

You could take a source package and rebuild it. Here is an outline of what to do for a GCC corss-compiler for an ARM processor target from Ubuntu, you should be able to adapt that general process.

Another option would be to build GCC C/C++ 3.3.6 from the original source yourself.

I just noticed that it appears that Ubuntu 10.04 Lucid Lynx has a package called gcc-3.3 which should be available for you to install.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.