From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 6BEFC38376C0 for ; Fri, 10 Jun 2022 12:18:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6BEFC38376C0 Received: by mail-wr1-x42d.google.com with SMTP id o16so2569148wra.4 for ; Fri, 10 Jun 2022 05:18:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Cx4dWPkZES0pKRc6qK36vHy5WdVlrPiXWC/puUwS8sQ=; b=JLfJ7Eu785h2niJISO3dqCafiCXOtX/O/cSXymvyfpaF01gkuZP/us/jBqdoENS0xR 78PBt8uDa5AR1/7PRaFbD3ERNCS2DZ78PxjF5hDIYjmHH+PwKT2IhgfJXOIItw968G7+ mpnfwJWtxIT5dIwYsqX0B+RRvJfnKNyDhPSXTWouRUdev7wuLcy0K5QFFBV2RVAMpYNL GTuKI6isWngzhami//KfuvK8G6U++zguL2X76+xDVA4ampzAzd5c2cxUlXO15FM6Vb8i 11QkPf40kz9w4IrLc3GvlFcxTUpplL7LTIPPyFbq3qGtkaEyqhYeI1sr3iS7kEXGXdE/ DQMA== X-Gm-Message-State: AOAM5333n8DSXd2/TDA1vO0/7MzJaMRXxe4+RhX+TGiPp+240n2ha3i5 bpKJ8Zm3gcdNWdXdW/vxvQqu+SizJIR7MAYlv0A= X-Google-Smtp-Source: ABdhPJwXhA7P1P6DVP4EBwle+LxALDXcNDNBcnB2B4FypM2ERKY+N9nRMqxn4CZfVb6E7OnZZrNL8+bdc2EU/qjwQas= X-Received: by 2002:a05:6000:1847:b0:218:4336:5590 with SMTP id c7-20020a056000184700b0021843365590mr25371343wri.511.1654863531962; Fri, 10 Jun 2022 05:18:51 -0700 (PDT) MIME-Version: 1.0 References: <6af5f478-817e-ecdc-174f-cfd8dd6c0376@mail.ru> <996468e7556a34c30413aaa977e9f26688be8c93.camel@xry111.site> In-Reply-To: <996468e7556a34c30413aaa977e9f26688be8c93.camel@xry111.site> From: Jonathan Wakely Date: Fri, 10 Jun 2022 13:18:40 +0100 Message-ID: Subject: Re: Out of memory while building GCC 12.1.0 To: Xi Ruoyao Cc: Fiodar Stryzhniou , gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2022 12:18:55 -0000 On Fri, 10 Jun 2022 at 13:15, Xi Ruoyao via Gcc-help 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 > School of Aerospace Science and Technology, Xidian University