>>>>> "WP" == Walter C Pelissero <walter@pelissero.org> writes:
WP> I begin to suspect the problem might be in make-scsh-image.scm which
WP> (according to the manual) does a simple:
WP> (run (| (begin
>> (format #t "(dump-scsh-program main \"~a\") (exit)" temp-file))
>> (scsh ,@args -lm ,source-file -o program))
>> (> /dev/null))
WP> where args is '(-lm modules.scm) and source-file is test1.scm. Then
WP> it adds
WP> "#!/usr/local/lib/scsh/scshvm \\\n-o /usr/local/lib/scsh/scshvm -i\n!#\n"
WP> to fix the header.
Okay, I dived into this and fixed it in both trees. Here is the patch
for 0.5.3:
Index: scsh-package.scm
===================================================================
RCS file: /cvsroot/scsh/scsh/scsh/scsh-package.scm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** scsh-package.scm 2001/06/04 05:18:51 1.20
--- scsh-package.scm 2001/11/27 18:29:12 1.21
***************
*** 249,252 ****
--- 249,254 ----
filenames ; translate
scheme-level-2-internal ; usual-resumer
+ package-commands-internal ;user-environment
+ environments ; with-interaction-environment
scheme)
(files startup)
Index: startup.scm
===================================================================
RCS file: /cvsroot/scsh/scsh/scsh/startup.scm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** startup.scm 1999/08/06 13:28:03 1.3
--- startup.scm 2001/11/27 18:29:12 1.4
***************
*** 43,50 ****
(define (dump-scsh-program start filename)
! (really-dump-scsh-program (lambda (args)
! (init-scsh-vars #t) ; Do it quietly.
! (start args))
! filename))
--- 43,60 ----
(define (dump-scsh-program start filename)
! (let ((context (user-context)))
! (really-dump-scsh-program
! (lambda (args)
! (with-new-session context ; "Log in" user.
! (current-input-port) (current-output-port)
! args
! #f
! (lambda ()
! (with-interaction-environment
! (user-environment) ; <-- from CONTEXT.
! (lambda ()
! (init-scsh-vars #t) ; Do it quietly.
! (start args))))))
! filename)))
Thanks for the report, this was really a nasty bug and it's strange
that it has remained unrevealed for so long...
--
Martin
|