From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kGBzKAGq5WQ/TQAASxT56A (envelope-from ) for ; Wed, 23 Aug 2023 08:41:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MP6FKAGq5WRX+wAAauVa8A (envelope-from ) for ; Wed, 23 Aug 2023 08:41:05 +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 EF06B57549 for ; Wed, 23 Aug 2023 08:41:04 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=NrHtHujE; 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=1692772865; 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: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=Lu+M30ibGWuuhdcTXqERwEHNqAt551tbsd2Iitsrng0=; b=MPgOgs0TfpTKPBJYFiNDr2/UZe18cSb3pED9oc0gkifyw+ytPXVJa5qX0m1dHrZDdNk4Te lwyMj1v11M8WEtsD0/z7sxxcuuOzOoLm82uGAG29O/CAxBcw8P3XzrZGNzzjbwPXzLs+/Z ipd9aYMAyPEyou0yluNMwIgO8kTaNwnu8bkGmmXvBd3dnKlbT6iqOMuimKMHWdHsWjysNi W5UjYU04daKqTw1CvaUcWWfu6c66HnGlvHOa5tTAe1uhj9ktN2v29vRa+6ljQNjz+0z61i P2HJVxCjMD4JwEThglPqujWDPtejyjfE0CC4MkNdsp0Ov/6emWbKiuLnmHK2iA== 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=NrHtHujE; 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-Seal: i=1; s=key1; d=yhetil.org; t=1692772865; a=rsa-sha256; cv=none; b=ACKNMgoTdL+aYgwK+hDmsx30Wcxmuej8pmEQFiN0TUb4jaVrZ8Vq/ikF/gKpPjdhdZzh67 VGBDwxy7WCZTkWPnwor9pTK3IK62B4baxnP0ZgxPdaCJZaEizArJi+5JUasngCkzFo/vWM huCXspZEBAoCgsf52Yk/3iLsS8qNcUET61mQqIJ1XAjHjeip8kZcpGrF+iwQDBt6DFYL1n Cg3VhnlRzE1Sy49sPIE/XjDWSc4k4Fd5cisOa4J/iC7rUfVnw9KFp/KRw8V8rU6I1tMw+D OkdIlWao8TO2MHizHJX4OnQrOdnr5i5ztLcO+ICKjKEmjeQjOfOnwCzGg0DI3Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYhAr-0002f7-6z; Wed, 23 Aug 2023 02:17:01 -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 1qYhAo-0002eH-TM for bug-guix@gnu.org; Wed, 23 Aug 2023 02:16:59 -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 1qYhAo-0003KT-L7 for bug-guix@gnu.org; Wed, 23 Aug 2023 02:16:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYhAr-0003Fe-Qj for bug-guix@gnu.org; Wed, 23 Aug 2023 02:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65456: [PATCH v3] self: Build guix/ and gnu/packages/ directories in 26 steps. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 23 Aug 2023 06:17:01 +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: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , 65456@debbugs.gnu.org, Ricardo Wurmus , Christopher Baines Received: via spool by 65456-submit@debbugs.gnu.org id=B65456.169277140112467 (code B ref 65456); Wed, 23 Aug 2023 06:17:01 +0000 Received: (at 65456) by debbugs.gnu.org; 23 Aug 2023 06:16:41 +0000 Received: from localhost ([127.0.0.1]:60860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYhAW-0003Ey-Vr for submit@debbugs.gnu.org; Wed, 23 Aug 2023 02:16:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYhAU-0003Ek-1X for 65456@debbugs.gnu.org; Wed, 23 Aug 2023 02:16:39 -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 1qYhAG-0003HI-DT; Wed, 23 Aug 2023 02:16:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Lu+M30ibGWuuhdcTXqERwEHNqAt551tbsd2Iitsrng0=; b=NrHtHujE4duvQVRO8EzP kko03ynLFbepvSw+6wGKiDKTnd+ZD6U7kPB/Wp0v0g7avhxOO4yM3P/8sH5fYBVjbnTx2K1CnahAE WevaPBVePqvcQz2fYfPX3oq+kw9wG6Y415DwKAOOMcleWC++OiF6InOBG58REKLNAx4/VpYXk4mbT 4JTiBeMnYFcA88T34j4tXUH7/sua+Bm1kwkeJpPYyAVB8TNS7/LsnoZWIFa2xot7/qoNBqaUsvT3k ETeCRGfK0nP1j+6uSjLy0xn6Q/D8LlffNu1KjP9XcAvEmy64mxT352HivhyrGBfMEwfOmLQX6PLuY Zm95yaPSzbkXZA==; From: Janneke Nieuwenhuizen Organization: AvatarAcademy.nl References: <887d53ad5bee76b33d765e744c50e94e063b1ab8.1692723764.git.janneke@gnu.org> <87pm3e3fuu.fsf_-_@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 23 Aug 2023 08:16:18 +0200 In-Reply-To: <87pm3e3fuu.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Tue, 22 Aug 2023 23:51:53 +0200") Message-ID: <871qfu8erx.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -5.41 X-Spam-Score: -5.41 X-Migadu-Queue-Id: EF06B57549 X-TUID: YpxBnqUiGe9s --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: Hi! > Janneke Nieuwenhuizen skribis: > >> 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 d= efine. >> Use it when building on a "i586" or "i686" cpu. > > .go files of a Guix built with this new (guix self) would not be found: > > newfstatat(AT_FDCWD, "/gnu/store/pm43nabwng5rm8irmfhw2wk39hip8xr6-guix-mo= dule-union/share/guile/site/3.0/guix/ui.scm", {st_mode=3DS_IFREG|0444, st_s= ize=3D95284, ...}, 0) =3D 0 Hmm, how did I miss this? > In fact, guix/*.go is entirely missing, it seems: Right...that makes sense now that I look at the code again. Wait...I probably even experienced this breakage after running `guix pull' on the Hurd but failed to notice its cause, the missing guix/*.go, and ascribed it to "something" being broken on Hurd. So the good news is that we'll most probably have guix pull work on the Hurd after fixing this! --8<---------------cut here---------------start------------->8--- (cute partition <> files) (lambda (regex) (cute string-match regex <>)) (cute string-append "^gnu/packages/" <>) --8<---------------cut here---------------end--------------->8--- it still has the "gnu/packages" directory name hardcoded here. (I even believe this was kind-of intentional, meaning not to split-up builds of other directories...). The result is, of course, that partition always produces an empty result for any '("guix/foo.scm") files! It is fixed by doing --8<---------------cut here---------------start------------->8--- (cute string-append "^" directory "/" <>) --8<---------------cut here---------------end--------------->8--- i.e., also splitting guix/ 26 ways. > I=E2=80=99m reverting for now. Thank you for looking into and taking care of this mess I made, sorry! > Note that (guix self) is very sensitive, so we should test it > thoroughly. Using the attached patch, I ran --8<---------------cut here---------------start------------->8--- $ guix pull --branch=3Dmaster --url=3D$PWD [..] 08:11:02 janneke@drakenpad:~/src/guix/master=20 $ guix describe Git checkout: repository: /home/janneke/src/guix/master/ branch: master commit: a639a64d590067d3fe928be3ecc9d2d4cc2e8df3 08:11:04 janneke@drakenpad:~/src/guix/master=20 $ guix build hello /gnu/store/5mqwac3zshjjn1ig82s12rbi7whqm4n8-hello-2.12.1 --8<---------------cut here---------------end--------------->8--- > Here I used =E2=80=98make as-derivation=E2=80=99 and ran the resulting > =E2=80=98guix=E2=80=99 command. Ah, nice that guix works too for me too now --8<---------------cut here---------------start------------->8--- $ make as-derivation [..] /gnu/store/lqckq8f3c5s8jb5glwk8ancb781fc7km-guix-20230823.06 08:13:15 janneke@drakenpad:~/src/guix/master [env] $ /gnu/store/lqckq8f3c5s8jb5glwk8ancb781fc7km-guix-20230823.06/bin/guix bui= ld hello /gnu/store/5mqwac3zshjjn1ig82s12rbi7whqm4n8-hello-2.12.1 --8<---------------cut here---------------end--------------->8--- Greetings, Janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=v3-0001-self-Build-guix-and-gnu-packages-directories-in-2.patch Content-Transfer-Encoding: quoted-printable >From a639a64d590067d3fe928be3ecc9d2d4cc2e8df3 Mon Sep 17 00:00:00 2001 Message-ID: From: Janneke Nieuwenhuizen Date: Thu, 22 Jun 2023 08:30:25 +0200 Subject: [PATCH v3] self: Build guix/ and gnu/packages/ directories in 26 steps. Similar to the Makefile.am change, this breaks-up gnu/packages into 26 chun= ks when building on 32bit. Also force garbage collection. * guix/self.scm (compiled-modules)[process-directory]: Split building of directories 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..e5a85eaad6 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2017-2023 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2020 Martin Becze +;;; Copyright =C2=A9 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -1210,9 +1211,12 @@ (define* (compiled-modules name module-tree module-f= iles '((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)) =20 (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 "^" directory "/" <>) + (cute make-string 1 <>) + integer->char + (cute + (char->integer #\a) <>)) + (iota 26))) + (chunks (filter pair? chunks))) + (for-each + (lambda (chunck) + ;; Hide compilation warnings. + (parameterize ((current-warning-port (%make-void-port "w"= ))) + (compile-files directory #$output chunck + #:workers (parallel-job-count) + #:report-load report-load + #:report-compilation report-compilation)) + (gc)) + chunks))) =20 (setvbuf (current-output-port) 'line) (setvbuf (current-error-port) 'line) base-commit: f4d0d0bd5e7d0e67281d84d81068f7fd5eb480ea --=20 2.41.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com --=-=-=--