I’ve tried to build the source from scratch and hacked the configure file in various ways, nothing helped. I’m not sure what the problem is, it looks like the C# compiler in the Mono Lite package freaking out for some reason. To actually build it properly, you have to have an existing working C# compiler. And the basic precompiled one delivered doesn’t work.
To get a working build, you’ll have to build Mono 1.2.6 first. Put it anywhere but /usr, since you probably want it to stay clean. The build however also has some issues. Turns out that the Mono Lite C# compiler in that version doesn’t like an unlimited stack (the main compiler’s probably also affected). To fix that, issue ulimit -Hs 10240 in your command line (preferably bash, since Mono expects the GNU command chain) which sets the hard limit to 10MB, run make, make install and then make sure the binaries are in the path.
Then retry compiling Mono 2.0. The build should succeed.
I’d recommend recompiling the whole package yet again, but with the Mono 2.0 binaries. Which means compile Mono 1.2.6 and slap it in e.g. /opt/mono126, then compile Mono 2.0 putting it in e.g. /opt/mono2 and then do a final compile with the prefix you want. Consider keeping both previous compiles, in case a future release shows more issues.
Update: Turns out that the Mono 2.0 compiler’s also shitting all over itself about Solaris’ default stack settings. Either manually set ulimit or tweak the mcs/gmcs scripts wherever you’ve installed Mono.

on Oct 13th, 2008 at 19:44
Hi Tom,
My mind ran across you, remembering you from the betas we have tested. Hope all is well.
on Apr 15th, 2009 at 16:12
Thanks a lot. This helped me in building Mono-2.4 on OpenSolaris 2008.11 b111.