From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +N4tMmT15GQRVAEASxT56A (envelope-from ) for ; Tue, 22 Aug 2023 19:50:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MBIdMmT15GRy5gAA9RJhRA (envelope-from ) for ; Tue, 22 Aug 2023 19:50:28 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4F4A3486A8 for ; Tue, 22 Aug 2023 19:50:28 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UDsu5ICy; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692726628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=JZJ/G73ZQRytXVucXZeflULlfHeFU82PKTgmSzUyVCA=; b=tLNGGkmwsZcA9huR3XFXoyBkr0Y75JEE6kJiruQZzARmGhuZDY9CkPgyBdUqnkE3ZcVS3O 3WLy3jnoYmV/zPbqq00d794i2V6NbjTyCGcVUsnHGrYk/z5E1AWbUQ5RLi/WItaDZRI5xx KM8NWSDrHEd5A5x/SMDWUuil5h7E3mjO0N9aBYfF7boyltNGTZjbWT+9n69gjK/DBVYbOR Etwt6Jvp5MhIlIW3tENpCsXskX/Wmaa5YuXTh5q3BEAD+whl9bKU1FQZTuHMb3h+v1afVk BjG5jHIWa+9ev/NcHpgWll5/HdaQlhSCGWQdneHKMBr8KEg9PSnOlb21QLokIA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692726628; a=rsa-sha256; cv=none; b=FhaTJ8umxA4Bv+ZKEitiB+V9eIMlHXTBQf1iyGq4lX1W2h52qWdLJmXGP1Arb2riA0Bcjq 7JEAZAW5hMksgnInpUVH++1wwPXVZKbuyVur2djmcJtK02vimLQ01ehLJM8Q+E9NmSZCXX KpeBvYkvQn9Uxqg5SV0AvZxxg1ORCCiIlIzauVyRY+NDT2covU3tCqurlGbL7kmONuawBo Y4HgQlL/yOohhj18jdHsL1aaZVTMkZ3U9Drxopc9dF5zllvLL/EzweNfNEYXfx3l+l9qMu v9zDYGSSO8PoxeBFYiRugHdDgjRuMx6mrdhOZ28zIiC34qvv68PB+66Iu0JykA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=UDsu5ICy; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYVW1-0001fs-LA; Tue, 22 Aug 2023 13:50:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYVW0-0001fW-DB for bug-guix@gnu.org; Tue, 22 Aug 2023 13:50:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYVVz-0003fO-Ax; Tue, 22 Aug 2023 13:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYVVy-0003J2-JB; Tue, 22 Aug 2023 13:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65456: [PATCH v2 2/2] self: Build gnu/packages/*.go in 26 steps. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, bug-guix@gnu.org Resent-Date: Tue, 22 Aug 2023 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65456 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 65456@debbugs.gnu.org Cc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 65456-submit@debbugs.gnu.org id=B65456.169272655812642 (code B ref 65456); Tue, 22 Aug 2023 17:50:02 +0000 Received: (at 65456) by debbugs.gnu.org; 22 Aug 2023 17:49:18 +0000 Received: from localhost ([127.0.0.1]:60453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYVVF-0003Hk-OG for submit@debbugs.gnu.org; Tue, 22 Aug 2023 13:49:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYVVD-0003HQ-LO for 65456@debbugs.gnu.org; Tue, 22 Aug 2023 13:49:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qYVV5-0003a3-9D; Tue, 22 Aug 2023 13:49:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=JZJ/G73ZQRytXVucXZeflULlfHeFU82PKTgmSzUyVCA=; b=UDsu5ICy2s0gipw7m9Of Vt5rv4Zo82ezcENlKkcdeZVQVy1w9tNQPLNa6nG2+2F6TP4DnhT8T0puL9g+umylXonkomTlVScy/ zzpUmZSZZv8p6kHw9TF2M410dRe/ecwlVevORx3bbrGOOFrKbmam6TO1Trt1+jvXvLb6QRWEopxyT BmWHYCdqBu2pi8VaAMGAbQtEJTj7xsm5CD91npPw0CLt9B74KNLS9xifdBSV8G7S4vI8NUPjlufIH YlEctc6yoGPzyhEvGFN5fjHRWy2BerX1jpHKfqG/EOEdBOOcUbK2gSw/ycwnlkDDdAQQGhnJ4r7BC CXy5TDP9dRFoSg==; From: Janneke Nieuwenhuizen Date: Tue, 22 Aug 2023 19:49:01 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <99867a1bd9869a0fb0f3beacaaec9cec9090cb1e.1692726496.git.janneke@gnu.org> References: <99867a1bd9869a0fb0f3beacaaec9cec9090cb1e.1692726496.git.janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.41 X-Spam-Score: -4.41 X-Migadu-Queue-Id: 4F4A3486A8 X-Migadu-Scanner: mx1.migadu.com X-TUID: tth/l26n2qTu Similar to the Makefile.am change, this breaks-up gnu/packages into 26 chunks when building on 32bit. Also force garbage collection. * guix/self.scm (compiled-modules)[process-directory]: Split building of "gnu/packages" into 26 chunks. --- guix/self.scm | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/guix/self.scm b/guix/self.scm index 81a36e007f..151fa9f452 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017-2023 Ludovic Courtès ;;; Copyright © 2020 Martin Becze +;;; Copyright © 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -1210,9 +1211,12 @@ (define* (compiled-modules name module-tree module-files '((guix build compile) (guix build utils))) #~(begin - (use-modules (srfi srfi-26) + (use-modules (srfi srfi-1) + (srfi srfi-26) + (srfi srfi-71) (ice-9 match) (ice-9 format) + (ice-9 regex) (ice-9 threads) (guix build compile) (guix build utils)) @@ -1244,12 +1248,27 @@ (define* (compiled-modules name module-tree module-files (force-output)) (define (process-directory directory files output) - ;; Hide compilation warnings. - (parameterize ((current-warning-port (%make-void-port "w"))) - (compile-files directory #$output files - #:workers (parallel-job-count) - #:report-load report-load - #:report-compilation report-compilation))) + ;; Split gnu/packages in 26 chunks to avoid OOM errors + (let* ((chunks (map (compose + (cute partition <> files) + (lambda (regex) + (cute string-match regex <>)) + (cute string-append "^gnu/packages/" <>) + (cute make-string 1 <>) + integer->char + (cute + (char->integer #\a) <>)) + (iota 26))) + (chunks (filter pair? chunks))) + (for-each + (lambda (chunck) + (parameterize ((current-warning-port (%make-void-port "w"))) + ;; Hide compilation warnings. + (compile-files directory #$output chunck + #:workers (parallel-job-count) + #:report-load report-load + #:report-compilation report-compilation)) + (gc)) + chunks))) (setvbuf (current-output-port) 'line) (setvbuf (current-error-port) 'line) -- 2.41.0