guix-commits
[Top][All Lists]
Advanced

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

01/02: pull: Build with an ABI-compatible Guile.


From: Ludovic Courtès
Subject: 01/02: pull: Build with an ABI-compatible Guile.
Date: Thu, 7 Dec 2017 11:17:06 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 66f217b43aca603326dab17d4dda1a398bf4fb8c
Author: Ludovic Courtès <address@hidden>
Date:   Thu Dec 7 17:13:47 2017 +0100

    pull: Build with an ABI-compatible Guile.
    
    Fixes <https://bugs.gnu.org/29570>.
    Reported by Vagrant Cascadian <address@hidden>.
    
    * build-aux/build-self.scm (matching-guile-2.2): New procedure.
    (guile-for-build): Use it.
---
 build-aux/build-self.scm | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index ed8ff5f..6415978 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -120,13 +120,30 @@ person's version identifier."
   ;; XXX: Replace with a Git commit id.
   (date->string (current-date 0) "~Y~m~d.~H"))
 
+(define (matching-guile-2.2)
+  "Return a Guile 2.2 with the same version as the current one or immediately
+older than then current one.  This is so that we do not build ABI-incompatible
+objects.  See <https://bugs.gnu.org/29570>."
+  (let loop ((packages (find-packages-by-name "guile" "2.2"))
+             (best     #f))
+    (match packages
+      (()
+       best)
+      ((head tail ...)
+       (if (string=? (package-version head) (version))
+           head
+           (if best
+               (if (version>? (package-version head) (version))
+                   (loop tail best)
+                   (loop tail head))
+               (loop tail head)))))))
+
 (define (guile-for-build)
   "Return a derivation for Guile 2.0 or 2.2, whichever matches the currently
 running Guile."
   (package->derivation (cond-expand
                          (guile-2.2
-                          (canonical-package
-                           (specification->package "address@hidden")))
+                          (canonical-package (matching-guile-2.2)))
                          (else
                           (canonical-package
                            (specification->package "address@hidden"))))))



reply via email to

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