Re: malloc error when compiling insn-attrtab.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi Jonathan,

On Sun, 11 Mar 2012 13:01:01 +0000, Jonathan Wakely wrote:
> On 11 March 2012 03:15, Jens Bauer wrote:
>> 
>> A malloc error occurs when I try to compile 'insn-attrtab.c'.
>> 
>> 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.

I just checked the size of insn-attrtab.c, it's actually 1.4GB! :S

>> 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.

I forgot to mention that this is a cross-compiler I'm building for the ARM target on my Mac.
On my Mac, I have gcc-4.0 and gcc-4.2.
gcc builds fine for ARM, but I do not yet know if it builds for Mac/PowerPC.

2 questions:
1: Wouldn't gcc-4.5 [by default, that is] have the same malloc-problem as 4.2 ?
2: Doesn't Apple compile gcc in a special way, so that it differs from a standard ./configure && make install ?

Anyway, I'm trying (once again) to compile gcc for Mac/PowerPC


Love,
Jens


[Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

Add to Google