Re: Re: Re: self-compiling failed

Matthew Fluet <[email protected]>
Newsgroups gmane.comp.lang.ml.mlton.devel
Message-ID <[email protected]>
On Wed, May 19, 2010 at 11:03 PM, Baojian Hua <[email protected]> wrote:
>
> And if we intall the new "mlton-smlnj.x86-linux" in /usr/bin/mlton/,

Actually, you would need to install it in /usr/lib/mlton/.  Also, note
that you can't generally replace the mlton-compile executable (or
mlton-smlnj.x86-linux heap) from one version of the compiler with
another version, since the runtime library, basis library, etc. may
have also changed.  If /usr/bin/mlton and /usr/lib/mlton correspond to
mlton-20070826 (as might be the case if you installed them from your
Linux distribution's package manager or if you installed it from
mlton-20070826-1.x86-linux.tgz from mlton.org), then this will almost
certainly not work.

Generally, the best thing to do when self-compiling is to run the
resulting compiler directly from build/bin/mlton.

> and run mlton script:
> $ mlton
> but got this error message: (part of it)
>
> de=d' -target-link-opt darwin ' -L/usr/local/lib' -target-link-opt freebsd -L/usr/local/lib/ -target-link-opt aix -maix64 -target-link-opt ia64 '' -target-link-opt mingw '-lws2_32 -lkernel32 -lpsapi -lnetapi32 -lwinmm' -target-link-opt mingw -Wl,--enable-stdcall-fixup -target-link-opt netbsd '-Wl,-R/usr/pkg/lib -L/usr/pkg/lib/' -target-link-opt openbsd -L/usr/local/lib/ -target-link-opt solaris '-lnsl -lsocket -lrt' -target-link-opt x86 -m32 -profile-exclude '\$\(SML_LIB\)'
> unknown switch: -fno-common
> usage: mlton [option ...] file.{c|cm|mlb|o|sml} [file.{c|o|s|S} ...]
>    -align {4|8}                    object alignment
>    -as-opt <opt>                   pass option to assembler
>    -cc-opt <opt>                   pass option to C compiler
>    -codegen {native|x86|c}         which code generator to use
>    -const '<name> <value>'         set compile-time constant
>    -default-ann <ann>              set annotation default for mlb files
>    -default-type '<ty><N>'         set default type
>    -disable-ann <ann>              disable annotation in mlb files
>
> Are we missing something else?

Looks like something got corrupted in your mlton script.  Has it been
altered from that in SVN HEAD?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.