You have to run "install-mono.sh" (alas use dos2unix on the file first). This replaces fsc.exe with fscp10.exe, a .NET portable executable, and attempts to precompile. We use the 1.0 executable because precomilation is nto supported by Mono 2.0, and the added startup time for the compiler caused by Mono rejitting the code makes it unusable.

This also replaces fsi.exe by fsi10.exe. I have bug reports that Mono's Reflection.Emit code generation is broken, but perhaps they've fixed it. Let us know what happens when you stress the original fsi.exe a little. mode.

Here are the commands run by install-mono.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 

#!/bin/sh

# This script is for use with CLIs on Unix, e.g. Mono
gacutil -i bin/fslib.dll
gacutil -i bin/fslib10.dll
gacutil -i bin/mllib.dll
gacutil -i bin/mllib10.dll
gacutil -i bin/FSharp.Compiler.dll
gacutil -i bin/FSharp.Compiler10.dll

chmod u+x bin/fscp10.exe
chmod u+x bin/fsi10.exe

echo "Replacing fsi.exe and fsc.exe with programs that run under .NET 1.0..."
cp -p bin/fsi.exe bin/fsi-old.exe
cp -p bin/fsc.exe bin/fsc-old.exe
cp -p bin/fscp10.exe bin/fsc.exe
cp -p bin/fsi10.exe bin/fsi.exe

# This part pre-compiles using Mono's --aot
# Note as of Mono 1.1.17 precompiling only works for .NET 1.0 binaries
mono --aot bin/fslib10.dll
mono --aot bin/mllib10.dll

echo "Pre-compiling FSharp.Compiler10.dll (may take a while)..."
mono --aot bin/FSharp.Compiler10.dll

mono --aot bin/fscp10.exe
mono --aot bin/fsi10.exe
mono --aot bin/fsc.exe
mono --aot bin/fsi.exe

By on 12/8/2006 4:24 AM ()

Oh, maybe I should have had mentioned that I have installed fsharp using modified install-mono.sh script (custom packaging system). Acutally, it's 90% the same as the original one except renaming (using cp -p ...) of 1.0 versions, I explicitely specify ...10.exe for .net 1.0 compiler/interactive shell/... This works fine with current mono version. When I tested fsi.exe in my previous post, it was original 2.0 version.

Mono's ahead of time compilation (aot) doesn't work for 2.0 assemblies and any attempt to do so will throw an error message. Anyways, I'll devote some more time to testing 2.0 fsi.exe on mono.

-- Juraj

By on 12/8/2006 1:39 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper