This is the mail archive of the
mailing list for the GCC project.
Re: bootstrap/5187: gcc 3.0.3 fails to bootstrap on Sun Ultra 60with Solaris 8
- From: "Dr. David Kirkby" <drkirkby at ntlworld dot com>
- To: Jeff Sturm <jsturm at one-point dot com>, Paolo Carlini <pcarlini at unitus dot it>, gcc-help <gcc-help at gcc dot gnu dot org>, gcc-gnats at gcc dot gnu dot org
- Date: Wed, 26 Dec 2001 17:01:03 +0000
- Subject: Re: bootstrap/5187: gcc 3.0.3 fails to bootstrap on Sun Ultra 60with Solaris 8
- References: <Pine.LNX.firstname.lastname@example.org>
I reported problems compiling gcc-3.0.3 on a Sun Ultra 60 (Solaris 8, 2 x 300
MHz CPUs, 768 Mb RAM). The reason for the failure to bootstrap has now be found.
gcc required autogen to be installed, despite the fact the configure script does
not check for autogen. Anyway, after installing autogen-5.2.12 (which needed
guile-1.4), it was possible to bootstrap gcc-3.0.3. (I've built other versions
of gcc, including 3, 3.0.1 and 3.0.2 without needing autogen).
A couple of people suggested my problems may have been related to the fact that
I had built gcc in the same directory as where all the sources were. So I tried
again to build gcc, this time in a different different directory. It again would
not build without autogen being present. I'm not using sh, but tcsh.
If, and only if, autogen is installed, it is then possible to bootstrap gcc.
However, as I pointed out to Paolo Carlini, the installation then fails. I did
something like this - I'm not copying this verbatum, but it should be 99.9%
right. Note I upgraded the sources from 3.0.2 to 3.0.3 with a diff file that I
downloaded, rather than download gcc-3.0.3 as sources - I only have a 56 k
# cd /usr/local/src
# gtar xvfz /downloads/gcc-3.0.2.tar.gz
# cd gcc-3.0.2
# /usr/local/bin/patch -p1 < /downloads/gcc-3.0.2-3.0.3.diff
# cd /usr/local/src
# mv gcc-3.0.2 gcc-3.0.3 (since I had patched the sources to 3.0.3, I renamed
# mkdir gcc-3.0.3-compile-with-gcc-2.95.3
# cd gcc-3.0.3-compile-with-gcc-2.95.3
# make bootstrap
As I said, gcc now bootstraps properly, after the installation of autogen. But
it does *not* install properly:
# make install
# setenv PATH /usr/local/stow/gcc-3.0.3-compile-with-gcc-2.95.3/bin:$PATH
# setenv LD_LIBRARY_PATH
# which gcc
# gcc -v
Using builtin specs.
Configured with: ../gcc-3.0.3/configure
--prefix=/usr/local/stow/gcc-3.0.3-compile-with-gcc-2.95.3 : (reconfigured)
Thread model: posix
gcc version 3.0.3
After creating a small test file, test.c, it is impossible to compile test.c.
# gcc test.c
gcc: installation problem, cannot exec `cc1': No such file or directory
Since cc1 was not found, but cc1 was at
a symbolic link was made to the same place as the gcc driver, so cc1 was in the
path. I note however, that cc1 was never in the path for any other builds of
gcc. Anyway, I did this with:
# ln -s
At this point, gcc version 3.0.3 will compile a programme
# gcc -c test.c (this compile only stage works okay).
but the programme will not link.
# gcc test.c (compiles and link in one go fails).
ld: fatal: file crt1.o: open failed: No such file or directory
Given that gcc-3.0.3 could create an object file (after cc1 was put in the
path), I decided to try to link the object file with Sun's linker /usr/ucb/ld.
# ld test.o
So after some hacking, I can produce an executable, that runs, but then produces
a segmentation fault error.
I've also build gcc-3.0.3 using Sun's cc compiler (cc-5.0). This is not the
latest version of Sun's compiler, but it not that old - distributed with the
original release of Solaris 8 in Jan 2000. The results are *exactly* the same.
So in summary, these are my finding with gcc-3.0.3 on a Sun Ultra 60. Note I am
not trying to build a 64-bit gcc.
1) Initial failure to bootstrap, due to lack of autogen on my system.
2) configure script does not check for autogen, yet autogen is needed.
3) After installation of autogen, it is possible to bootstrap gcc-3.0.3 using
either gcc-2.95.3 or Sun's cc-5.0
4) 'make install' will produce a compiler that is unable to compile any
programmes, as it complains cc1 is missing.
5) After putting cc1 in the search path, gcc-3.0.3 is able to compile
programmes, but linking does not occur, since crt1.o is not found.
6) After trying to manually link the object file created in step 4, an
executable was produced, but although this ran, and produced the expected output
(hello world) it produced a segmentation fault.
Dr. David Kirkby Ph.D,
former email address: email@example.com
web page: http://www.david-kirkby.co.uk/
Amateur radio callsign: G8WRB