LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Installing lower version of GCC in ubuntu (https://www.linuxquestions.org/questions/debian-26/installing-lower-version-of-gcc-in-ubuntu-4175529878/)

newinubuntu 01-02-2015 11:49 PM

Installing lower version of GCC in ubuntu
 
I have ubuntu 12.04..due to my project work, i need to install lower version of gcc-4.3. please help me..

Ztcoracat 01-03-2015 01:07 AM

Hi: & Welcome to Linux Questions.

I checked on my sytem on the version of gcc.
Code:

gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You should first check and see what version you do have by running gcc --version in your terminal.
http://www.linuxquestions.org/questi...ackage-237772/

I looked in my Synaptic Package Manager and the earliest version of gcc that I found was 4.6. I didn't see 4.3 listed.
I looked in the Ubuntu Package Search and gcc 4.3 is only available for Ubuntu 10.04 which is not supported anymore.
http://packages.ubuntu.com/search?keywords=gcc-4.3

You can look here also.
http://packages.ubuntu.com/precise/

Installing older packages could cause conflict or may not be available.
Because of the libraries involved installing an older version may not be the best idea.
http://earthwithsun.com/questions/59...-using-apt-get

Are you sure you want to install an older version?

veerain 01-03-2015 02:45 AM

If prebuilt packages are not available it's easy to build gcc from source. Just grab the latest source of gcc-4.3.x from http://gcc.gnu.org and build it.

1) Untar the sources

2) ./configure --prefix=/opt/gcc-4.3

3) make

4) make install

Remember you need a complete gcc toolchain for building.

Usually gcc itself and binutils.

John VV 01-03-2015 01:13 PM

why not just hack your code .
---- you are writing it what not just edit it to make it in compliance with the OLD 4.3 standard ----


or
bring it up to gcc 4.9 standards seeing as you are writing the code

https://gcc.gnu.org/onlinedocs/

knudfl 01-03-2015 03:28 PM

@newinubuntu : Welcome to LQ.

? Which application is it that you think will require gcc-4.3 ?

newinubuntu 01-13-2015 12:14 AM

@knudfl

I required older version for running ns-bgp in my machine...i solved my problem..thank you all for your co-operation..

widget 01-13-2015 07:06 PM

If you have solved the problem, state how you did so.

After that mark the thread solved in the Thread Tools menu on the bar above your first post.

That way someone using forum search tools can find this thread and see that it is solved, and how it was solved if they have a similar need.

newinubuntu 01-15-2015 11:49 PM

@widget
I am really very sorry,i m new in this forum so please apologize me..


All times are GMT -5. The time now is 07:24 PM.