On 11 March 2012 03:15, Jens Bauer wrote: > Hi, > > I'm having so much trouble compiling gcc-4.6.x (4.6.1, 4.6.2, 4.6.3). > > A malloc error occurs when I try to compile 'insn-attrtab.c'. > > Here's the last output from my build. > ---8<-----8<-----8<----- > gcc -m32 -c -I/Users/toolchain/arm-toolchain/Source/gmp-5.0.2 -I/Users/toolchain/arm-toolchain/Source/mpfr-3.0.1 -I/Users/toolchain/arm-toolchain/Source/mpc-0.9 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H -I. -I. -I/Users/toolchain/arm-toolchain/Source/gcc-4.6.1/gcc -I/Users/toolchain/arm-toolchain/Source/gcc-4.6.1/gcc/. -I/Users/toolchain/arm-toolchain/Source/gcc-4.6.1/gcc/../include -I/Users/toolchain/arm-toolchain/Source/gcc-4.6.1/gcc/../libcpp/include -I/Users/toolchain/arm-toolchain/Packages/gmp/usr/local/myPkg/include -I/Users/toolchain/arm-toolchain/Packages/mpfr/usr/local/myPkg/include -I/Users/toolchain/arm-toolchain/Packages/mpc/usr/local/myPkg/include -I/Users/toolchain/arm-toolchain/Source/gcc-4.6.1/gcc/../libdecnumber > -I/Users/toolchain/arm-toolchain/Source/gcc-4.6.1/gcc/../libdecnumber/dpd -I../libdecnumber insn-attrtab.c -o insn-attrtab.o > cc1(36717) malloc: *** mmap(size=1424994304) failed (error code=12) > *** error: can't allocate region > *** set a breakpoint in malloc_error_break to debug > > cc1: out of memory allocating 1424991708 bytes after a total of 0 bytes It shouldn't be trying to allocate that much, it looks like an overflow, or a negative number wrapping to a very large unsigned one. > make[1]: *** [insn-attrtab.o] Error 1 > make: *** [all-gcc] Error 2 > --->8----->8----->8----- > > My computer is a PowerMac G5, I'm running Mac OS X 10.5.8; I have nothing 'newer', so I can't try it on an intel based machine. > I use gcc-4.2 (which does _not_ work the same as gcc-4.2 on intel, so it might work fine on intel, even though it fails on PowerPC). > > I can compile gcc 4.3.x up to 4.5.x (all inclusive), but 4.6.x is giving me trouble. > Does anyone know how to get me going ? Since the problem may be in the GCC 4.2 you got from Apple, have you tried using a different compiler to build 4.6? I would try using GCC 4.5, which you can build successfully.