From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp33.i.mail.ru (smtp33.i.mail.ru [94.100.177.93]) by sourceware.org (Postfix) with ESMTPS id 51FCA3846060 for ; Fri, 10 Jun 2022 12:29:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 51FCA3846060 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=mail.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mail.ru DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail4; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=g+VNC2wua5MEZNa5QBi78yVYVXO8F4/8asXmujTo9fI=; t=1654864153;x=1655469553; b=QqGdBxNvc+Auebz8LDOMwSZGh0k8wQdmGRvC8xQlo1jX8dStiCF2G+a2n1sPULTgr+qQzQR7kNRQ1zu/0ME/YXO+sqbpSqyrEe28SczLgjGzi6qh73XMWThUD/Mel+5S/1v5o5Juu/cTh+FEkywCPRdAjRyHSudcS2lzOv/93Kky89GVFTyvrA1IEumwzPUEFmpj1zK0KIyxzUgCoXLllVdMHBI0qQd9Do7/UHW/dnmWKLAJCZg8XHIorxNS5FOISRY4nrzPjvIrbIpFt7XD++QUoV4eN2iMhcfkaW95AAMBDP2cgJoTqSgvqd3CSkvS52bNXz+48JGD0A9ofhLbog==; Received: by smtp33.i.mail.ru with esmtpa (envelope-from ) id 1nzdlH-0000d9-AH; Fri, 10 Jun 2022 15:29:11 +0300 Subject: Re: Out of memory while building GCC 12.1.0 To: Jonathan Wakely , Xi Ruoyao Cc: gcc-help References: <6af5f478-817e-ecdc-174f-cfd8dd6c0376@mail.ru> <996468e7556a34c30413aaa977e9f26688be8c93.camel@xry111.site> From: Fiodar Stryzhniou Message-ID: Date: Fri, 10 Jun 2022 15:29:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Authentication-Results: smtp33.i.mail.ru; auth=pass smtp.auth=fedor_qd@mail.ru smtp.mailfrom=fedor_qd@mail.ru X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD97D44297578DBEB86B62F79C7FEB21477876C1A6C9E05F4E9182A05F5380850409A3A6714780789114460890C1E19552858D8E4ECFB8429CBFC788A86900B008C X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE745FA733BE9B630A0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006373BFF7CCD9F2968778638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84FE2F6F381EEFFDC44A1153A941E50E36F9789CCF6C18C3F8528715B7D10C86878DA827A17800CE7A29E2F051442AF778941B15DA834481FA18204E546F3947CD166953D3EA3826BF6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F790063767B9C6E70FBE8DD8389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F79006377B0E5633519ED29AD81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE77A5B27AE295024E1EC76A7562686271EEC990983EF5C03292E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C321259270BBF67A2035872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 9604B64F49C60606AD91A466A1DEF99B296C473AB1E14218C6CDE5D1141D2B1C6E1A2FB270E17B102FEAB99A657D9F9520D539D462AADD57AD91A466A1DEF99B296C473AB1E14218B936CB490224F2464EEA7BD89490CAC0EDDA962BC3F61961 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34EE19B6E2433CA093CBE6F960DC984CC3DD8CBF165C0C717BB7438E3E8ECC13E87B413DB25C332FCF1D7E09C32AA3244CEFB2EFF6AD5D929AD6C433E3359E73003A92A9747B6CC886FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj/W+skaHQI8MM1gcwQ3kO1Q== X-Mailru-Sender: B5420D632883B294CF6673AD81AF0FB6816E6344825E4CFD407891A879957C9FE2527C969975515C2B4E3A9B39D17ED8FB559BB5D741EB9638645ACA06CB6E346F53C80213D1719C67EA787935ED9F1B X-Mras: Ok X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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:29:15 -0000 6/10/22 у 3:18 PM Jonathan Wakely напісаў: > 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 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 >> School of Aerospace Science and Technology, Xidian University Looks like you right. Harcoded to -j6 helps. -- Fiodar Stryzhniou