LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Install gcc install from scratch, how? (https://www.linuxquestions.org/questions/linux-software-2/install-gcc-install-from-scratch-how-467216/)

ramram29 07-24-2006 04:03 PM

Install gcc install from scratch, how?
 
How can you install gnu ar, cc, gcc and make from scratch; especially gcc? How can I install the compiler gcc from scratch? Let's say I have a bare Linux system with just the kernel, binutils and minimal libraries; and I want to install gcc without the capabilities of rpm, yum or apt-get - how do you do it?

I tried downloading the gcc-4.1.1.tar.bz2, extracted and tried running ./configure but it says that I need a c compiler. How can the installation of a c compiler say that it needs a c compiler in order to compile.

twantrd 07-24-2006 04:57 PM

Install the gcc package from the CD's of your distro and then you will be able to compile the new gcc package that you downloaded.

-twantrd

debiant 07-24-2006 08:49 PM

Quote:

Originally Posted by ramram29
How can you install gnu ar, cc, gcc and make from scratch; especially gcc? How can I install the compiler gcc from scratch? Let's say I have a bare Linux system with just the kernel, binutils and minimal libraries; and I want to install gcc without the capabilities of rpm, yum or apt-get - how do you do it?

I tried downloading the gcc-4.1.1.tar.bz2, extracted and tried running ./configure but it says that I need a c compiler. How can the installation of a c compiler say that it needs a c compiler in order to compile.


It's one of those chicken and the egg things. But one thing is for sure you do have to have a pre-compiled gcc to make your own. LFS goes into some good detail about the compilation proccess. Of course installing LFS you have to compile gcc 3 times.

jtshaw 07-24-2006 09:00 PM

You can also check out the GCC Website.

In particular the install document and the prereq. document.

ramram29 08-01-2006 01:59 PM

Quote:

Originally Posted by debiant
It's one of those chicken and the egg things. But one thing is for sure you do have to have a pre-compiled gcc to make your own. LFS goes into some good detail about the compilation proccess. Of course installing LFS you have to compile gcc 3 times.

That's what I thought. It makes me think more than twice about building my own custom mini distro. I'm in the process of creating a routine to setup gcc and yum with a scratch install.


All times are GMT -5. The time now is 07:16 AM.