Hello, I thought cond-expand-provide be available in everywhere but saw a compile error, "ERROR: In procedure module-lookup: Unbound variable: cond-expand-provide". I don't know why this is happening; do you have any idea or comments? Thanks in advance.
test-load in attatched archive file is a script to load srfi-64.scm. This is very simple like this: #!/usr/bin/guile \ -e main -s !# ;;; Set %load-path (eval-when (compile load eval) (let ((%current-filename (current-filename))) (if %current-filename (let ((%current-path (dirname %current-filename))) (if (not (memq %current-path %load-path)) (add-to-load-path %current-path)))))) ;;; Fake main for "-e main" option of Guile (define (main . args) (let ((module (resolve-module '(test-load)))) (apply (module-ref module 'main) args))) ;;; Module (define-module (test-load) #:use-module (srfi srfi-64) #:export (main)) ;;; Real main (define (main args) #f) In srfi-64.scm, I had used "(cond-expand-provide (current-module) '(srfi-64))" like other srfi modules. Frist execution of above script is fine: $ ./test-load ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/sunjoong/test-load/./test-load ;;; compiling /home/sunjoong/test-load/srfi/srfi-64.scm ;;; compiled /home/sunjoong/.cache/guile/ccache/2.0-LE-4-2.0/home/sunjoong/test-load/srfi/srfi-64.scm.go ;;; compiled /home/sunjoong/.cache/guile/ccache/2.0-LE-4-2.0/home/sunjoong/test-load/test-load.go In second execution, I saw "Unbound variable: cond-expand-provide": $ ./test-load Backtrace: In ice-9/boot-9.scm: 149: 17 [catch #t #<catch-closure 96a8540> ...] 157: 16 [#<procedure 96708c0 ()>] In unknown file: ?: 15 [catch-closure] In ice-9/boot-9.scm: 63: 14 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 407: 13 [eval # #] In ice-9/boot-9.scm: 2111: 12 [save-module-excursion #<procedure 965d040 at ice-9/boot-9.scm:3646:3 ()>] 3653: 11 [#<procedure 965d040 at ice-9/boot-9.scm:3646:3 ()>] In unknown file: ?: 10 [load-compiled/vm "/home/sunjoong/.cache/guile/ccache/2.0-LE-4-2.0/home/sunjoong/test-load/test-load.go"] In /home/sunjoong/test-load/./test-load: 20: 9 [#<procedure 96b6210 ()>] In ice-9/boot-9.scm: 2667: 8 [define-module* (test-load) #:filename ...] 2642: 7 [resolve-imports (((srfi srfi-64)))] 2580: 6 [resolve-interface (srfi srfi-64) #:select ...] 2505: 5 [#<procedure 966df60 at ice-9/boot-9.scm:2493:4 (name #:optional autoload version #:key ensure)> # ...] 2772: 4 [try-module-autoload (srfi srfi-64) #f] 2111: 3 [save-module-excursion #<procedure 96abcf0 at ice-9/boot-9.scm:2773:17 ()>] 2783: 2 [#<procedure 96abcf0 at ice-9/boot-9.scm:2773:17 ()>] In unknown file: ?: 1 [primitive-load-path "srfi/srfi-64" #f] In srfi/srfi-64.scm: 85: 0 [#<procedure 967d020 ()>] srfi/srfi-64.scm:85:2: In procedure #<procedure 967d020 ()>: srfi/srfi-64.scm:85:2: In procedure module-lookup: Unbound variable: cond-expand-provide
test-load.tar.gz
Description: GNU Zip compressed data