This is the mail archive of the 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: GCC 4.2.1 : bootstrap fails at stage 2. Anyone know why ?

> On 26 July 2007 03:09, Dennis Clarke wrote:
>> The configure line for GCC 4.2.1 looks like so :
>> bash-3.2$ /export/home/dclarke/build/gcc-4.2.1/configure
>> --with-as=/usr/ccs/bin/as --without-gnu-ld --with-ld=/usr/ccs/bin/ld
>> --enable-threads=posix --disable-nls --prefix=/export/home/dclarke/local
>> --with-local-prefix=/export/home/dclarke/local --enable-shared
>> --with-libiconv-prefix=/opt/csw --enable-languages=c,c++,objc,fortran
>> --with-gmp=/export/home/dclarke/local
>> --with-mpfr=/export/home/dclarke/local
>> --enable-bootstrap
>   All looks reasonable so far.

 You know, I was hoping you would say that :-)

>> The process seems to run fine and configure does what it does.  I issue
>> make
>> ( which is really GNU make that I built previously ) and things grind away
>> for a long long time until this appears :
>> checking for msgmerge... no
>> checking for sparc-sun-solaris2.8-gcc...
>> /opt/build/gcc-4.2.1-build/./prev-gcc/xgcc
>> -B/opt/build/gcc-4.2.1-build/./prev-gcc/
>> -B/export/home/dclarke/local/sparc-sun-solaris2.8/bin/
>> checking for C compiler default output file name... a.out
>> checking whether the C compiler works... configure: error: cannot run C
>> compiled programs.
>> If you meant to cross compile, use `--host'.
>> See `config.log' for more details.
>> make[2]: *** [configure-stage2-intl] Error 1
>> make[2]: Leaving directory `/opt/build/gcc-4.2.1-build'
>> make[1]: *** [stage2-bubble] Error 2
>> make[1]: Leaving directory `/opt/build/gcc-4.2.1-build'
>> make: *** [all] Error 2
>> bash-3.2$
>> see this for all the details that follow :
>   Alas, you appear to have shown us the wrong config.log, since it doesn't
> give any detail of that error.

oh .. that explains why I see no error there :-(

> You need to figure out what went wrong with
> the test executable compiled by the stage1 compiler.

OKay ... that would be this guy :

bash-3.2$ pwd

bash-3.2$ prev-gcc/xgcc -v
Using built-in specs.
Target: sparc-sun-solaris2.8
Configured with: /export/home/dclarke/build/gcc-4.2.1/configure
--with-as=/usr/ccs/bin/as --without-gnu-ld --with-ld=/usr/ccs/bin/ld
--enable-threads=posix --disable-nls --prefix=/export/home/dclarke/local
--with-local-prefix=/export/home/dclarke/local --enable-shared
--with-libiconv-prefix=/opt/csw --enable-languages=c,c++,objc,fortran
--with-gmp=/export/home/dclarke/local --with-mpfr=/export/home/dclarke/local
Thread model: posix
gcc version 4.2.1

bash-3.2$ file prev-gcc/xgcc
prev-gcc/xgcc:  ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, not stripped

> Maybe try compiling a
> "Hello World" with it and see what happens.  Since it went wrong in the
> intl/
> subdir, I'd suspect some problem with the libiconv-prefix or disable-nls
> settings.

Now that is excellent thinking.

Let me have a whirl at it :

bash-3.2$ cat /tmp/hello.c
#include <stdio.h>

main(int argc, char *argv[])
    printf ( "Hello World!\n" );
    return (0);

I ran this for just the preprocessed compile stage first :

Then I generate the assembly :

And *that* also looks very good.

This does not look too good :

okay .. so that reveals some info.  I think.


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