I have been using the excellent tutorial "http://mybookworld.wikidot.com/get-unison-working" to make unison 2.27 work. However, a lot of my files use special characters (french accents) which are represented differently in nfs versus ntfs filesystems. So Unison thinks they are different files. So I really wanted to try compiling the latest version 2.40.61 because supports these characters and means I dont need to remove all special chars in my filenames. So if anyone is interested in getting the latest version to work I will point out the differences you need to make to the 2.27 tutorial to get 2.40.61 to work.
1. You need to get GCC to work - so follow the tutorial until the line: "Download the appropriate version of unison"
2. You need to dowload unison-2.40.61.tar.gz
I tried to get the archive from http://www.seas.upenn.edu/~bcpierce/unison//download/releases but Benjamin Pierce's site has not been up for the last few days. So I downloaded from here instead: "http://www.sfr-fresh.com/unix/misc/unison-2.40.61.tar.gz/"
$ mkdir /root/unison
$ cd /root/unison
$ tar xvfz unison-2.40.61.tar.gz
$ cd unison-2.40.61
3. Skip the part where it says to edit the file update.mli - the suggested change is now the default, so not required anymore.
4. I was unable to compile without make two changes to the Make scripts:
a. edit "Makefile.OCaml"
REPLACE: OCAMLLIBDIR=$(shell ocamlc -v | tail -1 | sed -e 's/.* g' | sed -e 's/\\/\g' | tr -d '\r')
WITH: OCAMLLIBDIR=$(shell ocamlc -v | tail -n1 | sed -e 's/.* g' | sed -e 's/\\/\g' | tr -d '\r')
(tail -1 is incorrect syntax and was creating errors at compile time, this quick fix prevents those)
b. edit "Makefile"
REPLACE: Makefile.ProjectInfo: mkProjectInfo.ml $(wildcard ../.bzr/branch/last-revision)
WITH: Makefile.ProjectInfo: mkProjectInfo $(wildcard ../.bzr/branch/last-revision)
(i.e. remove the .ml from mkProjectInfo)
Without this fix mkProjectInfo cannot get built. More info about it here: http://tech.groups.yahoo.com/group/unison-users/message/9442
A patch called "Makfile.unison-patch" was released by Karl but I didn't know what to do with it (I never used unix before). But it seems to suggest the edit above which works.
5. Then follow the rest of the script, i.e.:
make NATIVE=false UISTYLE=text CFLAGS="-cclib -L/lib"
unison compiles despite lots of warnings. unison -selftest passes without issues and I have been syncronizing between my PC running 2.40.61 and my whitelight box without issues. I have been able to get unison working over ssh private/public which does not require a password logon to sync between the WDC and my PC. This great article helped me: http://www.howtoforge.com/mirroring_with_rsync
(once you get it working for rsync, then unison works just fine - this article helped me on the PC side http://www.stanford.edu/~pgbovine/unison-for-your-mom.htm).
Hope it all works out for anyone trying this. If you have any questions I will try to answer, I don't know if I'll be able to help much (I just got lucky hacking).