* Subject: on second/.go-cached run: ERROR: Unbound variable: for-each
@ 2011-02-03 20:20 Jan Nieuwenhuizen
2011-02-23 11:54 ` on second/.go-cached run: ERROR: Unbound variable: for-each - simplified Jan Nieuwenhuizen
0 siblings, 1 reply; 5+ messages in thread
From: Jan Nieuwenhuizen @ 2011-02-03 20:20 UTC (permalink / raw)
To: guile-devel
Hi,
My embryonal LilyPond GUI now works with Guile 1.9.15, but
it cannot run from cached .go files -- see below.
Can you help me with this; how do I go about debugging this?
If/once you have a working guile-gnome setup which includes gnomecanvas,
simply do
git clone git://github.com/janneke/schikkers-list.git
cd schikkers-list
rm -rf ~/.cache/guile/
./ikli.scm
This is also the best option, at least until we have the binary
relocation for 1.9 fully handled.
If you don't have guile-gnome you can download and install either of
http://lilypond.org/schikkers-list/download/schikkers-list-0.0.1-2.linux-x86.sh
The .sh installs in ~/schikkers-list, run it [for now] by doing
cd ~/schikkers-list/usr/bin && $(pwd)/guile --debug -e main -s $(pwd)/schikkers-list
On the first run, it cannot find (ikli relocate) and it aborts. On the second
run, it works! Quit the program, run again, you get the for-each unbound error
below.
There's only one warning that I get
WARNING: (gnome gtk): `re-export-modules' imported from both (gnome gw support modules) and (gnome gobject utils)
If you don't have LilyPond >= 2.13.37 installed, or no LilyPond at
all, you won't see any music but you can still choose File/Open or
Help/About to see that the GUI sort of works.
Starting it for the second time, i.e., using the compiled .go cache from
the first run, I get
15:19:04 janneke@vuurvlieg:~/vc/schikkers-list
$ ./ikli.scm
Backtrace:
In module/ice-9/boot-9.scm:
1172: 19 [load "./ikli.scm" #f]
In unknown file:
?: 18 [load-compiled/vm "/home/janneke/.cache/guile/ccache/2.0-0.T-LE-4/home/janneke/vc/schikkers-list/ikli.scm.go"]
In ./ikli.scm:
55: 17 [main ("./ikli.scm")]
In module/ice-9/boot-9.scm:
2266: 16 [#<procedure 9695c30 at module/ice-9/boot-9.scm:2254:4 (name #:optional autoload version #:key ensure)> # ...]
2532: 15 [try-module-autoload (ikli ikli) #f]
1864: 14 [save-module-excursion #<procedure 9709918 at module/ice-9/boot-9.scm:2533:17 ()>]
2543: 13 [#<procedure 9709918 at module/ice-9/boot-9.scm:2533:17 ()>]
In unknown file:
?: 12 [primitive-load-path "ikli/ikli" #f]
In /home/janneke/vc/schikkers-list/ikli/ikli.scm:
220: 11 [#<procedure 9710a60 ()>]
In module/oop/goops.scm:
1552: 10 [#<procedure 9b9cdd0 at module/oop/goops.scm:1550:0 (class . initargs)> #]
In /home/janneke/vc/schikkers-list/ikli/notation.scm:
199: 9 [#<procedure 9a840f0 at /home/janneke/vc/schikkers-list/ikli/notation.scm:198:0 (obj . initargs)> # ...]
In unknown file:
?: 8 [%initialize-object #<<notation> 9cb2140> ()]
In /home/janneke/vc/schikkers-list/ikli/notation.scm:
183: 7 [#<procedure 99b6490 ()>]
In module/oop/goops.scm:
1552: 6 [#<procedure 9b9cdd0 at module/oop/goops.scm:1550:0 (class . initargs)> #]
In unknown file:
?: 5 [%initialize-object #<<music-document> a0f9b70> ()]
In /home/janneke/vc/schikkers-list/ikli/music.scm:
667: 4 [test-expr]
In module/oop/goops.scm:
1552: 3 [#<procedure 9b9cdd0 at module/oop/goops.scm:1550:0 (class . initargs)> #]
In /home/janneke/vc/schikkers-list/ikli/music.scm:
332: 2 [#<procedure 9a8d750 at /home/janneke/vc/schikkers-list/ikli/music.scm:329:0 (obj . initargs)> # ...]
In module/ice-9/boot-9.scm:
115: 1 [#<procedure 96754d8 at module/ice-9/boot-9.scm:110:6 (thrown-k . args)> unbound-variable ...]
In unknown file:
?: 0 [catch-closure unbound-variable "module-lookup" ...]
ERROR: In procedure module-lookup:
ERROR: Unbound variable: for-each
[1]15:22:07 janneke@vuurvlieg:~/vc/schikkers-list
Greetings, Jan
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
^ permalink raw reply [flat|nested] 5+ messages in thread
* on second/.go-cached run: ERROR: Unbound variable: for-each - simplified
2011-02-03 20:20 Subject: on second/.go-cached run: ERROR: Unbound variable: for-each Jan Nieuwenhuizen
@ 2011-02-23 11:54 ` Jan Nieuwenhuizen
2011-02-24 21:52 ` Ludovic Courtès
2011-05-23 21:02 ` Andy Wingo
0 siblings, 2 replies; 5+ messages in thread
From: Jan Nieuwenhuizen @ 2011-02-23 11:54 UTC (permalink / raw)
To: guile-devel
[-- Attachment #1: Type: text/plain, Size: 2594 bytes --]
Jan Nieuwenhuizen schreef op do 03-02-2011 om 21:20 [+0100]:
This morning I've spend some time to reduce this problem into
a single scheme file, see attached.
Again, here's what happens when I run it twice, starting from
a clean cache.
First run
12:47:07 janneke@vuurvlieg:~/vc/schikkers-list
$ rm -rf ~/.cache/guile
12:47:10 janneke@vuurvlieg:~/vc/schikkers-list
$ ./compile-cache-run-problem.scm
;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-autocompile argument to disable.
;;; compiling ./compile-cache-run-problem.scm
;;; compiled /home/janneke/.cache/guile/ccache/2.0-0.T-LE-4/home/janneke/vc/schikkers-list/compile-cache-run-problem.scm.go
HALLO
12:47:16 janneke@vuurvlieg:~/vc/schikkers-list
Second run
$ ./compile-cache-run-problem.scm
Backtrace:
In module/ice-9/boot-9.scm:
170: 13 [catch #t #<catch-closure 86895a0> ...]
In unknown file:
?: 12 [catch-closure]
In module/ice-9/boot-9.scm:
62: 11 [call-with-prompt prompt0 ...]
In module/ice-9/eval.scm:
389: 10 [eval # #]
In module/ice-9/boot-9.scm:
1864: 9 [save-module-excursion #<procedure 8697c78 at module/ice-9/boot-9.scm:1878:3 ()>]
1172: 8 [load "./compile-cache-run-problem.scm" #f]
In unknown file:
?: 7 [load-compiled/vm "/home/janneke/.cache/guile/ccache/2.0-0.T-LE-4/home/janneke/vc/schikkers-list/compile-cache-run-problem.scm.go"]
In ./compile-cache-run-problem.scm:
20: 6 [#<procedure 868a560 ()>]
In module/oop/goops.scm:
1552: 5 [#<procedure 8afe820 at module/oop/goops.scm:1550:0 (class . initargs)> #]
In unknown file:
?: 4 [%initialize-object #<<notation> 8b01010> ()]
In module/oop/goops.scm:
1552: 3 [#<procedure 8afe820 at module/oop/goops.scm:1550:0 (class . initargs)> #]
In ./compile-cache-run-problem.scm:
12: 2 [#<procedure 8b04e40 at ./compile-cache-run-problem.scm:10:0 (obj . initargs)> # ...]
In module/ice-9/boot-9.scm:
115: 1 [#<procedure 85fc4d8 at module/ice-9/boot-9.scm:110:6 (thrown-k . args)> unbound-variable ...]
In unknown file:
?: 0 [catch-closure unbound-variable "module-lookup" ...]
ERROR: In procedure module-lookup:
ERROR: Unbound variable: for-each
[1]12:47:17 janneke@vuurvlieg:~/vc/schikkers-list
$
Greetings,
Jan.
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
[-- Attachment #2: compile-cache-run-problem.scm --]
[-- Type: text/x-scheme, Size: 585 bytes --]
#! /bin/sh
# -*- scheme -*-
exec guile --debug -s $0 "$@"
!#
(define-module (ikli ikli)
#:use-module (oop goops)
#:use-module (srfi srfi-1)
#:duplicates (merge-generics))
(define-class <music-document> ())
(define-method (initialize (obj <music-document>) . initargs)
(let* ((self (next-method)))
(for-each (lambda (x) #f) '())
(map (lambda (x) #f) '())
self))
(define-class <notation> ()
(music #:init-form (make <music-document>)))
(define-class <ikli-app> ()
(notation #:init-value (make <notation>)))
(define (main)
(format #t "HALLO\n"))
(main)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: on second/.go-cached run: ERROR: Unbound variable: for-each - simplified
2011-02-23 11:54 ` on second/.go-cached run: ERROR: Unbound variable: for-each - simplified Jan Nieuwenhuizen
@ 2011-02-24 21:52 ` Ludovic Courtès
2011-02-25 8:38 ` Jan Nieuwenhuizen
2011-05-23 21:02 ` Andy Wingo
1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2011-02-24 21:52 UTC (permalink / raw)
To: guile-devel
Hi Jan,
Jan Nieuwenhuizen <janneke-list@xs4all.nl> writes:
> ERROR: In procedure module-lookup:
> ERROR: Unbound variable: for-each
It’s very likely another problem with the ‘merge-generics’ strategy.
Would you like to debug further, e.g., by adding ‘pk’s in boot-9.scm in
‘merge-generics’? :-)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: on second/.go-cached run: ERROR: Unbound variable: for-each - simplified
2011-02-24 21:52 ` Ludovic Courtès
@ 2011-02-25 8:38 ` Jan Nieuwenhuizen
0 siblings, 0 replies; 5+ messages in thread
From: Jan Nieuwenhuizen @ 2011-02-25 8:38 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guile-devel
Ludovic Courtès schreef op do 24-02-2011 om 22:52 [+0100]:
Hi Ludovic,
> Would you like to debug further, e.g., by adding ‘pk’s in boot-9.scm in
> ‘merge-generics’? :-)
Aren't you seeing this problem? I only see
(module-define! m 'merge-generics noop)
in boot-9.scm ...
Greetings, Jan
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: on second/.go-cached run: ERROR: Unbound variable: for-each - simplified
2011-02-23 11:54 ` on second/.go-cached run: ERROR: Unbound variable: for-each - simplified Jan Nieuwenhuizen
2011-02-24 21:52 ` Ludovic Courtès
@ 2011-05-23 21:02 ` Andy Wingo
1 sibling, 0 replies; 5+ messages in thread
From: Andy Wingo @ 2011-05-23 21:02 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: guile-devel
Hi Janneke,
On Wed 23 Feb 2011 12:54, Jan Nieuwenhuizen <janneke-list@xs4all.nl> writes:
> This morning I've spend some time to reduce this problem into
> a single scheme file, see attached.
>
> Again, here's what happens when I run it twice, starting from
> a clean cache.
>
> First run
>
> 12:47:07 janneke@vuurvlieg:~/vc/schikkers-list
> $ rm -rf ~/.cache/guile
> 12:47:10 janneke@vuurvlieg:~/vc/schikkers-list
> $ ./compile-cache-run-problem.scm
> ;;; note: autocompilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;; or pass the --no-autocompile argument to disable.
> ;;; compiling ./compile-cache-run-problem.scm
> ;;; compiled /home/janneke/.cache/guile/ccache/2.0-0.T-LE-4/home/janneke/vc/schikkers-list/compile-cache-run-problem.scm.go
> HALLO
> 12:47:16 janneke@vuurvlieg:~/vc/schikkers-list
>
> Second run
>
> $ ./compile-cache-run-problem.scm
> Backtrace:
> In module/ice-9/boot-9.scm:
> 170: 13 [catch #t #<catch-closure 86895a0> ...]
> In unknown file:
> ?: 12 [catch-closure]
> In module/ice-9/boot-9.scm:
> 62: 11 [call-with-prompt prompt0 ...]
> In module/ice-9/eval.scm:
> 389: 10 [eval # #]
> In module/ice-9/boot-9.scm:
> 1864: 9 [save-module-excursion #<procedure 8697c78 at module/ice-9/boot-9.scm:1878:3 ()>]
> 1172: 8 [load "./compile-cache-run-problem.scm" #f]
> In unknown file:
> ?: 7 [load-compiled/vm "/home/janneke/.cache/guile/ccache/2.0-0.T-LE-4/home/janneke/vc/schikkers-list/compile-cache-run-problem.scm.go"]
> In ./compile-cache-run-problem.scm:
> 20: 6 [#<procedure 868a560 ()>]
> In module/oop/goops.scm:
> 1552: 5 [#<procedure 8afe820 at module/oop/goops.scm:1550:0 (class . initargs)> #]
> In unknown file:
> ?: 4 [%initialize-object #<<notation> 8b01010> ()]
> In module/oop/goops.scm:
> 1552: 3 [#<procedure 8afe820 at module/oop/goops.scm:1550:0 (class . initargs)> #]
> In ./compile-cache-run-problem.scm:
> 12: 2 [#<procedure 8b04e40 at ./compile-cache-run-problem.scm:10:0 (obj . initargs)> # ...]
> In module/ice-9/boot-9.scm:
> 115: 1 [#<procedure 85fc4d8 at module/ice-9/boot-9.scm:110:6 (thrown-k . args)> unbound-variable ...]
> In unknown file:
> ?: 0 [catch-closure unbound-variable "module-lookup" ...]
>
> ERROR: In procedure module-lookup:
> ERROR: Unbound variable: for-each
> [1]12:47:17 janneke@vuurvlieg:~/vc/schikkers-list
> $
Guile now exhibits the second behavior only, and not the first behavior.
I think the reason is that map and for-each are now implemented in
Scheme, and thus not primitive generics, and srfi-1 doesn't turn them
into generics any more. Since the duplicates-handler thing is actually
a list or handlers, and you don't mention `last' in the list, no binding
for `for-each' gets imported.
I suspect the difference between first and second runs had to do with
the interaction between srfi-1 and goops, combined with the
loading-order bug that I fixed. Yuk, right?
Strictly speaking this recent map / srfi-1 / goops change is
incompatible. But, I hope you'll agree it's for the better; do let us
know if you need some sort of compatibility shim.
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-23 21:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-03 20:20 Subject: on second/.go-cached run: ERROR: Unbound variable: for-each Jan Nieuwenhuizen
2011-02-23 11:54 ` on second/.go-cached run: ERROR: Unbound variable: for-each - simplified Jan Nieuwenhuizen
2011-02-24 21:52 ` Ludovic Courtès
2011-02-25 8:38 ` Jan Nieuwenhuizen
2011-05-23 21:02 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).