This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: configure gcc4.0.2


iwsmith@postoffice.utas.edu.au 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
source.

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]