[MLton-user] Mac OS X on Intel

Joe Hurd joe.hurd@cl.cam.ac.uk
Sun, 23 Apr 2006 20:25:44 +0100


> Oh, that's very nice.  Then I'd say give it a try and report your
> experience.  You will probably have to tweak
>    /usr/local/lib/mlton/platform
> to have it report a PowerPC arch, otherwise MLton will complain of an
> unknown os/arch pair.  If you are lucky, that will get you to the point
> where
>    /usr/local/bin/mlton
> will actually do something interesting, rather than bailing.

Without changing anything, compiling a hello world program with mlton
-verbose 1 gives the following error message:

/usr/bin/ld: warning
/Users/joe/ptr/local/mlton-20051202/usr/local/lib/mlton/self/libmlton.a
archive's cputype (18, architecture ppc) does not match cputype (7)
for specified -arch flag: i386 (can't load from it)

I then added

case "$arch" in
# begin hack for intel mac os x
i386)
        HOST_ARCH=powerpc
;;
# end hack for intel mac os x
alpha*)

to usr/local/lib/mlton/platform, but that didn't change the error from
compiling hello world.

I'm afraid my hacking skills aren't up to the task of porting MLton to
this new platform, but I'm keen to become a user!

Joe