[lug] Building from source

Timothy C. Klein teece at silverklein.net
Thu Sep 19 08:11:15 MDT 2002

* John Dollison (johndollison at hotmail.com) wrote:
> I just tried downloading my first Linux program as source code, and tried to
> follow the installation instructions.  I got an error that indicated I
> didn't have gcc installed to compile my source with.  So I went to the gcc
> website, and found out that it's also distributed as source.  So how do I
> compile gcc, if I don't already have gcc?

It is like a chicken and egg thing, huh?  Need a compiler to compile the
compiler.  Circular logic

10 PRINT "hello"
20 GOTO 10

Anyway, what that means is that at some point, the first compiler was
written in assembly.  Today, that is not needed.  Once someone has a
working compiler, it can be used to compile the new compiler.  I suspect
we are many years removed from the assembly compiler that started it all
on Unix.  If you think about it, is also means the first assembler was
written in machine code.  Wow, that must have been fun!

You should be able to find a binary of gcc for you platform.  For
RedHat, that would be an RPM, from their web site or on the CD set, if
you have one.  Maybe up2date could get it for you?  I don't remember how
RedHat works anymore.  SuSE would be similar, as would most RPM-based
distros.  For Slackware you would need to get a tgz from their site or
the cd set.  Of course, if you are lucky enough to be using Debian,
just 'apt-get install gcc' and you will be on your way.

== Timothy Klein || teece at silverklein.net   ==
== ---------------------------------------- ==
== "Hello, World" 17 Errors, 31 Warnings... ==

More information about the LUG mailing list