Hi.
I have a large program that runs fine in the interpreter. But when compiled with these options (latest gambit from git) (declare (r5rs-scheme) (constant-fold) (inline) (inlining-limit 500) (standard-bindings) (extended-bindings) (safe) (mostly-generic)) the compiled program crashes as follows:
*** ERROR IN | n| -- Operator is not a PROCEDURE (#!unbound '#(syntax-object change-directory ((top) #(ribcage #(change-directory) #((top)) #(change-directory)))) '(global . change-directory) '*top*)
change-directory is from a simple Scheme portability layer:
(define (change-directory path) (current-directory path))
Sven
Afficher les réponses par date
With the latest changes to syntax-case, it is now required to load syntax-case.scm (or use the -:s runtime option) when loading files which were compiled with the -:s option.
Marc
On 2013-09-20, at 7:56 AM, Sven Hartrumpf hartrumpf@gmx.net wrote:
Hi.
I have a large program that runs fine in the interpreter. But when compiled with these options (latest gambit from git) (declare (r5rs-scheme) (constant-fold) (inline) (inlining-limit 500) (standard-bindings) (extended-bindings) (safe) (mostly-generic)) the compiled program crashes as follows:
*** ERROR IN | n| -- Operator is not a PROCEDURE (#!unbound '#(syntax-object change-directory ((top) #(ribcage #(change-directory) #((top)) #(change-directory)))) '(global . change-directory) '*top*)
change-directory is from a simple Scheme portability layer:
(define (change-directory path) (current-directory path))
Sven _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Marc,
I think the situation appears more urgent than you suggest. The change appears to have broken executable compilation.
I was able to reproduce this problem trivially with the suggested code:
;; change-directory.scm (define (change-directory path) (current-directory path)) (change-directory (cadr (command-line)))
bash-3.2$ gsc -:s -exe change-directory.scm ../lib/syntax-case.scm change-directory.scm: /Volumes/Data/scratch/scheme/control/home/change-directory.c: ../lib/syntax-case.scm: /Volumes/Data/scratch/scheme/control/lib/syntax-case.c: /Volumes/Data/scratch/scheme/control/lib/syntax-case_.c: bash-3.2$ ./change-directory .. *** ERROR IN | change-directory| -- Operator is not a PROCEDURE (#!unbound '#(syntax-object change-directory ((top) #(ribcage #(change-directory) #((t... '(global . change-directory) '*top*) bash-3.2$
I'll go back and study the psyntax code around this defect for a resolution that supports both the command line compilation and gsc repl envrionments.
Sven - my sincere apologies for this fail.
Matt.
On Sep 20, 2013, at 7:28 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
With the latest changes to syntax-case, it is now required to load syntax-case.scm (or use the -:s runtime option) when loading files which were compiled with the -:s option.
Marc
On 2013-09-20, at 7:56 AM, Sven Hartrumpf hartrumpf@gmx.net wrote:
Hi.
I have a large program that runs fine in the interpreter. But when compiled with these options (latest gambit from git) (declare (r5rs-scheme) (constant-fold) (inline) (inlining-limit 500) (standard-bindings) (extended-bindings) (safe) (mostly-generic)) the compiled program crashes as follows:
*** ERROR IN | n| -- Operator is not a PROCEDURE (#!unbound '#(syntax-object change-directory ((top) #(ribcage #(change-directory) #((top)) #(change-directory)))) '(global . change-directory) '*top*)
change-directory is from a simple Scheme portability layer:
(define (change-directory path) (current-directory path))
Sven _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Team,
Examination of this problem leads me to believe the cause might be result of interference in the -:s parameter on the gsc command line.
When standard mode is not specified, the example executes without the failure:
bash-3.2$ gsc -o change-directory -exe change-directory.scm ../src/gambit/lib/syntax-case.scm change-directory.scm: /Volumes/Data/scratch/scheme/control/home/change-directory.c: ../src/gambit/lib/syntax-case.scm: /Volumes/Data/scratch/scheme/control/src/gambit/lib/syntax-case.c: /Volumes/Data/scratch/scheme/control/src/gambit/lib/syntax-case_.c: bash-3.2$ ./change-directory .. bash-3.2$
I went forth and tested the other forms of command-line compilation documented in the manual. All scenarios are successful where -:s is not provided on the command line.
bash-3.2$ gsc -:s -o change-directory -exe change-directory.scm *** WARNING -- "$sc-put-cte" is not defined, *** referenced in: ("/Volumes/Data/scratch/scheme/control/home/change-directory.c") bash-3.2$ gsc -:s -o change-directory -exe change-directory.scm ../src/gambit/lib/syntax-case.scm change-directory.scm: /Volumes/Data/scratch/scheme/control/home/change-directory.c: ../src/gambit/lib/syntax-case.scm: /Volumes/Data/scratch/scheme/control/src/gambit/lib/syntax-case.c: /Volumes/Data/scratch/scheme/control/src/gambit/lib/syntax-case_.c: bash-3.2$ ./change-directory .. *** ERROR IN | change-directory| -- Operator is not a PROCEDURE (#!unbound2 '#(syntax-object change-directory ((top) #(ribcage #(change-directory) #((t... '(global . change-directory) '*top*) bash-3.2$ gsc -o change-directory -exe change-directory.scm ../src/gambit/lib/syntax-case.scm change-directory.scm: /Volumes/Data/scratch/scheme/control/home/change-directory.c: ../src/gambit/lib/syntax-case.scm: /Volumes/Data/scratch/scheme/control/src/gambit/lib/syntax-case.c: /Volumes/Data/scratch/scheme/control/src/gambit/lib/syntax-case_.c: bash-3.2$ ./change-directory .. bash-3.2$ bash-3.2$ gsc -c change-directory.scm bash-3.2$ gsc -c ../lib/syntax-case.scm bash-3.2$ gsc -o change-directory-2 -exe change-directory.c ../lib/syntax-case.c bash-3.2$ ./change-directory-2 .. bash-3.2$ bash-3.2$ gsc -link change-directory ../lib/syntax-case change-directory: ../lib/syntax-case: bash-3.2$ gsc -obj change-directory.c ../lib/syntax-case.c ../lib/syntax-case_.c change-directory.c: ../lib/syntax-case.c: ../lib/syntax-case_.c: bash-3.2$ bash-3.2$ gcc -o change-directory-3 change-directory.o ../lib/syntax-case.o ../lib/syntax-case_.o -L../lib -lgambc bash-3.2$ ./change-directory-3 .. bash-3.2$ bash-3.2$ gsc -obj change-directory.c bash-3.2$ gsc -obj ../lib/syntax-case.c bash-3.2$ gsc -obj ../lib/syntax-case_.c bash-3.2$ gcc -o change-directory-3 change-directory.o ../lib/syntax-case.o ../lib/syntax-case_.o -L../lib -lgambc bash-3.2$ ./change-directory-3 .. bash-3.2$
I'm going to look further into this issue to determine the exact cause, with intent to submit an additional patch that productizes this work such that compilation with standard mode works as it did formerly, i.e.:
- with use of -:s - without explicit specification of syntax-case.scm as an input.
In the meantime, it may make sense to remove this patch from the git head until a critical mass of win is ascertained. I'm pretty excited by the prospect of compiled macros & modules from syntax-case in my favorite scheme compiler, I thus hope to return shortly with a complete solution that eliminates these warts.
Kind regards, Matt.
On Sep 20, 2013, at 3:39 PM, Matt Hastie matthastie@gmail.com wrote:
Marc,
I think the situation appears more urgent than you suggest. The change appears to have broken executable compilation.
I was able to reproduce this problem trivially with the suggested code:
;; change-directory.scm (define (change-directory path) (current-directory path)) (change-directory (cadr (command-line)))
bash-3.2$ gsc -:s -exe change-directory.scm ../lib/syntax-case.scm change-directory.scm: /Volumes/Data/scratch/scheme/control/home/change-directory.c: ../lib/syntax-case.scm: /Volumes/Data/scratch/scheme/control/lib/syntax-case.c: /Volumes/Data/scratch/scheme/control/lib/syntax-case_.c: bash-3.2$ ./change-directory .. *** ERROR IN | change-directory| -- Operator is not a PROCEDURE (#!unbound '#(syntax-object change-directory ((top) #(ribcage #(change-directory) #((t... '(global . change-directory) '*top*) bash-3.2$
I'll go back and study the psyntax code around this defect for a resolution that supports both the command line compilation and gsc repl envrionments.
Sven - my sincere apologies for this fail.
Matt.
On Sep 20, 2013, at 7:28 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
With the latest changes to syntax-case, it is now required to load syntax-case.scm (or use the -:s runtime option) when loading files which were compiled with the -:s option.
Marc
On 2013-09-20, at 7:56 AM, Sven Hartrumpf hartrumpf@gmx.net wrote:
Hi.
I have a large program that runs fine in the interpreter. But when compiled with these options (latest gambit from git) (declare (r5rs-scheme) (constant-fold) (inline) (inlining-limit 500) (standard-bindings) (extended-bindings) (safe) (mostly-generic)) the compiled program crashes as follows:
*** ERROR IN | n| -- Operator is not a PROCEDURE (#!unbound '#(syntax-object change-directory ((top) #(ribcage #(change-directory) #((top)) #(change-directory)))) '(global . change-directory) '*top*)
change-directory is from a simple Scheme portability layer:
(define (change-directory path) (current-directory path))
Sven _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Fri, 20 Sep 2013 10:28:41 -0400, feeley wrote:
With the latest changes to syntax-case, it is now required to load syntax-case.scm (or use the -:s runtime option) when loading files which were compiled with the -:s option.
Thanks for your help. This works perfectly for my application.
Sven