Sunday, July 28, 2002

Fun With C#

well, mono released a new version recently, and this time it compiles on FreeBSD. well, sort of anyway.

first off, the configure script sucks, and can't figure out that you need -pthread to link against the pthreads stuff. now i concede that this is a bitch to figure out, and i guess i'm spoiled by the fact that the apr people have such nice autoconf-fu for figureing this out, but it stull bugged me. then, you can't actually use the garbage collector, because both the boehm gc and mono have headers named 'gc.h', which screws all sorts of stuff up. on linux this isn't an issue, because they install the gc headers in /usr/local/lib/gc, but on BSD they're in /usr/local/include, so we get fucked. of course, if you hand hack the includes to find the right header, it crashes trying to use the resulting binary to run mcs.exe, so for now we're stuck without gc. then, once you actually get this all built and running, you have to set MONO_DISABLE_SHM in your environment, because it can't seem to connect to the shared memory segment correctly and will give all sorts of errors whenever you run mono if you let it try. oh, and there are occasional errors when it's starting up the io daemon, which leave annoyingly named files all over the place, and i haven't figured out what causes that yet. it seems intermitent, and i can't reproduce it right now.

all of this asside though, i was able to bootstrap the class libraries (it took an ungodly amount of memory, but it worked), and now i'm playing with C# on my FreeBSD box, which was the whole point of this exercise, and it is damn cool ;-)