[MLton-user] Problems building on Snow Leopard

Matthew Fluet matthew.fluet at gmail.com
Mon Jan 25 08:50:19 PST 2010


On Sun, Jan 24, 2010 at 11:58 AM, Colin Fleming
<colin.mailinglist at gmail.com> wrote:
> Hi all,
>
> I've been trying to build MLton on Snow Leopard from trunk (r7407),
> because the binary 20070826 build doesn't work - it gives a bunch of
> errors that seem to be related to being a 64-bit platform.

Assuming that you have a multilib gmp installed, then you should be
able to "fix" 20070826 by instructing it to always pass "-m32" when it
calls gcc with an x86 architecture target.  You can do this by editing
/usr/local/bin/mlton and adding:
 -target-as-opt x86 '-m32'
 -target-link-opt x86 '-m32'
and by adding '-m32' to the "-target-cc-opt x86 '...'" option.  This
fixed mlton will always produce 32-bit binaries, but you should be
able to bootstrap svn trunk with it.

> I'm using
> 'make TARGET_ARCH=x86_64 smlnj-mlton', which I saw in a previous mail
> of John Reppy's. I'm trying to build with SML/NJ to bootstrap before
> building with MLton. The SML/NJ I'm using is:
>
> Standard ML of New Jersey v110.71 [built: Thu Nov 26 23:38:52 2009]
>
> I'm getting the following errors:
>
> make script basis-no-check mlbpathmap constants libraries-no-check
> /bin/cp -fpR bin/mlton-script "/Volumes/Data/dev/mlton-trunk/build/bin/mlton"
> chmod a+x "/Volumes/Data/dev/mlton-trunk/build/bin/mlton"
> /bin/cp -fpR "/Volumes/Data/dev/mlton-trunk/bin/platform"
> "/Volumes/Data/dev/mlton-trunk/build/lib"
> /bin/cp -fpR "/Volumes/Data/dev/mlton-trunk/bin/static-library"
> "/Volumes/Data/dev/mlton-trunk/build/lib"
> mkdir -p "/Volumes/Data/dev/mlton-trunk/build/lib/sml"
> rm -rf "/Volumes/Data/dev/mlton-trunk/build/lib/sml/basis"
> /bin/cp -fpR "/Volumes/Data/dev/mlton-trunk/basis-library/."
> "/Volumes/Data/dev/mlton-trunk/build/lib/sml/basis"
> find "/Volumes/Data/dev/mlton-trunk/build/lib/sml/basis" -type d -name
> .svn | xargs rm -rf
> find "/Volumes/Data/dev/mlton-trunk/build/lib/sml/basis" -type f -name
> .ignore | xargs rm -rf
> touch "/Volumes/Data/dev/mlton-trunk/build/lib/mlb-path-map"
> ( echo 'MLTON_ROOT $(LIB_MLTON_DIR)/sml';       \
>          echo 'SML_LIB $(LIB_MLTON_DIR)/sml'; )        \
>                >>"/Volumes/Data/dev/mlton-trunk/build/lib/mlb-path-map.tmp"
> mv "/Volumes/Data/dev/mlton-trunk/build/lib/mlb-path-map.tmp"
> "/Volumes/Data/dev/mlton-trunk/build/lib/mlb-path-map"
> Creating constants file.
> "/Volumes/Data/dev/mlton-trunk/build/bin/mlton" -target "self"
> -build-constants true >tmp.c
> invalid target: self
> usage: mlton [option ...] file.{c|cm|mlb|o|sml} [file.{c|o|s|S} ...]
> <snip usage info>
> Popt.makeUsage
>        ../lib/mlton/basic/error.sml:11.21-11.31
> make[1]: *** [constants] Error 1
> make: *** [smlnj-mlton] Error 2

I can't reproduce this, although I'm only on Leopard.  Could you send
the entire log from a make invocation on clean sources?  It looks as
though the "self" target wasn't installed correctly, but that is
nothing more than "cp" commands as part of building the runtime.



More information about the MLton-user mailing list