Sunday, May 1, 2011

Installing Unison on a Synology DS411j NAS

Since my full-tower 10 hdd raid5 server is apparently making too much noise and polluting the air in the room too much (can't imagine why, just because it has 6 fans?), I bought a NAS as a first step towards replacing the server with something less.. bulky. I got a Synology DS411j NAS, and have spent the last 24h moving data around so that I could use 4 existing WD 1.5 TB drives in it. Seems to be working very well so far and the Synology web gui (DSM) is quite impressive. However, it doesn't have Unison and if there is one thing I need it's Unison!

Luckily it is possible to install it:

  1. Follow the Synology guide for installing ipkg/bootstrapping your NAS. (The DS411j has a Marvel Kirkwood mv6281 ARM processor.)

  2. Install the required packages with: ipkg install ocaml make gcc

  3. Now the tricky part, for me Unison didn't compile initially due to errors in /opt/arm-none-linux-gnueabi/lib/libpthread-2.5.so. Somehow this library is not the correct version, but the correct version IS installed in /lib.
    Fix this by deleting the symlink /opt/arm-none-linux-gnueabi/lib/libpthread.so.0, and creating a new one to /lib using: ln -s /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/libpthread/

  4. Then download the unison source code somewhere (eg /volume1/@tmp), go there and run: make UISTYLE=text NATIVE=false

  5. There might be some error messages, but in the end a functional unison binary is created!

  6. Copy the binary to for example /opt/bin. Set up SSH keys for the root account, and we're all set!

Tuesday, January 18, 2011

New Unison binaries, v2.43.16 (linux/osx/cygwin)

I've compiled some new text-only Unison binaries, version 2.43.16. Feel feel to grab them if they help you :)

As usual, Unison is pretty easy to compile. Just install OCaml, check out the latest Unison trunk, and build with "make UISTYLE=text".