gcc 3.1 installation
Gary Smith
gary.vsmith@virgin.net
Tue Jul 2 12:58:00 GMT 2002
Hi Jeff
The srcdir and objdir were taken from the document you pointed me too. I
missunderstood the intructions as I saw a srcdir int he configure script but
no objdir, so I added it.
The install went fine after all. The bin files is in /usr/local/bin and this
reports the correct vresion and built my new app.
I simply renamed the /usr/bin/gcc (2.96) to another files and made a sym link
from /usr/bin/gcc to /urs/local/bin/gcc. The compiler worked after this, but
not sure what else is out of sync now. I presume other files in
/usr/local/bin should also be in /usr/bin but I don't know which.
I may recompile gcc again using the prefix add on to get it into the correct
bin directory.
Should it be in /usr/bin or /usr/local/bin or it is dependent on linux
distributions and apps being built?
thanks for all your help. It certainly pointed me the right direction.
Gary
On Tuesday 02 Jul 2002 3:54 am, Jeff Sturm wrote:
> On Mon, 1 Jul 2002, Gary Smith wrote:
> > I did not specify the --prefix variable. I did set the srcdir and objdir
> > in the configure file prior to running ./configure.
> > srcdir=/usr/lib/gcc-3.1, objdir=/usr/lib/gcc3.1-lib. This is all I
> > configured away from the default.
>
> Changing srcdir, objdir isn't part of the typical GCC installation, and
> shouldn't be needed; what document(s) advised you to do this?
>
> Setting --prefix is important if you want to install somewhere besides
> /usr/local. Please see http://gcc.gnu.org/install/ for detailed
> installation notes.
>
> > Does 2.96 have problems?
>
> I don't know. 2.96 isn't an FSF release. It was produced by Red Hat
> solely for use on their own GNU/Linux distribution. You might check with
> Red Hat for bugs reported on 2.96, or availability of package updates.
>
> > I will check /usr/local/bin/gcc, but what am I looking for?
>
> Assuming you successfully built & installed gcc into /usr/local, you could
> enter:
>
> [jsturm@suzy jsturm]$ /usr/local/bin/gcc -v
>
> and see something similar to:
>
> Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
> Configured with: ../configure --enable-languages=c++,java
> --enable-threads : (reconfigured)
> Thread model: posix
> gcc version 3.1 20020426 (prerelease)
>
> > How do I get the system to recognise it has another compiler to look for?
>
> It depends on your OS and the package you're building. It would be better
> to ask the maintainers of those; this list is about _developing_ GCC not
> _using_ it. That said, as a general bit of advice either or both of the
> following commands may help:
>
> export PATH=/usr/local/bin:$PATH
> export CC=/usr/local/bin/gcc
>
> Jeff
More information about the Gcc
mailing list