Building GCC 3.4.5 on Solaris 2.10 Configure line: configure --prefix=/usr/local --enable-languages=c,c++ Directory: gcc-3.4.5/build/gcc Triggering line: /opt/apps/src/gcc-3.4.5/build/gcc/xgcc -B/opt/apps/src/gcc-3.4.5/build/gcc/ -B/usr/local/sparc-sun-solaris2.10/bin/ -B/usr/local/sparc-sun-solaris2.10/lib/ -isystem /usr/local/sparc-sun-solaris2.10/include -isystem /usr/local/sparc-sun-solaris2.10/sys-include -c -o crt1.o -x assembler-with-cpp ../../gcc/config/sparc/sol2-c1.asm Compiler Output: cc1: internal compiler error: Bus Error Please submit a full bug report, with preprocessed source if appropriate. Preprocessed source: None available from -save-temps
Please try again, GCC 3.4.5 is known to bootstrap fine on SPARC/Solaris 10. If it's reproducible, post a backtrace at the crashpoint.
Backtrace will take a few days - I'm on a deadline to get this system installed, so right now I'm compiling 3.4.4 and hoping it doesn't have the same bug. Once the system's ready, I'll re-try compiling 3.4.5
> Backtrace will take a few days - I'm on a deadline to get this system > installed, so right now I'm compiling 3.4.4 and hoping it doesn't have > the same bug. Well, unless proven otherwise, GCC 3.4.5 has no bug either. hikaru% uname -a SunOS hikaru 5.10 Generic sun4u sparc SUNW,Sun-Fire-V240 hikaru% gcc/xgcc -v Using built-in specs. Configured with: /home/eric/gcc-3.4.5/configure --prefix=/usr/local --enable-languages=c Thread model: posix gcc version 3.4.5 > Once the system's ready, I'll re-try compiling 3.4.5 Thanks.
Well, 3.4.4 craps out on the same file, unable to malloc after exhausting the 8Gb swap space. Note that the difference between your system and this one is I have "--enable-languages=c,c++". I do have a running gcc 3.4.4 on the same system where I only had "--enable-languages=c" -bash-3.00$ /usr/local/bin/gcc -v ## Running version Reading specs from /usr/local/lib/gcc/sparcv9-sun-solaris2.10/3.4.4/specs Configured with: ./configure --prefix=/usr/local --enable-languages=c sparcv9-sun-solaris2.10 Thread model: posix gcc version 3.4.4 -bash-3.00$ uname -a SunOS challenger 5.10 Generic_118822-20 sun4u sparc SUNW,Ultra-250 Line that dies: /opt/apps/src/gcc-3.4.4/build/gcc/xgcc -B/opt/apps/src/gcc-3.4.4/build/gcc/ -B/usr/local/sparc-sun-solaris2.10/bin/ -B/usr/local/sparc-sun-solaris2.10/lib/ -isystem /usr/local/sparc-sun-solaris2.10/include -isystem /usr/local/sparc-sun-solaris2.10/sys-include -c -o crt1.o -x assembler-with-cpp ../../gcc/config/sparc/sol2-c1.asm cc1: out of memory allocating 134217728 bytes after a total of 9127182336 bytes gmake[1]: *** [crt1.o] Error 1 gmake[1]: Leaving directory `/opt/apps/src/gcc-3.4.4/build/gcc' gmake: *** [all-gcc] Error 2 I will try re-configuring this 3.4.4 with sparcv9-sun-solaris2.10 instead of sparc-sun-solaris and see if that makes a difference.
> Note that the difference between your system and this one is I have > "--enable-languages=c,c++". That doesn't matter here. > I will try re-configuring this 3.4.4 with sparcv9-sun-solaris2.10 instead of > sparc-sun-solaris and see if that makes a difference. Of course, that makes a big difference! sparc-sun-solaris2.9 is a 32-bit compiler while sparcv9-sun-solaris2.10 is a 64-bit compiler, you cannot compile one with the other, you need to specify either CC="gcc -m32" or CC="gcc -m64" at configure time.
Well, I tried 'configure sparcv9-sun-solaris2.10' and it crashed on the same file I tried 'CC="gcc -m64" configure sparcv9-sun-solaris2.10' and it still crashed on the same file. I'm beginning to think I imagined ever compiling gcc on this box! :)
> I'm beginning to think I imagined ever compiling gcc on this box! :) What happens if you bootstrap the sparc-sun-solaris2.10 compiler? CC="gcc -m32" $(scrdir)/configure sparc-sun-solaris2.10 --prefix=... gmake bootstrap
The 64-bit compiler: hikaru% gcc/xgcc -v Using built-in specs. Configured with: /home/eric/gcc-3.4.5/configure sparc64-sun-solaris2.10 --prefix=/usr/local --enable-languages=c Thread model: posix gcc version 3.4.5
> The 64-bit compiler: ...under another name: hikaru% gcc/xgcc -v Using built-in specs. Configured with: /home/eric/gcc-3.4.5/configure sparcv9-sun-solaris2.10 --prefix=/usr/local --enable-languages=c Thread model: posix gcc version 3.4.5
Well, after about ten tries, I got it to all compile. The magic required was: 1. Ensure bintools was in path before /usr/ccs/bin 2. Remove gnu ld from system 3. CFLAGS='-m64' configure --disable-multilib --enable-languages=c,c++ sparcv9-sun-solaris2.10 4. gmake I disabled multilib because otherwise it tried to compile sparcv7 with 'xgcc ... -m32 -m64', requiring too many manual changes of config.status and resulting Makefile's I guess my final point is that if configure sees that it's on Solaris 2.10 with a v9 processor, shouldn't it at least guess 'sparcv9-sun-solaris2.10' as the triplet instead of the generic 'sparc-sun-solaris', especially since I hadn't specified --host, --target or --build?
> The magic required was: > > 1. Ensure bintools was in path before /usr/ccs/bin What is bintools? > 2. Remove gnu ld from system > 3. CFLAGS='-m64' configure --disable-multilib --enable-languages=c,c++ > sparcv9-sun-solaris2.10 Setting CFLAGS on the configure line is a _recipe_for_disaster_, only CC should be set. > I disabled multilib because otherwise it tried to compile sparcv7 with 'xgcc > ... -m32 -m64', requiring too many manual changes of config.status and > resulting Makefile's !??? See above. > I guess my final point is that if configure sees that it's on Solaris 2.10 > with a v9 processor, shouldn't it at least guess 'sparcv9-sun-solaris2.10' > as the triplet instead of the generic 'sparc-sun-solaris', especially since I > hadn't specified --host, --target or --build? No, the canonical target triplet is always sparc-sun-solaris2.* on Solaris as the default architecture is V8. I'm really puzzled by all this mess, you're the first one who reported that.