Subject: Re: bug#48024: glib-2.62.6 build fails i686

From: Mark H Weaver <[email-masked]>
Date: Tue, 27 Apr 2021 23:23:47 -0400

Hi,

Bone Baboon via Bug reports for GNU Guix <[email-masked]> writes:
> On an i686 computer when I run the command `sudo guix system
> --no-substitutes --cores=2  reconfigure configuration.scm` I get this
> error:

and in a later message:

>  40/259 glib:glib / mutex                       TIMEOUT 60.04 s
[...]
>  53/259 glib:glib / rec-mutex                   TIMEOUT 60.04 s 
[...]
>  58/259 glib:glib / rwlock                      TIMEOUT 60.03 s 
[...]
>  83/259 glib:glib / 1bit-mutex                  TIMEOUT 60.02 s 
[...]
>  84/259 glib:glib+slow / 1bit-emufutex          TIMEOUT 180.03 s 

I also build everything locally, and have sometimes run into problems
like this on my slower machines.  Overly aggressive test timeouts,
chosen for powerful developer machines, are annoying.

The following patch, applied to your copy of Guix, should work around
the problem:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index c04bd334e9..b8f509306d 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -230,7 +230,8 @@ shared NFS home directories.")
               #t)))
         ;; TODO: Remove the conditional in the next core-updates cycle.
         ;; Needed to build glib on slower ARM nodes.
-        ,@(if (string-prefix? "arm" (%current-system))
+        ,@(if (or (string-prefix? "arm" (%current-system))
+                  (string-prefix? "i686" (%current-system)))
               `((add-after 'unpack 'increase-test-timeout
                   (lambda _
                     (substitute* "meson.build"
--8<---------------cut here---------------end--------------->8---

To use this patch, you'll need to apply it to a Git checkout of Guix,
build it, and then use "/PATH-TO-GIT-CHECKOUT/pre-inst-env guix ..."
whenever building anything with Guix that depends on glib.
(Incidentally, I *always* use Guix this way, using my own private branch
of Guix, never using "guix pull", and never using substitutes.)

Alternatively, you *might* be able to build 'glib' successfully by not
doing anything else with your machine while it's building 'glib'.  I
notice that in your original bug report, only the "1bit-mutex" test
timed out, but in your later build attempt, a total of 5 tests timed
out.  These differing results suggest that you might have been running
other programs at the same time.

     Regards,
       Mark

-- 
Support Richard Stallman against the vicious disinformation campaign
against him and the FSF.  See <https://stallmansupport.org> for more.