Sunday, April 22, 2012

Compiling Mono and MonoDevelop

Last night, one of the member of Indonesian Slackware Community opened up a thread about Mono. He was having a broken Mono after compiling from SlackBuilds. I raised some suspisions because usually SlackBuilds which are published on SBo projects are well-tested by the maintainers and also the admins, so i tested the package last night (using the latest version upstream - 2.11.1, not the version used in SlackBuild script - 2.10.9) and i leave the computer compiling all night because it took some time to complete.

This morning, i woke up and got the build process completely and see if it works by issuing mono -V and i got this results:
Mono JIT compiler version 2.11.1 (tarball Sat Apr 21 20:55:23 WIT 2012)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors.
www.mono-project.com
       TLS:           __thread
       SIGSEGV:       altstack
       Notifications: epoll
       Architecture:  x86
       Disabled:      none
       Misc:          softdebug
       LLVM:          supported, not enabled.
       GC:            Included Boehm (with typed GC and Parallel Mark)

Sweet... that just works. After installing Mono, i had an idea about compiling MonoDevelop, the default IDE to build application that are based on Mono. I had problems installing Mono manually in the past, but right now, there's a SlackBuild script for MonoDevelop, so i wanted to give another shot.

Compiling MonoDevelop requires a lot of dependencies and some of them are GNOME-related packages, but rest assured, since all of them are already available in SlackBuilds projects. All you need is to locate them, download, and build them. I provided the list of packages i used to build MonoDevelop below for your reference.

Please note that i used the latest version upstream (if there's any newer version) rather than using the same version used in SlackBuilds project. I also compiled this on a machine using the latest update of Slackware-Current (per April 20 2012) using GLIBC-2.15 and GCC-4.7.0. Every scripts works without any modifications (except for version changes).

Here are the list of dependencies of Mono
Here are the list of dependencies and built order of MonoDevelop (2.8.8.4)
I compiled Mono package first (after installing it's dependency: libgdiplus), and then continued with compiling  requirement of mono-addins which is the gtk-sharp and then followed by compiling the main package of mono-addins and the list goes on until all dependencies are satisfied. When everything is done, you can start compiling MonoDevelop.

Please note that i didn't list the duplicate dependencies, because if you follow that order, you should have the packages installed in previous packages. Let me know if i missed some packages (probably because i have installed them prior building this packages)

Here's a screenshot of MonoDevelop that i just compiled