[Mono-dev] Building Mono Using Scratchbox

Thomas Strecker thomas.strecker at dai-labor.de
Thu Dec 21 03:24:31 EST 2006

Hello Barry,
If you don't have a specific target device (or the target device is the
Nokia 770, as it is in my case) you may find a wonderful descrpition for
setting up scratchbox at
n . Additionally the maemo community provides a nice installer, which
does almost all the tasks for you (except for confirming some options),
which can be downloaded from the maemo repository
(http://repository.maemo.org/stable/scirocco/ for the latest stable
This worked like a charm for me, even though I used it inside a Debian
3.1 VM Ware on a Windows machine. If you are trying to create debian
packages, the maemo tutorial provides nice info as well.
As to compiling mono I must warn you that there is currently no way to
get a full build under this scratchbox. Not sure if there is under a
newer version.
The only way I manage to get something compiled is
- sbox-configure -st SDK_ARM
-- if you have set up a different name for the ARM target, put that in
place of "SDK_ARM"
- download the sources (I currently use latest dailies, whenever I try)
- tar xzf mono-....tar.gz
- cd mono-...
- ./configure --disable-mcs-build
- make
- make install

If you are trying to build a debian package, like I did, you can replace
the last three steps with
- dh_make -s -e <your-email-addy> -f ../mono-....tar.gz
-- confirm by hitting enter
- vi debian/control
-- enter any changes you need, for me, since I am only testing, it was
only setting the section to user/programming
-- save & quit
- vi debian/rules
-- append at least the "--disable-mcs-build" to the configure command
-- save and quit
- dpkg-buildpackage -rfakeroot -b

This works for me.
The assemblies I create under the PC target (after removing the
"--disable-mcs-build" option in the configure) and then do some hacking
in an effort to merge the two results. The final result is a debian
package, which installs fine on the Nokia 770. (I use some more options
for the configure script in order to reduce the size of the
installation, but this doesn't change anything else, I hope.) And I can
run a simple "hello world" program.
Similar to this I really cross-compiled the gtk-sharp package and
managed to get a GTK# window to open and close :)

I hope this helps at least a tiny bit.
	ciao Thomas

More information about the Mono-devel-list mailing list