[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/07: compile: Work around non-thread-safe module autoloading.
From: |
Ludovic Courtès |
Subject: |
01/07: compile: Work around non-thread-safe module autoloading. |
Date: |
Mon, 18 Jun 2018 17:19:59 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 870677cbb85d05688ba85deb9807fdef8bd94e19
Author: Ludovic Courtès <address@hidden>
Date: Mon Jun 18 15:16:40 2018 +0200
compile: Work around non-thread-safe module autoloading.
* guix/build/compile.scm <top level>: Set 'try-module-autoload' when
running on Guile < 2.2.4.
---
guix/build/compile.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/guix/build/compile.scm b/guix/build/compile.scm
index 7b6e311..5a13635 100644
--- a/guix/build/compile.scm
+++ b/guix/build/compile.scm
@@ -196,6 +196,20 @@ files are for HOST, a GNU triplet such as
\"x86_64-linux-gnu\"."
(unless (zero? total)
(report-compilation #f total total)))))
+(eval-when (eval load)
+ (when (and (string=? "2" (major-version))
+ (or (string=? "0" (minor-version))
+ (and (string=? (minor-version) "2")
+ (< (string->number (micro-version)) 4))))
+ ;; Work around <https://bugs.gnu.org/31878> on Guile < 2.2.4.
+ ;; Serialize 'try-module-autoload' calls.
+ (set! (@ (guile) try-module-autoload)
+ (let ((mutex (make-mutex 'recursive))
+ (real (@ (guile) try-module-autoload)))
+ (lambda* (module #:optional version)
+ (with-mutex mutex
+ (real module version)))))))
+
;;; Local Variables:
;;; eval: (put 'with-augmented-search-path 'scheme-indent-function 2)
;;; eval: (put 'with-target 'scheme-indent-function 1)
- branch master updated (3fe43df -> 92d581a), Ludovic Courtès, 2018/06/18
- 01/07: compile: Work around non-thread-safe module autoloading.,
Ludovic Courtès <=
- 04/07: system: Have /run/setuid-programs first in $PATH., Ludovic Courtès, 2018/06/18
- 07/07: gnu: emacs-image+: Don't propagate inputs., Ludovic Courtès, 2018/06/18
- 03/07: build: Remove checks for 'nix-instantiate'., Ludovic Courtès, 2018/06/18
- 06/07: gnu: emacs-gif-screencast: Update URL., Ludovic Courtès, 2018/06/18
- 02/07: self: Make (guix config) generation really stateless., Ludovic Courtès, 2018/06/18
- 05/07: nls: Update 'da' translation., Ludovic Courtès, 2018/06/18