Subject: Re: bug#48963: "guix build guix" halts after exhausting memory
From: Ludovic Courtès <[email-masked]>
To: Julien Lepiller <[email-masked]>
Cc: [email-masked]
Date: Wed, 23 Jun 2021 23:43:55 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Ludovic Courtès <[email-masked]> skribis:

> Julien Lepiller <[email-masked]> skribis:

>> Can we instead break the build (at the Makefile level) into multiple
>> smaller chunks, that require less memory, in the same way (guix self)
>> works?
>
> Yes, that’s a good idea.
>
> Could you check the extent to which the attached patch helps on this
> machine?
>
> It doesn’t split as much as (guix self) does, only in three pieces, but
> hopefully that helps a bit.  A side effect is that progress report is
> now off, but we can fix it later.

I pushed a variant of this patch, resorting to an ugly hack so that
compile-all.scm can still estimate progress.  The estimate is correct if
you’re building all the .go files, not so much if you just do, say:

  make
  rm guix/cpio.go && make

because guix/cpio.scm is in the first module set, so it’ll think it’s
starting from scratch and display “0%”.

Fixing it is left as an exercise to the reader.  :-)

It seemed more important to me to fix the memory exhaustion issue first.

Thanks,
Ludo’.