From 02fcbf78b27788c03563e5c3d297a4cd469ce562 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 10 Jun 2010 17:53:47 +0200 Subject: [PATCH] Fix build bug, manifested as failure to find libguile-srfi-srfi-1-v-4 * module/ice-9/boot-9.scm (top-repl): This use of @ is not safe, because it will cause (system repl repl) to be loaded at expand time, which will eventually cause (srfi srfi-1) to be loaded, which won't work with a fresh build tree because the helper lib isn't compiled. Gross. (load): Add a note about why this use of @ is safe. --- module/ice-9/boot-9.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 9c286bba3..c88cbdde7 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -1136,6 +1136,10 @@ If there is no handler at all, Guile prints an error and then exits." (%load-should-autocompile (%warn-autocompilation-enabled) (format (current-error-port) ";;; compiling ~a\n" name) + ;; This use of @ is (ironically?) boot-safe, as modules have + ;; not been booted yet, so the resolve-module call in psyntax + ;; doesn't try to load a module, and compile-file will be + ;; treated as a function, not a macro. (let ((cfn ((@ (system base compile) compile-file) name #:env (current-module)))) (format (current-error-port) ";;; compiled ~a\n" cfn) @@ -3650,7 +3654,12 @@ module '(ice-9 q) '(make-q q-length))}." ;; scmsigs.c scm_sigaction_for_thread), so the handlers setup here have ;; no effect. (let ((old-handlers #f) - (start-repl (@ (system repl repl) start-repl)) + ;; We can't use @ here, as modules have been booted, but in Guile's + ;; build the srfi-1 helper lib hasn't been built yet, which will + ;; result in an error when (system repl repl) is loaded at compile + ;; time (to see if it is a macro or not). + (start-repl (module-ref (resolve-module '(system repl repl)) + 'start-repl)) (signals (if (provided? 'posix) `((,SIGINT . "User interrupt") (,SIGFPE . "Arithmetic error")