[MLton-user] MLton on a new mac

Sean McLaughlin seanmcl at gmail.com
Sat Feb 12 08:45:24 PST 2011


Hi,

I can't get MLton to work on my new mac laptop.

1) I installed gmp via MacPorts
2) Downloaded MLton, statically linked
(http://mlton.org/pages/Download/attachments/mlton-20100608-1.x86-darwin.gmp-static.tgz)
3) Made tmp.sml (contents: val _ = ())

$ mlton tmp.sml
ld: warning: in /opt/local/lib/libgmp.dylib, file was built for
unsupported file format which is not the architecture being linked
(i386)
(...a bunch of undefined symbol errors...)

5) The problem occurred during linking, so I pruned down the linker
command by making an empty file tmp.c, and calling

$ gcc tmp.c -lgmp -L/opt/local/lib -m32

which gave the same linker error.  Without the -m32 option it compiles
with no errors.  I fiddled around in the mlton script trying to turn
off the -m32 flag, but that broke other things.  Any idea what's going
on?  Some mismatch of architectures between 32 and 64 bit
architectures?

Thanks,

Sean



More information about the MLton-user mailing list