public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Dr. David Kirkby" <drkirkby@ntlworld.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: bootstrap/5187: gcc 3.0.3 fails to bootstrap on Sun Ultra 60with Solaris 8 Date: Wed, 26 Dec 2001 09:06:00 -0000 [thread overview] Message-ID: <20011226170601.2878.qmail@sources.redhat.com> (raw) The following reply was made to PR bootstrap/5187; it has been noted by GNATS. From: "Dr. David Kirkby" <drkirkby@ntlworld.com> To: Jeff Sturm <jsturm@one-point.com>, Paolo Carlini <pcarlini@unitus.it>, gcc-help <gcc-help@gcc.gnu.org>, gcc-gnats@gcc.gnu.org Cc: Subject: Re: bootstrap/5187: gcc 3.0.3 fails to bootstrap on Sun Ultra 60with Solaris 8 Date: Wed, 26 Dec 2001 17:01:03 +0000 Hi, 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 modem! # 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 them) # mkdir gcc-3.0.3-compile-with-gcc-2.95.3 # cd gcc-3.0.3-compile-with-gcc-2.95.3 # ../gcc-3.0.3/configure --prefix=/usr/local/stow/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 /usr/local/stow/gcc-3.0.3-compile-with-gcc-2.95.3/lib:$LD_LIBRARY_PATH # rehash # which gcc /usr/local/stow/gcc-3.0.3-compile-with-gcc-2.95.3/bin/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 /usr/local/stow/gcc-3.0.3-compile-with-gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.8/3.0.3/cc1 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 /usr/local/stow/gcc-3.0.3-compile-with-gcc-2.95.3/lib/gcc-lib/sparc-sun-solaris2.8/3.0.3/cc1 /usr/local/stow/gcc-3.0.3-compile-with-gcc-2.95.3/bin 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 # ./a.out Hello world Segmentation fault 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, email: drkirkby@ntlworld.com former email address: davek@medphys.ucl.ac.uk web page: http://www.david-kirkby.co.uk/ Amateur radio callsign: G8WRB
reply other threads:[~2001-12-26 17:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20011226170601.2878.qmail@sources.redhat.com \ --to=drkirkby@ntlworld.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).