Adventures with Mono
I just wanted some background music for reading and maybe cleaning up my office a little...
But I'm not really willing to manage my own cache of popular music; the RIAA/ASCAP rules cramp my style, which is to store stuff in the web and point to it from whichever of my N machines I happen to be using.
podcasting sure sounds cool, though I'm not sure I grok. I searched for a gnome podcast tool and found monopod. No, there's no debian package for it, but I just got a copy of Edd's Mono: A Developer's Notebook, so I thought I'd try to build monopod from source.
untar it; blow past README and INSTALL and go straight to ./configure && make and so begins the game of hunt-the-build-deps...
checking for mono >= 1.1.6... Package mono was not found
so I counter with
$ sudo apt-get install mono-devel mono-gmcs
but that turns out to be a diversion; what I really needed was...
$ sudo apt-get install libmono-dev
checking for gtk-sharp-2.0 >= 1.9.5... Package gtk-sharp-2.0 was not found ...
$ sudo apt-get install gtk-sharp2
And lo! the configure script wins, but make fails thusly:
./ChannelWindow.cs(144) error CS1501: No overload for method `SetSortFunc' takes `2' arguments
Unfortunately, C# is not like python and Modula-3; it fails the unambiguitiy requirement so I can't tell just by looking at ChannelWindow.cs where SetSortFunc comes from. I can see that it comes from ListStore. Maybe an IDE will teach me the tricks for navigating C# files...
$ sudo apt-get install monodevelop
but starting monodevelop loses with
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not find file "/usr/lib/monodoc/monodoc.xml". : /usr/lib/monodoc/monodoc.xml
but thanks to debian package search it's easy enough to find the relevant package:
$ sudo apt-get install monodoc-manual
and now I can open ChannelWindow.cs in monodevelop, but when I hover over ListStore, I don't get any lisp-machine-like context-sensitive help.
There are only a few imports at the top:
using System; using Gtk; using Mono.Posix;
So I'm willing to try a brute-force search. Aha... ListStore in the Gtk# docs.
SetSortFunc takes 4 args. How did this code ever compile? I check for version skew... apt-cache policy and the README agree: Gtk# version 1.9.5. I don't get it. postscript: Edd suspects ETOONEW; he uses mono 1.1.7 and I got 1.1.8
I try filling in 0s for the arguments, but C# is too strongly typed for that. I try to figure out what the C# equivalent of None or nil is for a delegate, but it doesn't jump out at me.
Then... duh.. there's a monopod 1.4 release. I grab that, but building it fails with:
Internal() warning CS8018: Could not find the symbol writer assembly (Mono.CSharp.Debugger.dll). This is normally an installation problem. Please make sure to compile and install the mcs/class/Mono.CSharp.Debugger directory.
OK, I give.
In some ways, the mono platform is coming along more quickly than Java, but the fact remains: it takes a long time to deploy a new platform. The MonoDebianPlan shows lots of scary packaging issues.
See also: #swig notes from tonight's journey.