[gambit-list] Runtime problem with Gambit 4.7.4
Emmanuel Medernach
Emmanuel.Medernach at iphc.cnrs.fr
Wed Mar 4 05:08:55 EST 2015
Hello,
I have problem running a bunch of code
compiled with gambit scheme version 4.7.4
which runned fine with version 4.6.9.
This problem tracked down to macros, here is
a minimal file:
$ cat list.scm
(define-syntax dummy
(syntax-rules ()
((dummy a b ...)
(time (begin a b ...)))))
;; SRFI 1 iota
(define (iota count)
(let loop ((i 1) (result '()))
(if (> i count)
(reverse result)
(loop (+ i 1) (cons i result)))))
(dummy (length (iota 1000000)))
With Gambit version 4.6.9
$ gsc -:s -o list.c -c list.scm
$ gsc -:s -o link.c -link list.c
$ gcc -o list list.c link.c -ldl -lm -lgambc -lutil -L${GAMBITDIR}/lib/
-I${GAMBITDIR}/include/
$ ./list
(time (length (iota 1000000)))
80 ms real time
79 ms cpu time (61 user, 18 system)
5 collections accounting for 55 ms real time (48 user, 6 system)
96000000 bytes allocated
23512 minor faults
no major faults
With Gambit version 4.7.4
$ gsc -:s -o list.c -c list.scm
$ gsc -:s -o link.c -link list.c
*** WARNING -- "$sc-put-cte" is not defined,
*** referenced in: ("list.c")
*** WARNING -- "$syntax-dispatch" is not defined,
*** referenced in: ("list.c")
*** WARNING -- "syntax-error" is not defined,
*** referenced in: ("list.c")
$ gcc -o list list.c link.c -ldl -lm -lgambc -lutil -L${GAMBITDIR}/lib/
-I${GAMBITDIR}/include/
$ ./list
*** ERROR IN | list| -- Operator is not a PROCEDURE
(#!unbound
'#(syntax-object dummy ((top) #(ribcage #(dummy) #((top)) #(dummy))))
'#<procedure #2>
'*top*)
What is now the correct way to compile with
macros in Gambit version 4.7.4 ?
Emmanuel
More information about the Gambit-list
mailing list