- To: Jens Bauer <jens@xxxxxxxxx>
- Subject: Re: malloc error when compiling insn-attrtab.c
- From: Jonathan Wakely <jwakely.gcc@xxxxxxxxx>
- Date: Sun, 11 Mar 2012 13:01:01 +0000
- Cc: gcc-help@xxxxxxxxxxx
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1332075680; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=vntnT7pOXqt79loe2wpi0j8ovRY=; b=FzAPwuKG/xGK+yS yyx9e+MudPSdvvRXHSsSqFsiNAY6VaFyQ80F58QfXhI9KrB+uwgKSG3DCbhV2dhe OH3pXiK8Yi4ZX62eZh1e+fsf5gJqR/NNiSMTYLp1e8fLh8EFiilImdU4ds2G2njr vY1qTJMEZiYQAjjyd1TfLAHMVcco=
- In-reply-to: <20120311041516680518.beed000f@plustv.dk>
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.
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]