public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Xi Ruoyao <xry111@xry111.site>
Cc: Fiodar Stryzhniou <fedor_qd@mail.ru>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Out of memory while building GCC 12.1.0
Date: Fri, 10 Jun 2022 13:18:40 +0100	[thread overview]
Message-ID: <CAH6eHdSRqG2zJ5+NMoR1dyLS0N6k+4fw+BuxoNLg9+88UM5B4A@mail.gmail.com> (raw)
In-Reply-To: <996468e7556a34c30413aaa977e9f26688be8c93.camel@xry111.site>

On Fri, 10 Jun 2022 at 13:15, Xi Ruoyao via Gcc-help
<gcc-help@gcc.gnu.org> 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

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@xry111.site>
> School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2022-06-10 12:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 11:55 Fiodar Stryzhniou
2022-06-10 12:14 ` Xi Ruoyao
2022-06-10 12:18   ` Jonathan Wakely [this message]
2022-06-10 12:29     ` Fiodar Stryzhniou
2022-06-10 12:42       ` Jonathan Wakely
2022-06-10 15:06         ` Fiodar Stryzhniou
2022-06-10 14:42       ` Paul Smith
2022-06-10 15:56         ` Segher Boessenkool
2022-06-10 17:04           ` Fiodar Stryzhniou
2022-06-10 17:09           ` Paul Smith
2022-06-10 17:15             ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAH6eHdSRqG2zJ5+NMoR1dyLS0N6k+4fw+BuxoNLg9+88UM5B4A@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=fedor_qd@mail.ru \
    --cc=gcc-help@gcc.gnu.org \
    --cc=xry111@xry111.site \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).