How to compile Unison for a Synology DS212+

Edit (May 15, 2020): An updated guide for newer Synology devices can be found here:
How to compile unison for a Synology NAS (DSM 6.2)

(Originally posted Aug 18, 2012)
This guide explains how to compile and install Unison on your Synology DS212+ NAS.

Compiling Unison

  • Install the dependencies
    sudo ipkg install ocaml make gcc textutils
  • Fix the pthreads library symlink (Borrowed from this site)
    sudo rm /opt/arm-none-linux-gnueabi/lib/
    sudo ln -s /lib/ /opt/arm-none-linux-gnueabi/lib/
  • Get the latest unison
  • Unpack unison
    tar zxvf unison-2.40.63.tar.gz
  • Change dir
    cd unison-2.40.63
  • Build (text version)
    make UISTYLE=text NATIVE=false
  • Install
    sudo cp unison /opt/bin

Testing Unison

  • unison -version
    unison version 2.40.63
    unison -selftest
    Contacting server...
    Running internal tests...
    backups 1 (local)...
    backups 2...
    backups 2a...
    backups 3...
    backups 4...
    backups 5 (directories)...
    backups 6 (backup prefix/suffix)...
    links 1 (directories and links)...
    links 2 (symlink to nowhere)...
    Success :-)
  • Clean up
    rm -Rf test-a.tmp
    rm -Rf test-b.tmp

Leave a reply