configure gcc4.0.2

Brian Dessent
Tue Aug 22 07:55:00 GMT 2006 wrote:

> I am trying to install gcc on Ubuntu linux on a Mac powerpc architecture.
> I have successfully unpacked the tarball and have tried to build it in a
> directory other than the directory containing the unpacked tarball (the
> source directory) as per the instructions.
> However when I run "sourceDirectory/configure" it halts configuration
> because it can not find gcc or cc at lines 1808 and 1838. The
> instructions contain the following:
> Second, when configuring a native system, either cc or gcc must be in
> your path or you must set ccin your environment before running configure.
> Otherwise the configuration scripts may fail.
> I do not know exactly what is meant by cc or gcc must be in the path. 

It seems like you don't have a C compiler already installed on your
system, which is a requirement for building gcc from source.  This may
sound strange that you need a C compiler before you can build a C
compiler, but what you have right now is just plain C source code, and
is useless without an existing C compiler.

Think of it like plans for a machine tool -- right now you only have
measured drawings for a lathe, but if you actually want an actual lathe
you first need to get a working lathe and then use it to build that
lathe.  If you are only interested in having a lathe so that you can
build other things (and aren't interested in the process of lathe
building, as most aren't) then you just want to order a lathe, and not
plans for how to build a lathe.  This is the analogy for installing gcc
via prebuilt binary packages vs. from source.

Thus most end users do not install gcc like this.  Almost every linux
distro on the face of the earth has prebuilt gcc packages that you just
select from a list to install gcc.  This is what you should do too. 
Building the compiler from source is a lot more complicated and is
usually not required.  Only if you need a specific version of gcc and
your distro does not provide packages for this version (and many provide
several packaged versions) should you bother with building from source. 
And even in that case you still need to install some prebuilt binary C
compiler from your distro (or other means) before you can build gcc from


More information about the Gcc-help mailing list