Discussion:
Broken Scheme on E&CE Machines
(too old to reply)
Andre Masella
2004-07-17 16:24:14 UTC
Permalink
I've been trying to do A6 (from the CS site) on the E&CE Solaris machines,
but the version of SCM provided seems to be broken. The (load x) and (exit)
directives don't work, and there is an error on start up that I assume is
the binary failing to load its libraries (I can't find slib in /usr/share
or /usr/lib/scm).

---------------------
load Failure
---------------------
SCM version 4e1, Copyright (C) 1990, 1991, 1992, 1993, 1994 Aubrey Jaffer.
SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `(terms)' for details.

ERROR: No such file or directory
ERROR: load: Could not open file (see errobj)
;Evaluation took 0 mSec (0 in gc) 1334 cells work, 670 bytes other
(load "myfile.scm")
ERROR: unbound variable: load
; in expression: (... load "myfile.scm")
; in top level environment.
;Evaluation took 0 mSec (0 in gc) 7 cells work, 47 bytes other
-----------------------

-----------------------
exit Failure
-----------------------
(exit)
ERROR: unbound variable: exit
; in expression: (... exit)
; in top level environment.
;Evaluation took 0 mSec (0 in gc) 5 cells work, 36 bytes other
(quit)
;EXIT
-----------------------

Does the library environment variable need to be set somewhere? I've tried
my code on Kawa and MIT-Scheme at home, without incident, but it won't run
on the E&CE systems due to the (load) errors. I also can't get Jaffar's SCM
to install under Linux. Any suggestions?
--
--Andre Masella (***@engmail, www.eng/~apmasell)

I fear biological computers. It's the intersection of people who can't
find the "on" switch and can't water houseplants.
Danny Su
2004-07-17 11:49:37 UTC
Permalink
hmm... yea, just tried now and scm doesn't work on ohm either

I haven't even started on asgn6, but quickly tried to get SCM to run on
linux... what have you tried already?

all I did was:
- extract scm5d9.zip and slib3a1.zip, that gave me 2 folders scm/ and
slib/

- go in scm/ and typed "make scmlit"
- typed ./build
- copied stuff on stdout and run those commands to compile scm binary
- ran ./scm and tried some examples in course notes...

seems to work for simple expressions
when I tried defining max procedure though, scm complained about the fact
that it's built-in
Andre Masella
2004-07-17 21:08:07 UTC
Permalink
Post by Danny Su
hmm... yea, just tried now and scm doesn't work on ohm either
Well, SCM isn't installed; it lives in ~ece251/software/bin, so it should be
the same on every system.
Post by Danny Su
what have you tried already?
Well, I had Kawa (Scheme implemented in Java) installed a while back, and it
works fine, but its error messages are basically Java stack dumps. I then
went an installed MIT-Scheme, which works quite well. I assumed they were
using MIT-Scheme since it is the most standard, but I thought wrong. I then
tried the SCM from Jaffar, but it gives all kinds of errors and won't
compuile under GCC 3.4.0
Post by Danny Su
seems to work for simple expressions
when I tried defining max procedure though, scm complained about the fact
that it's built-in
Well, it won't let you override built in functions. They have version 4e
which, I assume is much older, so who knows what changes have been made.

I'm just going to keep using MIT & Kawa and if it works under both of those,
assume it will work on whatever Scheme interpreter the grade with.
--
--Andre Masella (***@engmail, www.eng/~apmasell)

To within half a percent, Pi seconds is a nanocentury.
Danny Su
2004-07-17 16:10:14 UTC
Permalink
I then tried the SCM from Jaffar, but it gives all kinds of errors and
won't compuile under GCC 3.4.0
I compiled 5d9 with GCC 3.4.1 and it worked fine (except that built-in
procedure I was talking about), I don't know about 4e... maybe
that's why

but it's on the server now! 5d9
/home/ece251/software/scheme/scm

also slib
/home/ece251/software/scheme/slib
Andre Masella
2004-07-18 00:21:45 UTC
Permalink
Post by Danny Su
I then tried the SCM from Jaffar, but it gives all kinds of errors and
won't compuile under GCC 3.4.0
I compiled 5d9 with GCC 3.4.1 and it worked fine (except that built-in
procedure I was talking about), I don't know about 4e... maybe
that's why
I tried 5d9. The problem was with the binary I was using the compile the
sources, not the sources. Why must Scheme interpreters be dependent on
Scheme?
Post by Danny Su
but it's on the server now! 5d9
Yes, I sent a copy of the orignial post to Sanjay. He just replied and told
me he has fixed everything. We, apparently, now have a newer version of SCM
than CS. ;-)
Post by Danny Su
(define max 3)
WARNING: redefining built-in
max
#<unspecified>
if not whiney. Kawa and MIT-Scheme had no trouble (didn't even warn).
--
--Andre Masella (***@engmail, www.eng/~apmasell)

To segfault is human; to blue-screen moronic.
Andre Masella
2004-07-18 15:29:01 UTC
Permalink
Okay, apparently, SCM will use GNU readline instead of stupid input, so you
can use arrow keys and history (yay!), but it is not enabled by default.

Apply my patch at http://www.eng/~apmasell/hole/scm.patch . It changes the
build system to use readline+ncruses instead of readline+termcap (assuming
that's how your system has it) and sanitises the install directories.
Then, to build, do:

./build -F edit-line arrays bignums cautious inexact macro dynamic-linking
-h system -o scm
./build -F curses -h system -t dll
./build -c "sc2.c rgx.c record.c gsubr.c ioext.c posix.c unix.c socket.c
ramap.c" -h system -t dll

Then make install as you would normally. It's much perdier with readline.
--
--Andre Masella (***@engmail, www.eng/~apmasell)

A: Mu!
Loading...