guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building Guix with Guile 2.1


From: Taylan Ulrich Bayırlı/Kammer
Subject: Re: Building Guix with Guile 2.1
Date: Wed, 21 Sep 2016 23:01:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hello!
>
> Nalaginrut reported that Guix fails to build with Guile 2.2, which was a
> bit of a shame, hence commits e465d9e19087ab150f7e31f21c09e4a147b93b36
> and 9d126aa2b504bb9fad536eac186805ff623e96be.

With the attached quick-and-dirty patch, 'make' runs to completion.

I think we can keep the (compile 'dummy) hack.  That leaves two issues
which may be solved in a cleaner manner than in this patch:

- The (define foo (@@ (bar) foo)) parts.
- Making %tty-gid public.  (The above didn't work for this one...)

Both fixes may become unnecessary if Guile 2.2 goes back to allowing
#:select to import private bindings.  Otherwise, recommendations for
cleaner solutions welcome.

Of course, the actual parallelization hack is still fragile, though not
more so than in 2.0.  We still want to fix it eventually, if Guile 2.2
doesn't make module autoloading thread safe yet.  (More precisely,
referencing and thus instantiating modules previously "registered" via
the autoload mechanism, if I understand correctly.)

By the way, compile time seems to increase greatly with 2.2, to the
point I wondered if it's really compiling in parallel, but it does seem
to as evidenced by top(1).  Maybe package modules could be compiled with
certain optims turned off, since they mostly just consist of package
object definitions and not procedures whose performance would matter.

>From 819f07476e8f67acb86b90eab2ea03b7a3d17e33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <address@hidden>
Date: Wed, 21 Sep 2016 22:30:39 +0200
Subject: [PATCH] Fix compilation on Guile 2.2.

---
 build-aux/compile-all.scm   | 1 +
 gnu/system/file-systems.scm | 2 +-
 gnu/system/shadow.scm       | 3 +--
 guix/build-system/waf.scm   | 5 +++--
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/build-aux/compile-all.scm b/build-aux/compile-all.scm
index 7c937a0..577e6bc 100644
--- a/build-aux/compile-all.scm
+++ b/build-aux/compile-all.scm
@@ -80,6 +80,7 @@
   ((_ . files)
    (let ((files (filter file-needs-compilation? files)))
      (for-each load-module-file files)
+     (compile 'dummy)        ;make sure compilation related modules are loaded
      (let ((mutex (make-mutex)))
        (par-for-each (lambda (file)
                        (compile-file* file mutex))
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 0dc472e..2e59e48 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -158,7 +158,7 @@ TARGET in the other system."
     (type "binfmt_misc")
     (check? #f)))
 
-(define %tty-gid
+(define-public %tty-gid
   ;; ID of the 'tty' group.  Allocate it statically to make it easy to refer
   ;; to it from here and from the 'tty' group definitions.
   996)
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index cfdcf5e..b873021 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -24,8 +24,7 @@
   #:use-module (guix sets)
   #:use-module (guix ui)
   #:use-module (gnu services)
-  #:use-module ((gnu system file-systems)
-                #:select (%tty-gid))
+  #:use-module (gnu system file-systems)
   #:use-module ((gnu packages admin)
                 #:select (shadow))
   #:use-module (gnu packages bash)
diff --git a/guix/build-system/waf.scm b/guix/build-system/waf.scm
index 044d2a0..ccdf05c 100644
--- a/guix/build-system/waf.scm
+++ b/guix/build-system/waf.scm
@@ -24,14 +24,15 @@
   #:use-module (guix search-paths)
   #:use-module (guix build-system)
   #:use-module (guix build-system gnu)
-  #:use-module ((guix build-system python)
-                #:select (default-python default-python2))
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-26)
   #:export (%waf-build-system-modules
             waf-build
             waf-build-system))
 
+(define default-python (@@ (guix build-system python) default-python))
+(define default-python2 (@@ (guix build-system python) default-python2))
+
 ;; Commentary:
 ;;
 ;; Standard build procedure for applications using 'waf'.  This is very
-- 
2.10.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]