Saturday, March 24, 2012

Mono 2.11 binary build for Synology 2.11

I have put up a build of Mono 2.11 for Synology DS211, so you can install it without compiling everything yourself. Simply download the archive and then run this:

tar -xvf mono-synology-ds211-2.11.tar.bz2
cp -R opt/mono-2.11 /opt/mono-2.11
Or use the one-line version:

tar -C / -xvf mono-synology-ds211-2.11.tar.bz2

This will install everything in /opt/mono-2.11, you can set up symlinks like this:

ln -s /opt/mono-2.11/bin/mono /opt/bin/mono
ln -s /opt/mono-2.11/bin/mcs /opt/bin/mcs
ln -s /opt/mono-2.11/bin/gmcs /opt/bin/gmcs

I have also put up a build of Mono 2.10.9 for Synology DS211, in case Mono 2.11 turns out to be too alpha. You can have both installed at the same time, just change the symlinks to fit.

Friday, March 23, 2012

Mono on Synology NAS DS 211

Updated 2014-01-21: 
There is a repository with pre-built synology packages (including Mono), which might save you some hassle.

There used to be a Mono package for Synology, using the ipkg system. But it was old (Mono 2.4), and it seems to have disappeared. I have a lot of Mono/.Netstuff that I want to run on my NAS box, especially Duplicati for backups.

If you download the source and build the latest Mono, you get strange errors. Hopefully this guide will help you building Mono on your Synology DS. I have tested with DSM 3.1 and DSM 4.0 and both build fine and appear to run as expected.

First of, you need the Synology ipkg system set up. Once this is installed, you can pull some tools to build it. You will need at least make, automake, autoconf, bison, glib, libc-dev, libstdc++, m4, gcc, gawk, textutils, gettext, zlib. You need gawk and textutils to run the configure script. I use wget to download the Mono sources, and nano to edit the makefiles, so install those too.

Type this to get all the packages:
sudo ipkg install wget nano make automake autoconf bison \
glib libc-dev libstdc++ m4 gcc gawk textutils gettext zlib

Then download Mono sources:

wget ""

And extract:

tar -xf mono-2.11.0.tar.bz2

Then configure:

cd mono-2.11
./configure --prefix=/opt/mono-2.11
The --prefix will setup the build to put stuff into /opt/mono-2.11 rather than /usr. If you use just /opt, you will have a hard time uninstalling Mono later should you want to.

Now you should be ready to build it, but there is some weirdness with default includes, so edit the following files:


In all files, look for the line:


Add the -lrt flags so the line becomes:

LDFLAGS = -lrt 

If you already have flags on that line, just add the -lrt option to the end, and keep all the other stuff. This fixes problems with "undefined reference to clock_gettime" and also includes the pthreads library.

Now the pthreads library provided by ipkg is a bit broken, so you need to use the normal pthreads library for the build. Simply do this:
mkdir /opt/arm-none-linux-gnueabi/lib_disabled
mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled
cp /lib/ /opt/arm-none-linux-gnueabi/lib/
ln -s /opt/arm-none-linux-gnueabi/lib/ /opt/arm-none-linux-gnueabi/lib/
ln -s /opt/arm-none-linux-gnueabi/lib/ /opt/arm-none-linux-gnueabi/lib/

And that is it, now run:


This will take a few hours probably, so sit back and wait. I usually run this in a screen so network issues do not stop the build.

After the build has completed, you can install it into /opt/mono-2.11:

make install

To make life a little easier, add some symlinks:

ln -s /opt/mono-2.11/bin/mono /opt/bin/mono
ln -s /opt/mono-2.11/bin/mcs /opt/bin/mcs
ln -s /opt/mono-2.11/bin/gmcs /opt/bin/gmcs

And finally test it:

mono --version

Mono JIT compiler version 2.11 (tarball Fri Mar 23 15:12:18 CET 2012)
Copyright (C) 2002-2011 Novell, Inc, Xamarin Inc and Contributors.
TLS:           __thread
SIGSEGV:       normal
Notifications: epoll
Architecture:  armel,soft-float
Disabled:      none
Misc:          softdebug
LLVM:          supported, not enabled.
GC:            Included Boehm (with typed GC and Parallel Mark)

I have uploaded a complete build, so you can just use it without doing the long and boring build process.

Thursday, February 9, 2012

What is wrong with ACTA, SOPA, PIPA, PCIP, etc

I was planning to write a post about what is wrong with ACTA, SOPA, PIPA etc, but it turns out that Paul Tassi was faster. And he writes it more elegantly :)

To sum up: You cannot kill piracy by legislation, but you can offer an alternative that is easier, better, legal and charge for it.

Lets hope the movie industry is not as greedy as the music companies (Sony, I am looking at you!) and think that each studio should make the service and charge the others for distribution. If they do that, they end up like the music industry and eventually pay some future Steve Jobs 40% to do their job.

Lets also hope they realize that making a closed source DRM system that works with: Windows, Linux, OSX, iOS1-5, Android 1.4-4.0, Windows Phone 1.0-2.0, Blackberry, and all the ARM/PPC/Intel variants is NOT something you want to start your proposal with. If people want to copy it, they buy the CD/DVD/BluRay/etc and copy from that. There is no need for applying an extra "copy protection" layer just because you did that job for the pirates.

And finally, get moving and make Netflix/Hulu/etc available to non-US consumers. Why do I have to pay for something like, because you cannot figure out that information is global? Why do I have to wait 2 years or more to watch a TV series that has great reviews on today? And then either be home every Tuesday at 9:00pm, or buy a DVD boxset one year later? Compare that scenario to the seven step process in the Forbes article. And yes, I have tried both headweb and voddler, and they have movies releases that are in the "favorites" section in Blockbuster!