Ubuntu – Unison Version and Compiler Conflicts

synchronizationUbuntuunison

I have two machines that one runs Ubuntu 18.04 and the other one Ubuntu 20.04. I want to use Unison to sync files between them but there are some issues. Firstly, because I sync with another machine too, I compiled from source Unison 2.48.3. Then in the Ubuntu 18.04, I installed from the Ubuntu software Unison 2.48.4 and so I did with Ubuntu 20.04. After setting them up properly, from the command line of Ubuntu 18.04 I run
unison-2.48.4-gtk
and try to sync. Although everything works fine, i.e. it finds the machine and the directory then I get the message:
Fatal error during unmarshaling (input value:ill-formed message) possibly because client and serer have been compiled with different versions of OCaml compiler.
In the 20.04, I checked the version of OCaml but apparently it returned nothing (even though I had installed unison from app store).
On the 18.04 the version is 4.05.0.
Any ideas on what I can do?

Best Answer

You're mixing Unison versions 2.48.3 and 2.48.4. Unison is very finicky about this since the developer changes the format of the Unison archive files even between minor versions. Anyways, the versions of Unison should match between all your machines. I would skip the app store, and compile/install 2.48.3 manually on your Ubuntu machine.

Furthermore, you've got to make sure that your using the same version of oCaml to compile the same version of Unison on each machine ;)

Related Question