From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) by sourceware.org (Postfix) with ESMTPS id 93D2F3851C24 for ; Fri, 10 Jun 2022 15:06:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 93D2F3851C24 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=INAP7c3rbzY1sXnhbZn0ZmyjWgxXGJwCeroehp92RDs=; t=1654873563;x=1655478963; b=sVVygM2RrroTBQYQfloWnT+rxkyUt5ZmKq0GscaWk+MFpNGvWl/0g9ii9ZTnKt+Tbf8d4Iea3AYQ8cjp49AS5hQmOG+4IwPA5D0TXqEkdRZlLm0U7RCx6UkMsRC4eWatVc4DVRLfqmLd9eYXEdVXimdNPJhoz+QyYxnVnb/xv+FdknIFsU92h9iFJlis8tk9aR7Kwip4zP0RMqXN260xYLgKr8bgfcM3LqM8SGvUTvD+Bgd3BfGMDAwjZLdwjX3RG33i1sNfXMGhVacMqaWZ9Qyr2h3evpDKdJWI+vZ5esFT8fdUN3FZb3KhpQWpU9Nu93ruyRMe0pUTyADCfCV2+A==; Received: by smtp55.i.mail.ru with esmtpa (envelope-from ) id 1nzgD3-0006sC-KT; Fri, 10 Jun 2022 18:06:02 +0300 Subject: Re: Out of memory while building GCC 12.1.0 To: Jonathan Wakely Cc: Xi Ruoyao , gcc-help References: <6af5f478-817e-ecdc-174f-cfd8dd6c0376@mail.ru> <996468e7556a34c30413aaa977e9f26688be8c93.camel@xry111.site> From: Fiodar Stryzhniou Message-ID: Date: Fri, 10 Jun 2022 18:06:00 +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: smtp55.i.mail.ru; auth=pass smtp.auth=fedor_qd@mail.ru smtp.mailfrom=fedor_qd@mail.ru X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD97D44297578DBEB86125514212DDDA19BCD36CB7CF205A9D0182A05F538085040FB7B25F1283B5146CFA309A34B2BCD4BB236BDCD53215B1F63C1E05A601C27FE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE762F001A90027CA0CC2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE757F64E7FD849EB4FEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BEBC5CAB6D411FFA665AC5458293400668AD609C3E689EDCD20879F7C8C5043D14489FFFB0AA5F4BF176DF2183F8FC7C058C1844A7A85E7B68941B15DA834481FA18204E546F3947C744B801E316CB65FF6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F79006370BDB19F53EE528DD389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F7900637D7B0C790A4C0DD85D81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE7ABABD2C3E8B7AE3BEC76A7562686271EEC990983EF5C03292E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C30584FF81F342DA0735872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: 0D63561A33F958A5EF21A2D8F64A2178A3B058F4A8305E8F16212E1AC4018675D59269BC5F550898D99A6476B3ADF6B4886A5961035A09600383DAD389E261318FB05168BE4CE3AF X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340A58BF0C7EAC340FBE5376FD8521D18C36A910ED0019FEF119A940C6A61998BB26C26644591B1C831D7E09C32AA3244C369EF4D928531D1F21AD809167A2DD0AF165894D92D62706FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj/W+skaHQI8P5ih4AB6BJ0Q== X-Mailru-Sender: B5420D632883B294CF6673AD81AF0FB6CD08CBCCEE657AD41279A73979D4608BE2527C969975515C2B4E3A9B39D17ED8FB559BB5D741EB9638645ACA06CB6E346F53C80213D1719C67EA787935ED9F1B X-Mras: Ok X-Spam-Status: No, score=-0.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_NONE, 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 15:06:08 -0000 6/10/22 у 3:42 PM Jonathan Wakely напісаў: > On Fri, 10 Jun 2022 at 13:29, Fiodar Stryzhniou wrote: >> >> 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. > > Thousands and thousands of people have built GCC 12.1.0 successfully. > If you think you've found a fork bomb in the build process that nobody > else has seen, it's probably a problem with your commands, not GCC. > My apologies. -- Fiodar Stryzhniou