Re: Out of memory while building GCC 12.1.0

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

 



6/10/22 у 3:18 PM Jonathan Wakely напісаў:
On Fri, 10 Jun 2022 at 13:15, Xi Ruoyao via Gcc-help
<gcc-help@xxxxxxxxxxx> wrote:

On Fri, 2022-06-10 at 14:55 +0300, Fiodar Stryzhniou wrote:

/* snip */

g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
/bin/bash: line 2: 17472 Killed                  build/genautomata
../../gcc-12.1.0/./gcc/common.md
../../gcc-12.1.0/./gcc/config/arm/arm.md insn-conditions.md >
tmp-automata.cc
g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** Deleting file 'doc/gccint.info'
make[2]: *** [Makefile:2492: s-attrtab] Interrupt
make[2]: *** [Makefile:1143: c/c-lang.o] Interrupt
make[2]: *** [Makefile:1143: c-family/stub-objc.o] Interrupt
make[2]: *** [Makefile:1143: attribs.o] Interrupt

/* snip */

make[2]: *** [Makefile:1143: gimple-ssa-warn-access.o] Interrupt
make[2]: *** [Makefile:1143: gimple-ssa-warn-restrict.o] Interrupt
make[2]: *** [Makefile:1143: gimple-ssa-warn-alloca.o] Interrupt
make[2]: *** [Makefile:2475: s-automata] Interrupt
make[2]: *** [Makefile:3406: doc/gccint.info] Interrupt
make[2]: *** Deleting intermediate file 'gcc.pod'
make[1]: *** [Makefile:4620: all-gcc] Interrupt
make: *** [Makefile:1035: all] Interrupt

Looks like fork-bomb.

I have 8Gb ram. Adding 10Gb swap doesn't help.

Here mine shell script used for easy gcc build -
https://github.com/fedor4ever/GCC4Symbian.

It looks like you are using "make -j" without a number somehow.  Then
make will attempt to fork as many parallel jobs as possible. Recheck
your script.

Yes, I think the problem is here:
https://github.com/fedor4ever/GCC4Symbian/blob/master/build-toolchain.sh#L35
Defaul value here:
https://github.com/fedor4ever/GCC4Symbian/blob/master/build-toolchain.sh#L25

If you don't set that variable it will try to compile every file at
once. Either set the variable, or fix your script to use a sensible
default like -j"${NUMBER_OF_PROCESSORS:-1}"



--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University

Looks like you right. Harcoded to -j6 helps.

--
Fiodar Stryzhniou



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

  Powered by Linux