Now that the dust has settled, I thought I'd have a proper go. The key thing that triggered my attention was a massive update to my debian testing box this morning: nice and shiny mono 2.12 and MonoDevelop 2.10! These little babies target the 4.0 profile - none of that old stuff any more. Excellent news. So I got the dist-upgrade out of the way - fairly painlessly I might add, it just went straight through - fired off MonoDevelop and got myself to work (actually, in truth, the first thing I did was to setup F# mode in emacs, but I digress).
I started off by following Tomas instructions but noticed that things had moved on a bit since his video. For one, there are debs of F# in CodePlex these days: http://fsxplat.codeplex.com/releases/view/55463. I grabbed myself the deb - thinking it wouldn't really work on my 64-bit build, really - but it installed without any problems and even registered all the assemblies in the Gac. Nice one. Second step was to get the MonoDevelop AddIn working. Now this is were things didn't go so well. I dutifully went to Tools | AddIn Manager, Gallery, Clicked on the combo and selected Manage Repositories; I added their repo:
Which was immediately recognised and told me I had a language binding available for F#; but, alas, just as we neared the end of the adventure, it all went wrong. The AddIn was developed for MonoDevelop 2.4 and I'm now running 2.10. Joys of bleeding edge. But fear not! I found the source of the AddIn on GitHub, cloned it and started to get it to build with MonoDevelop 2.10!
git clone https://github.com/fsharp/fsharpbinding.git
I did a couple of tentative fixes:
$ git diffdiff --git a/Makefile.orig b/Makefile.origindex a88a8a8..0234959 100644--- a/Makefile.orig+++ b/Makefile.orig@@ -57,6 +57,7 @@ FILES = \src/FSharpResolverProvider.fsREFERENCES = \+ -r:$(MONOBIN)/Mono.Posix.dll \-r:$(MONOBIN)/mscorlib.dll \-r:System.dll -r:System.Xml.dll \-r:$(MDBIN)/MonoDevelop.Core.dll \diff --git a/configure.sh b/configure.shindex 06f06f5..94f33aa 100755--- a/configure.sh+++ b/configure.sh@@ -83,12 +83,12 @@ searchpaths "MonoDevelop" bin/MonoDevelop.Core.dll PATHS[@]MDDIR=$RESULTecho "Successfully found MonoDevelop root directory." $MDDIR-PATHS=( /usr/lib/fsharp /usr/local/lib/fsharp /opt/mono/lib/mono/2.0 )+PATHS=( /usr/lib/fsharp /usr/local/lib/fsharp /opt/mono/lib/mono/4.0 )searchpaths "F#" FSharp.Core.dll PATHS[@]FSDIR=$RESULTecho "Successfully found F# root directory." $FSDIR-PATHS=( /usr/lib/mono/2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/2.0 /opt/mono/lib/mono/2.0 )+PATHS=( /usr/lib/mono/4.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/2.0 /opt/mono/lib/mono/4.0 )searchpaths "Mono" mscorlib.dll PATHS[@]MONODIR=$RESULTecho "Successfully found Mono root directory." $MONODIR
But finally succumbed to the following error:
./Configure.shmakeerror FS0219: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '/usr/lib/fsharp/FSharp.Core.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using.error FS0218: Unable to read assembly '/usr/lib/fsharp/FSharp.Core.dll'make: *** [all] Error 1
So it seems I need to get a 4.0 build of FSharp.Core. We'll continue on the next installment!
No comments:
Post a Comment