[MLton-user] mlton and netbsd

fulvio ciriaco oivulf at gmail.com
Tue Oct 6 10:18:38 PDT 2009


Hallo,
fortunately bootstrapping with smlnj-mlton resulted quite feasable,
as soon as I increased memory to 2 Gb.
I used smlnj v110.70.
I left it compiling in the evening and found it done in the morning.
So, now I have mlton trunk on NetBSD and I am testing it.
Only the following needed fixing:
the install procedure
the mlyacc Makefile, seems to require mlyacc, I patched it so:
-               mllex src/yacc.lex && \
+               (mllex src/yacc.lex || ml-lex src/yacc.lex) && \
-               mlyacc src/yacc.grm && \
+               (mlyacc src/yacc.grm || ml-yacc src/yacc.grm) && \
                chmod -w src/yacc.grm.*
so it accepts ml-yacc from smlnj when mlyacc is not found.
Also, benchmark/main.sml has no support for netbsd and is not
documented for mlton:
--- main.sml    (revision 7233)
+++ main.sml    (working copy)
@@ -12,7 +12,7 @@
 type int = Int.t

 fun usage msg =
-   Process.usage {usage = "[-mlkit] [-mosml] [-smlnj] bench1 bench2 ...",
+   Process.usage {usage = "[-mlkit] [-mosml] [-smlnj] [-mlton pathToMlton] bench1 bench2 ...",
                   msg = msg}

 val doOnce = ref false
@@ -239,6 +239,7 @@
                    case (MLton.Platform.Arch.host, MLton.Platform.OS.host) of
                      (X86, Linux) => ".x86-linux"
                    | (Sparc, Solaris) => ".sparc-solaris"
+                   | (X86, NetBSD) => ".x86-bsd"
                    | _ => raise Fail "don't know SML/NJ suffix for host type"
                  end
        val heap = concat [bench, suffix]

Fulvio
 
From: Matthew Fluet <mtf at cs.rit.edu>
Subject: Re: [MLton-user] mlton and netbsd
Date: Fri, 25 Sep 2009 15:31:38 -0400 (EDT)

> 
> Bootstrapping with an smlnj-mlton build is infeasible on pretty much
> any hardware.  1GB is just about enough for a (32-bit) self-compile,
> but you'll need a working mlton on your platform.
> 
> I'm surprised that the latest NetBSD isn't sufficiently binary
> compatible with the older mlton.
> 
> On Thu, 24 Sep 2009, fulvio ciriaco wrote:
>> I created smlnj-mlton from mlton in svn trunk and it works fine.
>> It is now two days that it is compiling mlton, and I do not know
>> when it will see the end.
>> My hardware is a bit outdated, a thinkpad t42 with 1 GiB ram.
>> Fulvio
>> From: Jesper Louis Andersen <jesper.louis.andersen at gmail.com>
>> Subject: Re: [MLton-user] mlton and netbsd
>> Date: Thu, 24 Sep 2009 18:56:31 +0200
>>
>>> On Tue, Sep 22, 2009 at 17:27, fulvio ciriaco <oivulf at gmail.com>
>>> wrote:
>>>> Hallo,
>>>> is there anybody having mlton working on netbsd 5.0?
>>>> I tried mlton-20051202-1.i386-netbsd on a "hello world" program
>>>> but the generated executable
>>>> segfaults in mutatorStackInvariant()
>>>
>>> It is a long time since I last tried mlton on NetBSD. I think the last
>>> NetBSD I ran it on was a 4.x-something. I wonder what changes were
>>> made to memory for you to segfault in that part.
>>>
>>>
>>> --
>>> J.
>>
>> _______________________________________________
>> MLton-user mailing list
>> MLton-user at mlton.org
>> http://mlton.org/mailman/listinfo/mlton-user
>>



More information about the MLton-user mailing list