SUMMARY : the stage 2 compiler produces the wrong binary type for this machine
I did further digging and built my own libiconv and installed that into my own isolated "local" directory at $HOME/local then I destroyed my previous stage 1 work and started over again thus : bash-3.2$ date Thu Jul 26 21:20:30 EDT 2007 bash-3.2$ 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 --enable-languages=c,c++,objc,fortran --with-gmp=/export/h ome/dclarke/local --with-mpfr=/export/home/dclarke/local --enable-bootstrap eventually I run make and hours later I see the same error as before : 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$ date Fri Jul 27 01:02:05 EDT 2007 bash-3.2$ bash-3.2$ so this time I go hunting for that config.log with the non-zero exit status and find it at ./intl/config.log http://www.blastwave.org/dclarke/gcc-4.2.1/intl_config_log.txt the devil is in the details and there we see : configure:2121: /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/ -g -O2 -I/export/home/dclarke/local/include conftest.c >&5 configure:2124: $? = 0 configure:2170: result: a.out configure:2175: checking whether the C compiler works configure:2181: ./a.out ./a.out: syntax error at line 1: `(' unexpected configure:2184: $? = 2 configure:2191: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. that error seems to scream to me that the output binary a.out can not be executed because it is for the wrong processor target. This should create output for Sparc V7 ( old old generic ) but the binary must be for sparcv8a or similar. In either case I think that the --host needs to be specified as well as perhaps --with-cpu=foo or something like that in the ./configure line. Now that I check http://gcc.gnu.org/install/configure.html there is no --host option to give to configure so .. I am stumped again. here is the proof of the problem. I run the compile of hello.c and we see the error : bash-3.2$ /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/ -g -O2 -I/export/home/dclarke/local/include -o /tmp/a.out /tmp/hello.c bash-3.2$ file /tmp/a.out /tmp/a.out: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped that is the wrong binary for these old Sparc processors. bash-3.2$ /tmp/a.out bash: /tmp/a.out: cannot execute binary file Of course not. The machine needs a plain old Sparc v7 binary and this will simply not work. what options do I need to set on the configure line in order for this to work? I don't see a --host option and I am not certain if setting CFLAGS will enforce this during a bootstrap. any help .. would be great now that I identified the symptoms of the problem. Dennis