* 1.6 psyntax.pp bootstrapping bug -- may have found when it started.
@ 2003-09-14 19:37 Rob Browning
2003-09-15 5:23 ` Fix for 1.6 psyntax.pp bootstrapping bug Rob Browning
0 siblings, 1 reply; 2+ messages in thread
From: Rob Browning @ 2003-09-14 19:37 UTC (permalink / raw)
Cc: Mikael Djurfeldt, marius.vollmer
After trying a bunch of CVS builds from different points, it looks
like I may have narrowed down the source of the bug down to a
particular day.
If you check out two trees and update each as follows:
cvs -qz3 update -r branch_release-1-6 -D 2003/01/27 -Pd
cvs -qz3 update -r branch_release-1-6 -D 2003/01/28 -Pd
Then you apply the diff below to both trees (turns out there are two
psyntax.pp generation issues) and run
./autogen.sh
./configure --prefix=whatever --enable-maintainer-mode
make
touch ice-9/psyntax.ss
make
then at least here, these commands will run fine in first tree, but
will fail in the second like this:
/home/rlb/src/guile/1.6-debug/pre-inst-guile -s ./compile-psyntax.scm \
./psyntax.ss ./psyntax.pp
/home/rlb/src/guile/1.6-debug/ice-9/syncase.scm:131:16: In procedure
scm-error in expression (scm-error (quote misc-error) who ...):
/home/rlb/src/guile/1.6-debug/ice-9/syncase.scm:131:16: invalid syntax ()
Some deprecated features have been used. Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information. Set it to "no" to suppress
this message.
make[2]: *** [psyntax.pp] Error 2
I may not have time to try to figure out the actual cause for a few
days, so if anyone else would like to try to reproduce this or track
it down, go right ahead. I'd rather not release 1.6.5 until we can
see about fixing this.
Here's the diff you need to get around the other error relating to
apply.
Index: ice-9/syncase.scm
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/ice-9/syncase.scm,v
retrieving revision 1.18.2.8
diff -u -r1.18.2.8 syncase.scm
--- ice-9/syncase.scm 27 Jan 2003 11:02:51 -0000 1.18.2.8
+++ ice-9/syncase.scm 14 Sep 2003 19:29:42 -0000
@@ -54,15 +54,16 @@
syntax-dispatch syntax-error bound-identifier=?
datum->syntax-object free-identifier=?
generate-temporaries identifier? syntax-object->datum
- void syncase))
+;; void syncase))
+ void eval syncase))
;; This is to avoid a deprecation warning about re-exporting eval.
;; When the re-exporting behavior of export is removed, removed this
;; code and include 'eval' in the export clause of define-module,
;; above.
-(define eval #f)
-(export eval)
+;;(define eval #f)
+;;(export eval)
\f
@@ -244,8 +245,8 @@
;;; The following lines are necessary only if we start making changes
-;; (use-syntax sc-expand)
-;; (load-from-path "ice-9/psyntax.ss")
+(use-syntax sc-expand)
+(load-from-path "ice-9/psyntax.ss")
(define internal-eval (nested-ref the-scm-module '(app modules guile eval)))
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Fix for 1.6 psyntax.pp bootstrapping bug.
2003-09-14 19:37 1.6 psyntax.pp bootstrapping bug -- may have found when it started Rob Browning
@ 2003-09-15 5:23 ` Rob Browning
0 siblings, 0 replies; 2+ messages in thread
From: Rob Browning @ 2003-09-15 5:23 UTC (permalink / raw)
Cc: Mikael Djurfeldt, marius.vollmer
After more investigation, I think I've fixed the bug(s), but please
check this patch if you have time, to be sure I've interpreted things
correctly.
In the case of compile-psyntax.scm, I guessed that the with-fluids
clause was overlooked when similar changes were backported from 1.7 to
1.6.
In the case of syncase.scm, eval was being defined to #f at the start
of the file and then exported. It looks like this is what was causing
the psyntax.ss (or was it .pp?) load to fail when the code attempted
to call eval:
<unnamed port>: In expression
(eval (list syntmp-noexpand-1497 syntmp-x-2446) (interaction-environment)):
<unnamed port>: Wrong type to apply: #f
As a quick fix, I just moved the (export eval) lower in the file, so
that it's located after the eval (re)definition. That way no one ever
sees eval bound to #f.
Index: ice-9/compile-psyntax.scm
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/ice-9/compile-psyntax.scm,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 compile-psyntax.scm
--- ice-9/compile-psyntax.scm 4 Sep 2002 20:09:00 -0000 1.1.2.2
+++ ice-9/compile-psyntax.scm 15 Sep 2003 05:10:10 -0000
@@ -12,14 +12,16 @@
(let ((in (open-input-file source))
(out (open-output-file (string-append target ".tmp"))))
- (let loop ((x (read in)))
- (if (eof-object? x)
- (begin
- (close-port out)
- (close-port in))
- (begin
- (write (sc-expand3 x 'c '(compile load eval)) out)
- (newline out)
- (loop (read in))))))
+ (with-fluids ((expansion-eval-closure
+ (module-eval-closure (current-module))))
+ (let loop ((x (read in)))
+ (if (eof-object? x)
+ (begin
+ (close-port out)
+ (close-port in))
+ (begin
+ (write (sc-expand3 x 'c '(compile load eval)) out)
+ (newline out)
+ (loop (read in)))))))
(system (format #f "mv -f ~s.tmp ~s" target target))
Index: ice-9/syncase.scm
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/ice-9/syncase.scm,v
retrieving revision 1.18.2.8
diff -u -r1.18.2.8 syncase.scm
--- ice-9/syncase.scm 27 Jan 2003 11:02:51 -0000 1.18.2.8
+++ ice-9/syncase.scm 15 Sep 2003 05:10:11 -0000
@@ -61,9 +61,6 @@
;; code and include 'eval' in the export clause of define-module,
;; above.
-(define eval #f)
-(export eval)
-
\f
(define expansion-eval-closure (make-fluid))
@@ -255,6 +252,8 @@
(cadr x)
(sc-expand x))
environment))
+
+(export eval)
;;; Hack to make syncase macros work in the slib module
(let ((m (nested-ref the-root-module '(app modules ice-9 slib))))
--
Rob Browning
rlb @defaultvalue.org and @debian.org; previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-15 5:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-14 19:37 1.6 psyntax.pp bootstrapping bug -- may have found when it started Rob Browning
2003-09-15 5:23 ` Fix for 1.6 psyntax.pp bootstrapping bug Rob Browning
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).