I wanted to build the unison file synchroniser for my Synology DS211 NAS. This is always complicated by the fact that unison is written in Ocaml. Here are the steps I followed, largely inspired by this post on compiling unison for a DS212+ and this post (in german) on installing unison 2.32 on a Bufallo NAS. All the instructions assume you run as
root. First you will need to install ipkg, beware that the built-in
wget does not work properly with
ipkg, so you need to manually install a newer version of
wget and then make sure that
/opt/bin/ is early in your path so that ipkg can use it.
ipkg install ocaml make gcc textutils
ln -s /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/
Remplace the line «
module NameMap : Map.S with type key = Name.t»
module NameMap : MyMap.S with type key = Name.t»
make NATIVE=false UISTYLE=text CFLAGS=”-cclib -L/lib”
cp ./unison /opt/bin/
The last command should return
unison version 2.32.52 confirming that the binary works properly. To ensure that remote calls find the proper binary, add the following line to your unison configuration:
servercmd = /opt/bin/unison.