problem with mlton-20000906-2.i386.tgz

Allyn Dimock dimock@deas.harvard.edu
Tue, 9 Jan 2001 10:13:41 -0500 (EST)


Stephen Weeks writes:
 > I do not know why the call to mlton fails.  It must be because
 > /usr/local/lib/mlton/mlton is not executable or /usr/local/lib/mlton/world.mlton
 > is not readable.  Could you please change the top line of the script to
 > "#!/bin/sh -x", run it again, and send the output?  Thanks.

Thanks.

I should have looked at the file when mlton failed.  I just remember
mlton compiling to C and being self-hosting so assumed that there was
now a binary executable.

Once I looked at the mlton file, the problem was obvious:
The tarball is meant to be untarred by root under /

Since I wasn't root (on a shared Linux machine where I don't know the
root password). I needed to go into mlton and change the definition of
"root" to
root='/home/dimock/usr/local/lib/mlton'

A README file in the distribution may help others to avoid making the
dumb mistakes that I made, however I don't see a place in the
directory hierarchy to put it.


By the way, as non-root I couldn't untar the .h files.  This may not
be a problem since the one example program that I tried compiled and
ran in the absense of the .h files.
./mlton ../../doc/mlton-20000906/examples/hello-world.sml 

zcat mlton-20000906-2.i386.tgz | tar xf -
tar: usr/local/lib/mlton/include/ccodegen.h: Could not create file: Permission denied
tar: usr/local/lib/mlton/include/gc.h: Could not create file: Permission denied
tar: usr/local/lib/mlton/include/int-inf.h: Could not create file: Permission denied
tar: usr/local/lib/mlton/include/mlton-lib.h: Could not create file: Permission denied
tar: usr/local/lib/mlton/include/mlton-posix.h: Could not create file: Permission denied
tar: usr/local/lib/mlton/include/mlton.h: Could not create file: Permission denied
tar: usr/local/lib/mlton/include/my-lib.h: Could not create file: Permission denied
tar: usr/local/lib/mlton/include/x86codegen.h: Could not create file: Permission denied
tar: Error exit delayed from previous errors

zcat mlton-20000906-2.i386.tgz | tar tvf - | grep gc.h
-r--r--r-- root/root     14303 2000-08-15 17:03:49 usr/local/lib/mlton/include/gc.h

since owner only has read privilege, tar seems unwilling to create the
file

tar --version
tar (GNU tar) 1.13.11

Scanning the man page for this version of tar, I don't see a switch to
override this behavior, althouth I can extract each individually to
stdout using the -O switch if need be, and then redirect the output to
the desired file.

-- Allyn