Compiling Mono 2.6 on Slicehost
It’s a pain in the ass. It takes ages. And did I mention it’s a pain in the ass? After reading the forums and stumbling upon xyzzyxyzzy’s awesome script, I decided to make it easier on all us Mono/.NET lovers.
I did it manually, but this should work – alas, you’ve been warned. Insert typical “Works on my machine” disclaimer here; if your cat dies from using this script, it’s not my fault. You need kernel version 2.6.24-23-xen (standard on Slicehost I think)
UPDATE: I’ll post the SVN version in a few. Seems there was a POSIX issue that wasn’t fixed on the tarball, forcing me to go the SVN way. New post in a few minutes, once I test it.
about 11 months ago
Have you tried this with mono 2.4? I’m trying to install it on a slice with that directions but I get a make error… :-\
about 11 months ago
Yeah, I just switched the URLs and it worked. I’ll upload the latest script, gimme 5 min.
about 11 months ago
I tried the new script and I still got no luck.
Can you tell me what distro are you using? I’m using Ubuntu 8.10 (intrepid), and:
# uname -a
Linux slice 2.6.24-23-xen #1 SMP Mon Jan 26 03:09:12 UTC 2009 x86_64 GNU/Linux
about 11 months ago
Linux 2.6.24-23-xen #1 SMP Mon Jan 26 03:09:12 UTC 2009 x86_64 GNU/Linux here.
What error are you getting?
about 10 months ago
Boris, hey,
thanks for the script. I can now add the following to the list of kernels on which mono 2.2. will compile in this manner:
Linux 2.6.24-19-xen #1 SMP Sat Jul 12 00:15:59 UTC 2008 x86_64 GNU/Linux
I have a couple of questions, if you wouldn’t mind. Firstly, I assume I can safely delete the download directory. The build directory has to be left in place, however, because the various mono components have not been copied to somewhere like /usr/lib/bin?
Also, typing ‘mcs’ in the bash shell produces “command not found”. I’d assumed this was because mcs wasn’t in the path but cding into build/mono2.2/mcs/mcs and tying ‘mcs’ gives the same result. Typing ‘./mcs.exe’ gives ‘cannot execute binary file’.
Can you advise?
All the best and thanks again for the script.
about 10 months ago
@James:
No problem; Xyzzy’s the one to thank actually. I just modified it to match Slicehost’s settings.
I did remove the build directory, as make install actually copies them into the bin directories. What does whereis mono/mcs/gmcs output?
about 10 months ago
Boris, hey,
thanks for getting back to me. To answer your question:
+++
~: whereis mono/mcs/gmcs
gmcs:
~: sudo whereis mono/mcs/gmcs
gmcs:
+++
So apparently nothing, whatever this means. Slightly more helpful:
+++
~: whereis mono
mono: /etc/mono /usr/local/bin/mono /usr/local/etc/mono /usr/local/lib/mono
+++
Two other things worth a note are that I can’t execute gmcs or mcs directly from the command line, I have to type ‘mono ~/build/mono-2.2/mcs/mcs/mcs/mcs.exe hello.cs’. I’ve seen two solutions to this, one creating a symbolic link that wouldn’t work for me since the suggested target doesn’t exist (if you see what I mean) and one is to install mono-common (or something like) from aptitude, which I dare not do until I understand the issues.
And one _more_ issue, running mod_mono causes similar faults in apache’s error.log:
+++
**
** ERROR:(mini-amd64.c:192):amd64_patch: assertion failed: (amd64_is_imm32 (disp))
Stacktrace:
Native stacktrace:
/usr/bin/cli [0x51bb67]
/lib/libpthread.so.0 [0x7ff11d6e07d0]
…
/lib/libc.so.6(__libc_start_main+0xf4) [0x7ff11d10d1c4]
/usr/bin/cli(realloc+0×381) [0x416109]
=================================================================
Got a SIGABRT while executing native code…
=================================================================
+++
I assume that this is because mod_mono is using the old mono distribution in /usr/local/lib/mono (before you’re suggestion to use whereis I wouldn’t have found this directory) but I’m unsure how to configure mod_mono to fix this, even assuming I’ve guessed right.
Can you recommend a mailing list to subscribe to where I can discuss these problems, by the way? I’ve subscribed to the mono developers list but the traffic is low and it hardly seems the right place.
Kind regards,
James
about 10 months ago
Hrm. The script published here is designed to stop that amd64_is_mm32 error. How did you install it?
Try running it again, this time with “sudo ./mono-22.sh” or whatever the script is called on your end.
BTW, the whereis command was meant to be 3: whereis mono, whereis mcs and whereis gmcs
EDIT: Regarding the mailing list issue, I’d recommend the #mono IRC channel on GIMPnet. More info at http://mono-project.com/IRC
about 10 months ago
Boris, hey,
okay, I’ll give it a go again, though not tonight…
Thanks for the IRC tip, I’ll try it out.
Hopefully catch you there some time or on SliceHost IRC.
All the best,
James
about 7 months ago
Hi Boris
I have used your script and it seems to have got me further than before on my Rackspace/Mosso Cloud Server.
But the Mono Server does not seem to be installed.
Please can you advise?
Thanks
about 7 months ago
How did you run the script? Can you give me the output of whereis mono, whereis gmcs and whereis mcs?