[i386, x32] Trouble bootstrapping x86_64-pc-linux-gnux32

Daniel Santos daniel.santos@pobox.com
Mon Aug 14 07:12:00 GMT 2017


On 08/13/2017 05:52 PM, Daniel Santos wrote:
> cc1plus: out of memory allocating 56137200 bytes after a total of
> 3148800000 bytes
> make[3]: *** [Makefile:1104: insn-extract.o] Error 1
> make[3]: *** Waiting for unfinished jobs....

I apparently misunderstood the "after a total of x" part of the message
-- that is indicating the total amount of memory that has been allocated
by the process thus far.  So the problem is that the stage2 link of
libgcc with --enable-checking=yes,rtl just requires more than 4GiB of
memory, which can't be addressed by an x32 process.  This was not the
case with 7.1.0, but maybe more checks have been added and that uses
additional memory?

Anyway, In case it's helpful for anybody, this is the backtrace of the
allocation prior to it failing:

(gdb) bt
#0  __GI___libc_malloc (bytes=56137200) at malloc.c:2905
#1  0x025bc8dc in xmalloc (size=56137200) at
/home/daniel/proj/sys/gcc/head/libiberty/xmalloc.c:147
#2  0x0124ffa7 in (anonymous namespace)::pass_cprop_hardreg::execute
(this=0x32b8e50, fun=0xd359d270) at
/home/daniel/proj/sys/gcc/head/gcc/regcprop.c:1272
#3  0x011c9f23 in execute_one_pass (pass=<opt_pass* 0x32b8e50
"cprop_hardreg"(299)>) at /home/daniel/proj/sys/gcc/head/gcc/passes.c:2495
#4  0x011ca2ac in execute_pass_list_1 (pass=<opt_pass* 0x32b8e50
"cprop_hardreg"(299)>) at /home/daniel/proj/sys/gcc/head/gcc/passes.c:2584
#5  0x011ca2de in execute_pass_list_1 (pass=<opt_pass* 0x32b8a50
"*all-postreload"(-1)>) at /home/daniel/proj/sys/gcc/head/gcc/passes.c:2585
#6  0x011ca2de in execute_pass_list_1 (pass=<opt_pass* 0x32b7e50
"*rest_of_compilation"(-1)>) at
/home/daniel/proj/sys/gcc/head/gcc/passes.c:2585
#7  0x011ca340 in execute_pass_list (fn=0xd359d270, pass=<opt_pass*
0x32b57c0 "fixup_cfg"(94)>) at
/home/daniel/proj/sys/gcc/head/gcc/passes.c:2595
#8  0x00cb317b in cgraph_node::expand (this=<cgraph_node* 0xd359ce58
"insn_extract">) at /home/daniel/proj/sys/gcc/head/gcc/cgraphunit.c:2054
#9  0x00cb384b in expand_all_functions () at
/home/daniel/proj/sys/gcc/head/gcc/cgraphunit.c:2190
#10 0x00cb4469 in symbol_table::compile (this=0xf64f60d8) at
/home/daniel/proj/sys/gcc/head/gcc/cgraphunit.c:2542
#11 0x00cb46d4 in symbol_table::finalize_compilation_unit
(this=0xf64f60d8) at /home/daniel/proj/sys/gcc/head/gcc/cgraphunit.c:2631
#12 0x013c7412 in compile_file () at
/home/daniel/proj/sys/gcc/head/gcc/toplev.c:496
#13 0x013c9c51 in do_compile () at
/home/daniel/proj/sys/gcc/head/gcc/toplev.c:2037
#14 0x013c9f76 in toplev::main (this=0xffffcb20, argc=77,
argv=0xffffcc14) at /home/daniel/proj/sys/gcc/head/gcc/toplev.c:2171
#15 0x024fd468 in main (argc=77, argv=0xffffcc14) at
/home/daniel/proj/sys/gcc/head/gcc/main.c:39




More information about the Gcc mailing list