[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-mit-scheme] "bin" file incompatibility, confusing error comment
From: |
gjs |
Subject: |
[Bug-mit-scheme] "bin" file incompatibility, confusing error comment |
Date: |
Thu, 25 Jun 2009 16:39:41 -0400 |
User-agent: |
IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+ |
Description:
It seems that sf across C vs native backends produces incompatible bin
files. Worse, the error comment when trying to load such incompatible
files is very unfortunate. This is all on 64-bit linux (specifically
Sussman's laptop).
To reproduce:
Produce some innocent file foo.scm. Then start up two Schemes,
scheme A, which compiles to C:
Image saved on Thursday April 30, 2009 at 12:19:48 AM
Release 7.7.90.+ || Microcode 15.1 || Runtime 15.7 || SF 4.41 || LIAR/C 4.118
Edwin 3.116 || SOS 1.8 || IMAIL 1.21
and scheme B, which compiles to native code:
Image saved on Friday May 1, 2009 at 4:50:19 PM
Release 7.7.90.+ || Microcode 15.1 || Runtime 15.7 || SF 4.41 || LIAR/i386
4.118
Edwin 3.116 || SOS 1.8 || IMAIL 1.21
Compile foo in Scheme A, and test its bin file
(cf "foo")
(pp (fasload "foo.bin"))
;Loading "foo.bin"... done
(begin (define (mumble) 2) (define (grumble) 3))
;Unspecified return value
Looks good. Now try reading the same bin file in Scheme B
(pp (fasload "foo.bin"))
;Loading "foo.bin"...
;Attempt to read binary file "/home/gjs/metacirc/axch-thesis/foo.bin" failed:
either it's not binary or the wrong version.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.
;Start debugger? (y or n):
That's unfortunate; but if it is necessary, then so be it.
But now, compile the same file in Scheme B and test the bin:
(cf "foo")
(pp (fasload "foo.bin"))
;Loading "foo.bin"... done
(begin (define (mumble) 2) (define (grumble) 3))
;Unspecified return value
Works. But now, try reading that same file in Scheme A:
(pp (fasload "foo.bin"))
;Unable to find file "foo.bin" because: File does not exist.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.
;Start debugger? (y or n):
OOPS! Not only does it fail to load, which is unfortunate, but the
error comment is also very dis-informative, in that the file does
exist, it was just produced by the wrong sf.
GJS, channeling axch
- [Bug-mit-scheme] "bin" file incompatibility, confusing error comment,
gjs <=