From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 WE9mM5Tu5GRbXQEASxT56A (envelope-from ) for ; Tue, 22 Aug 2023 19:21:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sBuOMpTu5GROoQAAG6o9tA (envelope-from ) for ; Tue, 22 Aug 2023 19:21:24 +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 75B1D45726 for ; Tue, 22 Aug 2023 19:21:24 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=LAm+pVOF; 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=1692724884; 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=Ep45t5a10PI/VqpixTSiANIULKoSrJL8Z8rztjhRCGI=; b=fubxRPFHbenwh2i/4GUBEAlDPJklXFtjJUJDKrLM06VqUwoDOJRmrKjXauH7vt9SoNue/4 WLnq3xjy9QDoQ374Is62RbuKgNIAR3OBtzfCbWQAvU4BcSiPtr63L66r/cXctsXAtTybV5 1ykTlG433k3BKtbhHwUNyUYa3Xo/FKLINAUwJIKLwTJAdFdjfAVW1zZPQM4vbAX73NeXwV njaPr3itUHSYgsV4+TASiH21MqzU6tRoRiXSbF0OSx4hBjrpu6BqQCaYGQ7XLM5hUZY7Ln hTbZs5encN8MgK3hMyGHzX4rCNWGRp8SU3oTdJ1fwucM8T1EBbyVwcBLmnhFGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692724884; a=rsa-sha256; cv=none; b=SuhNs/OpYa2KkRqnISjcNc0EwKgjxKtiYE9yQUBdL5czkJyWUl2AZf0iM3lSsH1snJ1zMi bwxDHhFBQ1qKOBWdGEok9kwesWHU4vcCyHrKlyEb+6oMEd1fpgjkFzgfD5CwsqjZXGUEw/ qVg5dS4zRrGCo1L7oskJojM5WVbnxxRZeSri7Cy4LlRApB/IBJvI22z2FZV3PNXiS53b3Z 0gKdJ42UZWCxIsMC6X1sxiln6hTKWHKY7LMxFxHaUtcVOA/Aj2Hdv5O3MYriUnE4+9Nyd4 rizgBrFW6KrWJRQtIQDwJqJjeD0YeIxjPixm2Cy+KR13tNeZcFh/OumNpqtKlA== 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=LAm+pVOF; 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 1qYV40-0001N5-JK; Tue, 22 Aug 2023 13:21:08 -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 1qYV3t-0001Ih-0y for bug-guix@gnu.org; Tue, 22 Aug 2023 13:21:01 -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 1qYV3s-0006NA-Oe; Tue, 22 Aug 2023 13:21:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYV3u-0008M3-PV; Tue, 22 Aug 2023 13:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65456: [PATCH 2/2] self: Build gnu/packages/*.go in 26 steps on 32bit. 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:21: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.169272481232040 (code B ref 65456); Tue, 22 Aug 2023 17:21:02 +0000 Received: (at 65456) by debbugs.gnu.org; 22 Aug 2023 17:20:12 +0000 Received: from localhost ([127.0.0.1]:60417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYV35-0008Kd-TI for submit@debbugs.gnu.org; Tue, 22 Aug 2023 13:20:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYV33-0008KD-5U for 65456@debbugs.gnu.org; Tue, 22 Aug 2023 13:20:09 -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 1qYV2h-0005sE-Uu; Tue, 22 Aug 2023 13:20:00 -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=Ep45t5a10PI/VqpixTSiANIULKoSrJL8Z8rztjhRCGI=; b=LAm+pVOFS6AMc//MiBoD rI6boW0oqTXbmL/mu4llUlmPhV+IlMP8H+z7NnTTSRzGXo3K9yEA6TrLNn5/wRaUSebyiaaX+tQzn yiog1PNlaS/rVHZkJczp6TFR+NXEwGwVC4D2A/S0q43DfqTGXkFbVQFhLh/af9daE2t0LRMEeQy5T b0UyPn/aPrXEFQr5XXL+iHaOnJo1Ek7Lr04/Q9hJZI14nFAP5F/JJsGih1a4HqZeMd85xsOcD01Vi 071d1KN1HZtUex2b0E1o+FfdqFBfbFyu5P8zzEeQqNw4FAejK03Gjtg473tbwp4ToUosTBqwre6Hz GcJY2Wdc6gzljQ==; From: Janneke Nieuwenhuizen Date: Tue, 22 Aug 2023 19:19:42 +0200 Message-ID: <887d53ad5bee76b33d765e744c50e94e063b1ab8.1692723764.git.janneke@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: 75B1D45726 X-Migadu-Scanner: mx1.migadu.com X-TUID: vXrTo6SVHB1+ Similar to the Makefile.am change, this breaks-up packages into 26 chunks when building on 32bit. Also force garbage collection. * guix/self.scm (compiled-modules)[process-directory/32bit]: New inner define. Use it when building on a "i586" or "i686" cpu. --- guix/self.scm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/guix/self.scm b/guix/self.scm index 81a36e007f..474715fe7a 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)) @@ -1251,6 +1255,26 @@ (define* (compiled-modules name module-tree module-files #:report-load report-load #:report-compilation report-compilation))) + (define (process-directory/32bit directory files output) + (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) + (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) @@ -1277,7 +1301,10 @@ (define* (compiled-modules name module-tree module-files (mkdir #$output) (chdir #+module-tree) - (process-directory "." '#+module-files #$output) + (match (string-split %host-type #\-) + (((or "i586" "i686") rest ...) + (process-directory/32bit "." '#+module-files #$output)) + (_ (process-directory "." '#+module-files #$output))) (newline)))) (computed-file name build -- 2.41.0